* [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues
@ 2015-09-10 10:18 Wei Liu
2015-09-10 10:18 ` [PATCH net v3 1/2] xen-netback: " Wei Liu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wei Liu @ 2015-09-10 10:18 UTC (permalink / raw)
To: Xen-devel, Netdev; +Cc: Wei Liu
Wei Liu (2):
xen-netback: respect user provided max_queues
xen-netfront: respect user provided max_queues
drivers/net/xen-netback/netback.c | 7 +++++--
drivers/net/xen-netfront.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net v3 1/2] xen-netback: respect user provided max_queues
2015-09-10 10:18 [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
@ 2015-09-10 10:18 ` Wei Liu
2015-09-10 10:18 ` [PATCH net v3 2/2] xen-netfront: " Wei Liu
2015-09-10 17:12 ` [PATCH net v3 0/2] xen-net{front,back}: " David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2015-09-10 10:18 UTC (permalink / raw)
To: Xen-devel, Netdev; +Cc: Wei Liu
Originally that parameter was always reset to num_online_cpus during
module initialisation, which renders it useless.
The fix is to only set max_queues to num_online_cpus when user has not
provided a value.
Reported-by: Johnny Strom <johnny.strom@linuxsolutions.fi>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
drivers/net/xen-netback/netback.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 42569b9..f585c6a 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -2105,8 +2105,11 @@ static int __init netback_init(void)
if (!xen_domain())
return -ENODEV;
- /* Allow as many queues as there are CPUs, by default */
- xenvif_max_queues = num_online_cpus();
+ /* Allow as many queues as there are CPUs if user has not
+ * specified a value.
+ */
+ if (xenvif_max_queues == 0)
+ xenvif_max_queues = num_online_cpus();
if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) {
pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n",
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net v3 2/2] xen-netfront: respect user provided max_queues
2015-09-10 10:18 [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
2015-09-10 10:18 ` [PATCH net v3 1/2] xen-netback: " Wei Liu
@ 2015-09-10 10:18 ` Wei Liu
2015-09-10 13:35 ` [Xen-devel] " David Vrabel
2015-09-10 17:12 ` [PATCH net v3 0/2] xen-net{front,back}: " David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-09-10 10:18 UTC (permalink / raw)
To: Xen-devel, Netdev; +Cc: Wei Liu, David Vrabel
Originally that parameter was always reset to num_online_cpus during
module initialisation, which renders it useless.
The fix is to only set max_queues to num_online_cpus when user has not
provided a value.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
---
v3: fix copy-n-paste error to make netfront compile
---
drivers/net/xen-netfront.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index e27e6d2..b9c637a 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -2132,8 +2132,11 @@ static int __init netif_init(void)
pr_info("Initialising Xen virtual ethernet driver\n");
- /* Allow as many queues as there are CPUs, by default */
- xennet_max_queues = num_online_cpus();
+ /* Allow as many queues as there are CPUs if user has not
+ * specified a value.
+ */
+ if (xennet_max_queues == 0)
+ xennet_max_queues = num_online_cpus();
return xenbus_register_frontend(&netfront_driver);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Xen-devel] [PATCH net v3 2/2] xen-netfront: respect user provided max_queues
2015-09-10 10:18 ` [PATCH net v3 2/2] xen-netfront: " Wei Liu
@ 2015-09-10 13:35 ` David Vrabel
0 siblings, 0 replies; 5+ messages in thread
From: David Vrabel @ 2015-09-10 13:35 UTC (permalink / raw)
To: Wei Liu, Xen-devel, Netdev; +Cc: David Vrabel
On 10/09/15 11:18, Wei Liu wrote:
> Originally that parameter was always reset to num_online_cpus during
> module initialisation, which renders it useless.
>
> The fix is to only set max_queues to num_online_cpus when user has not
> provided a value.
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Tested-by: David Vrabel <david.vrabel@citrix.com>
David
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -2132,8 +2132,11 @@ static int __init netif_init(void)
>
> pr_info("Initialising Xen virtual ethernet driver\n");
>
> - /* Allow as many queues as there are CPUs, by default */
> - xennet_max_queues = num_online_cpus();
> + /* Allow as many queues as there are CPUs if user has not
> + * specified a value.
> + */
> + if (xennet_max_queues == 0)
> + xennet_max_queues = num_online_cpus();
>
> return xenbus_register_frontend(&netfront_driver);
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues
2015-09-10 10:18 [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
2015-09-10 10:18 ` [PATCH net v3 1/2] xen-netback: " Wei Liu
2015-09-10 10:18 ` [PATCH net v3 2/2] xen-netfront: " Wei Liu
@ 2015-09-10 17:12 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-09-10 17:12 UTC (permalink / raw)
To: wei.liu2; +Cc: xen-devel, netdev
From: Wei Liu <wei.liu2@citrix.com>
Date: Thu, 10 Sep 2015 11:18:56 +0100
> Wei Liu (2):
> xen-netback: respect user provided max_queues
> xen-netfront: respect user provided max_queues
This looks better, series applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-10 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 10:18 [PATCH net v3 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
2015-09-10 10:18 ` [PATCH net v3 1/2] xen-netback: " Wei Liu
2015-09-10 10:18 ` [PATCH net v3 2/2] xen-netfront: " Wei Liu
2015-09-10 13:35 ` [Xen-devel] " David Vrabel
2015-09-10 17:12 ` [PATCH net v3 0/2] xen-net{front,back}: " David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).