[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF78047910.1202C26A-ON65257695.0030A7D8-65257695.00313863@in.ibm.com>
Date: Wed, 23 Dec 2009 14:38:55 +0530
From: Krishna Kumar2 <krkumar2@...ibm.com>
To: Yinghai Lu <yinghai@...nel.org>
Cc: David Miller <davem@...emloft.net>,
e1000-devel@...ts.sourceforge.net, NetDev <netdev@...r.kernel.org>
Subject: Re: ixgbe warning
> Krishna Kumar2/India/IBM@...IN wrote
>
> > > I guess you are running on a big SMP system? If so,
> > > ixgbe_select_queue() is not limiting the queue_index
> > > based on real_num_tx_queues, and possibly returning
> > > a bad txq from:
> > >
> > > if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
> > > return txq;
> > >
> > > Also, I was looking at other providers of select_queue and found:
> > >
> > > u16 gfar_select_queue(struct net_device *dev, struct sk_buff *skb)
> > > {
> > > return skb_get_queue_mapping(skb);
> > > }
> > >
> > > How can this be correct (driver supports upto 8 txq's). Unless txq=0
> for
> > > xmits of all locally
> > > generated packets is fine.
> >
> > may need this one...
> >
> > ---
> > drivers/net/ixgbe/ixgbe_main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: linux-2.6/drivers/net/ixgbe/ixgbe_main.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/net/ixgbe/ixgbe_main.c
> > +++ linux-2.6/drivers/net/ixgbe/ixgbe_main.c
> > @@ -5317,7 +5317,7 @@ static int ixgbe_maybe_stop_tx(struct ne
> > static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff
> *skb)
> > {
> > struct ixgbe_adapter *adapter = netdev_priv(dev);
> > - int txq = smp_processor_id();
> > + int txq = smp_processor_id() % adapter->num_tx_queues;
> >
> > if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
> > return txq;
>
> The modulo operation is not required (and costly too) for
> other cases. You should move it inside the if case, or I
> guess Jeff can suggest the right fix.
BTW, do your warnings disappear when you put the modulo inside
the above 'if' condition?
thanks,
- KK
--
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