* [PATCH net] bnx2x: Fix Multi-Cos
@ 2017-06-01 12:57 Yuval Mintz
2017-06-01 16:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Yuval Mintz @ 2017-06-01 12:57 UTC (permalink / raw)
To: davem, netdev; +Cc: eric.dumazet, Yuval Mintz
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>
---
Hi Dave,
Please consider applying this to `net'.
Thanks,
Yuval
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index eccb3d1..5f49334 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,
}
/* select a non-FCoE queue */
- return fallback(dev, skb) % BNX2X_NUM_ETH_QUEUES(bp);
+ return fallback(dev, skb) % (BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos);
}
void bnx2x_set_num_queues(struct bnx2x *bp)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] bnx2x: Fix Multi-Cos
2017-06-01 12:57 [PATCH net] bnx2x: Fix Multi-Cos Yuval Mintz
@ 2017-06-01 16:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-06-01 16:22 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: netdev, eric.dumazet
From: Yuval Mintz <Yuval.Mintz@cavium.com>
Date: Thu, 1 Jun 2017 15:57:56 +0300
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-01 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01 12:57 [PATCH net] bnx2x: Fix Multi-Cos Yuval Mintz
2017-06-01 16:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).