Skip to content

Commit

Permalink
ixgbe: fixup remaining call sites for arbitrary TCs
Browse files Browse the repository at this point in the history
One existing call sites still expect either 4 or 8 traffic
classes to be specified. This fixes this allowing arbitrary
values up to 8 to work as expected.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Aug 29, 2011
1 parent 09dca47 commit 4fa2e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4481,7 +4481,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
break;
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
if (num_tcs == 8) {
if (num_tcs > 4) {
if (tc < 3) {
*tx = tc << 5;
*rx = tc << 4;
Expand All @@ -4492,7 +4492,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
*tx = ((tc + 8) << 3);
*rx = tc << 4;
}
} else if (num_tcs == 4) {
} else {
*rx = tc << 5;
switch (tc) {
case 0:
Expand Down

0 comments on commit 4fa2e0e

Please sign in to comment.