Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
Cc: Divy Le Ray <redacted>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index e1f96fb..4a70867 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3482,7 +3482,7 @@ static inline void init_rspq(struct sge_rspq *q, u8 timer_idx, u8 pkt_cnt_idx,
static void __devinit cfg_queues(struct adapter *adap)
{
struct sge *s = &adap->sge;
- int i, q10g = 0, n10g = 0, qidx = 0;
+ int i, q10g = 0, n10g = 0, qidx = 0, ncpu;
for_each_port(adap, i)
n10g += is_10g_port(&adap2pinfo(adap, i)->link_cfg);@@ -3491,10 +3491,11 @@ static void __devinit cfg_queues(struct adapter *adap)
* We default to 1 queue per non-10G port and up to # of cores queues
* per 10G port.
*/
+ ncpu = min_t(int, num_online_cpus(), DEFAULT_MAX_NUM_RSS_QUEUES);
if (n10g)
q10g = (MAX_ETH_QSETS - (adap->params.nports - n10g)) / n10g;
- if (q10g > num_online_cpus())
- q10g = num_online_cpus();
+ if (q10g > ncpu)
+ q10g = ncpu;
for_each_port(adap, i) {
struct port_info *pi = adap2pinfo(adap, i);--
1.7.9.rc2