|
@@ -1537,14 +1537,13 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
goto err_release_regions;
|
|
goto err_release_regions;
|
|
}
|
|
}
|
|
|
|
|
|
- qcount = MAX_CMP_QUEUES_PER_QS;
|
|
|
|
|
|
+ qcount = netif_get_num_default_rss_queues();
|
|
|
|
|
|
/* Restrict multiqset support only for host bound VFs */
|
|
/* Restrict multiqset support only for host bound VFs */
|
|
if (pdev->is_virtfn) {
|
|
if (pdev->is_virtfn) {
|
|
/* Set max number of queues per VF */
|
|
/* Set max number of queues per VF */
|
|
- qcount = roundup(num_online_cpus(), MAX_CMP_QUEUES_PER_QS);
|
|
|
|
- qcount = min(qcount,
|
|
|
|
- (MAX_SQS_PER_VF + 1) * MAX_CMP_QUEUES_PER_QS);
|
|
|
|
|
|
+ qcount = min_t(int, num_online_cpus(),
|
|
|
|
+ (MAX_SQS_PER_VF + 1) * MAX_CMP_QUEUES_PER_QS);
|
|
}
|
|
}
|
|
|
|
|
|
netdev = alloc_etherdev_mqs(sizeof(struct nicvf), qcount, qcount);
|
|
netdev = alloc_etherdev_mqs(sizeof(struct nicvf), qcount, qcount);
|