Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd3d631 authored by Krishna Kumar's avatar Krishna Kumar Committed by David S. Miller
Browse files

ixgbe: Fix return of invalid txq

a developer had complained of getting lots of warnings:

"eth16 selects TX queue 98, but real number of TX queues is 64"

http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html



As there was no follow up on that bug, I am submitting this
patch assuming that the other return points will not return
invalid txq's, and also that this fixes the bug (not tested).

Signed-off-by: default avatarKrishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e44d38e1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5329,8 +5329,11 @@ 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();

	if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
	if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
		while (unlikely(txq >= dev->real_num_tx_queues))
			txq -= dev->real_num_tx_queues;
		return txq;
	}

#ifdef IXGBE_FCOE
	if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&