|
@@ -57,6 +57,7 @@
|
|
|
#include <xen/interface/grant_table.h>
|
|
|
|
|
|
/* Module parameters */
|
|
|
+#define MAX_QUEUES_DEFAULT 8
|
|
|
static unsigned int xennet_max_queues;
|
|
|
module_param_named(max_queues, xennet_max_queues, uint, 0644);
|
|
|
MODULE_PARM_DESC(max_queues,
|
|
@@ -2164,11 +2165,12 @@ static int __init netif_init(void)
|
|
|
|
|
|
pr_info("Initialising Xen virtual ethernet driver\n");
|
|
|
|
|
|
- /* Allow as many queues as there are CPUs if user has not
|
|
|
+ /* Allow as many queues as there are CPUs inut max. 8 if user has not
|
|
|
* specified a value.
|
|
|
*/
|
|
|
if (xennet_max_queues == 0)
|
|
|
- xennet_max_queues = num_online_cpus();
|
|
|
+ xennet_max_queues = min_t(unsigned int, MAX_QUEUES_DEFAULT,
|
|
|
+ num_online_cpus());
|
|
|
|
|
|
return xenbus_register_frontend(&netfront_driver);
|
|
|
}
|