Comments
Patch
@@ -9908,7 +9908,8 @@ static bool tg3_enable_msix(struct tg3 *tp)
int i, rc;
struct msix_entry msix_ent[tp->irq_max];
- tp->irq_cnt = num_online_cpus();
+ tp->irq_cnt = min_t(unsigned, num_online_cpus(),
+ DEFAULT_MAX_NUM_RSS_QUEUES);
if (tp->irq_cnt > 1) {
/* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
@@ -10967,7 +10968,8 @@ static int tg3_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
if (netif_running(tp->dev))
info->data = tp->irq_cnt;
else {
- info->data = num_online_cpus();
+ info->data = min_t(u32, num_online_cpus(),
+ DEFAULT_MAX_NUM_RSS_QUEUES);
if (info->data > TG3_IRQ_MAX_VECS_RSS)
info->data = TG3_IRQ_MAX_VECS_RSS;
}