diff options
author | Mintz, Yuval <Yuval.Mintz@cavium.com> | 2017-06-01 08:57:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-01 12:22:02 -0400 |
commit | 3968d38917eb9bd0cd391265f6c9c538d9b33ffa (patch) | |
tree | 1131eac3b94b9773eb0cc8b1566de4ebecc86947 | |
parent | 2b7ea64f94347b72235e563fedd6ef1ead4d11ec (diff) |
bnx2x: Fix Multi-Cos
Apparently multi-cos isn't working for bnx2x quite some time -
driver implements ndo_select_queue() to allow queue-selection
for FCoE, but the regular L2 flow would cause it to modulo the
fallback's result by the number of queues.
The fallback would return a queue matching the needed tc
[via __skb_tx_hash()], but since the modulo is by the number of TSS
queues where number of TCs is not accounted, transmission would always
be done by a queue configured into using TC0.
Fixes: ada7c19e6d27 ("bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index eccb3d1b6abb..5f49334dcad5 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -1926,7 +1926,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb, | |||
1926 | } | 1926 | } |
1927 | 1927 | ||
1928 | /* select a non-FCoE queue */ | 1928 | /* select a non-FCoE queue */ |
1929 | return fallback(dev, skb) % BNX2X_NUM_ETH_QUEUES(bp); | 1929 | return fallback(dev, skb) % (BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos); |
1930 | } | 1930 | } |
1931 | 1931 | ||
1932 | void bnx2x_set_num_queues(struct bnx2x *bp) | 1932 | void bnx2x_set_num_queues(struct bnx2x *bp) |