Skip to content

Commit

Permalink
ixgbe: set queue0 for srrctl configuration correctly for DCB
Browse files Browse the repository at this point in the history
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: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed May 7, 2009
1 parent afafd5b commit 163de42
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
queue0 = index;
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;
Expand Down

0 comments on commit 163de42

Please sign in to comment.