Skip to contentSkip to conversation

cxgb4: Fix number of queue sets corssing the limit

PATCH Applied Ganesh Goudar 2 participants 2 messages Oct 18, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index f320497..57eb4e1 100644
@@ -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
maintainer Applied
#1 lore raw

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 than MAX_OFLD_QSETS.

Applied, thank you.