lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 27 Feb 2010 17:02:36 -0800
From:	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"Fastabend, John R" <john.r.fastabend@...el.com>
Subject: Re: [net-next-2.6 PATCH 3/3] ixgbe: Do not allocate too many
 netdev txqueues

On Fri, 2010-02-26 at 06:04 -0800, Eric Dumazet wrote:
> Le vendredi 26 février 2010 à 01:15 -0800, Jeff Kirsher a écrit :
> > From: John Fastabend <john.r.fastabend@...el.com>
> > 
> > Instead of allocating 128 struct netdev_queue per device, use the
> > minimum value between 128 and the number of possible txq's, to
> > reduce ram usage and "tc -s -d class shod dev .." output.
> > 
> > This patch fixes Eric Dumazet's patch to set the TX queues to
> > the correct minimum.
> > 
> > Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> > ---
> > 
> >  drivers/net/ixgbe/ixgbe_main.c |   14 +++++++++++++-
> >  1 files changed, 13 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> > index 4a01022..a961da2 100644
> > --- a/drivers/net/ixgbe/ixgbe_main.c
> > +++ b/drivers/net/ixgbe/ixgbe_main.c
> > @@ -5996,6 +5996,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
> >  	const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
> >  	static int cards_found;
> >  	int i, err, pci_using_dac;
> > +	unsigned int indices = num_possible_cpus();
> >  #ifdef IXGBE_FCOE
> >  	u16 device_caps;
> >  #endif
> > @@ -6034,7 +6035,18 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
> >  	pci_set_master(pdev);
> >  	pci_save_state(pdev);
> >  
> > -	netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), MAX_TX_QUEUES);
> > +	if (ii->mac == ixgbe_mac_82598EB)
> > +		indices = min_t(unsigned int, indices, IXGBE_MAX_RSS_INDICES);
> > +	else
> > +		indices = min_t(unsigned int, indices, IXGBE_MAX_FDIR_INDICES);
> > +
> > +	indices = max_t(unsigned int, indices, IXGBE_MAX_DCB_INDICES);
> > +#ifdef IXGBE_FCOE
> > +	indices += min_t(unsigned int, num_possible_cpus(),
> > +			 IXGBE_MAX_FCOE_INDICES);
> > +#endif
> > +	indices = min_t(unsigned int, indices, MAX_TX_QUEUES);
> > +	netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);
> >  	if (!netdev) {
> >  		err = -ENOMEM;
> >  		goto err_alloc_etherdev;
> > 
> 
> Thanks Jeff, but what is the reason for limiting to MAX_TX_QUEUES ?
> Is it a hardware issue ?
> 

MAX_TX_QUEUES is 128, which is the maximum the 82599 device supports in
hardware (82598 supports 32 Tx queues).  I'm not sure why you'd ever
want to have more Tx queues than what you have in the network device.
Perhaps I don't understand the question?

Cheers,
-PJ

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ