cxgb4: Fix number of queue sets corssing the limit
Subsystems (3)
PATCH 1/1 cxgb4: Fix number of queue sets corssing the limit
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 <[email protected]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -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;
Signature · 1 line
2.1.0
From: Ganesh Goudar <[email protected]>
Date: Tue, 18 Oct 2016 14:21:25 +0530
Quoted 5 lines
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 thanMAX_OFLD_QSETS.Signed-off-by Ganesh Goudar <[email protected]>
Applied, thank you.