* [PATCH] cxgb4: Fix number of queue sets corssing the limit
@ 2016-10-18 8:51 Ganesh Goudar
2016-10-18 14:33 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ganesh Goudar @ 2016-10-18 8:51 UTC (permalink / raw)
To: davem; +Cc: netdev, linteam, hariprasad, nirranjan, Ganesh Goudar
Do not let number of offload queue sets to go more than
MAX_OFLD_QSETS, which would otherwise crash the driver
on machines with cores more than MAX_OFLD_QSETS.
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index f320497..57eb4e1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4057,7 +4057,7 @@ static void cfg_queues(struct adapter *adap)
* capped by the number of available cores.
*/
if (n10g) {
- i = num_online_cpus();
+ i = min_t(int, MAX_OFLD_QSETS, num_online_cpus());
s->ofldqsets = roundup(i, adap->params.nports);
} else {
s->ofldqsets = adap->params.nports;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: Fix number of queue sets corssing the limit
2016-10-18 8:51 [PATCH] cxgb4: Fix number of queue sets corssing the limit Ganesh Goudar
@ 2016-10-18 14:33 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-18 14:33 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, linteam, hariprasad, nirranjan
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Tue, 18 Oct 2016 14:21:25 +0530
> Do not let number of offload queue sets to go more than
> MAX_OFLD_QSETS, which would otherwise crash the driver
> on machines with cores more than MAX_OFLD_QSETS.
>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-18 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 8:51 [PATCH] cxgb4: Fix number of queue sets corssing the limit Ganesh Goudar
2016-10-18 14:33 ` 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).