Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a56177e1 authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller
Browse files

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: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e1670c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;