提交 4fa2e0e1 编写于 作者: J John Fastabend 提交者: Jeff Kirsher

ixgbe: fixup remaining call sites for arbitrary TCs

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: NJohn Fastabend <john.r.fastabend@intel.com>
Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 09dca476
...@@ -4481,7 +4481,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc, ...@@ -4481,7 +4481,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
break; break;
case ixgbe_mac_82599EB: case ixgbe_mac_82599EB:
case ixgbe_mac_X540: case ixgbe_mac_X540:
if (num_tcs == 8) { if (num_tcs > 4) {
if (tc < 3) { if (tc < 3) {
*tx = tc << 5; *tx = tc << 5;
*rx = tc << 4; *rx = tc << 4;
...@@ -4492,7 +4492,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc, ...@@ -4492,7 +4492,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
*tx = ((tc + 8) << 3); *tx = ((tc + 8) << 3);
*rx = tc << 4; *rx = tc << 4;
} }
} else if (num_tcs == 4) { } else {
*rx = tc << 5; *rx = tc << 5;
switch (tc) { switch (tc) {
case 0: case 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册