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

Commit 163de42e authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

ixgbe: set queue0 for srrctl configuration correctly for DCB



The current configuration is not setting queue 0 correctly for DCB
configurations.  As a result unconfigured queues are being used to setup
the SRRCTL register rx buffer len sizes.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent afafd5b0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -1740,7 +1740,18 @@ static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter, int index)
	unsigned long mask;

	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
		if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
			int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
			if (dcb_i == 8)
				queue0 = index >> 4;
			else if (dcb_i == 4)
				queue0 = index >> 5;
			else
				dev_err(&adapter->pdev->dev, "Invalid DCB "
				        "configuration\n");
		} else {
			queue0 = index;
		}
	} else {
		mask = (unsigned long) adapter->ring_feature[RING_F_RSS].mask;
		queue0 = index & mask;