netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues
@ 2015-09-09 10:23 Wei Liu
  2015-09-09 10:23 ` [PATCH net v2 1/2] xen-netback: " Wei Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wei Liu @ 2015-09-09 10:23 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] 7+ messages in thread

* [PATCH net v2 1/2] xen-netback: respect user provided max_queues
  2015-09-09 10:23 [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
@ 2015-09-09 10:23 ` Wei Liu
  2015-09-09 10:23 ` [PATCH net v2 2/2] xen-netfront: " Wei Liu
  2015-09-10  4:53 ` [PATCH net v2 0/2] xen-net{front,back}: " David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2015-09-09 10:23 UTC (permalink / raw)
  To: Xen-devel, netdev; +Cc: Wei Liu, Ian Campbell, Johnny Strom

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>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Cc: Johnny Strom <johnny.strom@linuxsolutions.fi>
---
 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] 7+ messages in thread

* [PATCH net v2 2/2] xen-netfront: respect user provided max_queues
  2015-09-09 10:23 [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
  2015-09-09 10:23 ` [PATCH net v2 1/2] xen-netback: " Wei Liu
@ 2015-09-09 10:23 ` Wei Liu
  2015-09-09 10:24   ` David Vrabel
  2015-09-10  4:53 ` [PATCH net v2 0/2] xen-net{front,back}: " David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Wei Liu @ 2015-09-09 10:23 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>
---
 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..0b53bd9 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 (xenvif_max_queues == 0)
+		xenvif_max_queues = num_online_cpus();
 
 	return xenbus_register_frontend(&netfront_driver);
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 2/2] xen-netfront: respect user provided max_queues
  2015-09-09 10:23 ` [PATCH net v2 2/2] xen-netfront: " Wei Liu
@ 2015-09-09 10:24   ` David Vrabel
  0 siblings, 0 replies; 7+ messages in thread
From: David Vrabel @ 2015-09-09 10:24 UTC (permalink / raw)
  To: Wei Liu, Xen-devel, netdev

On 09/09/15 11:23, 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>

Thanks.

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues
  2015-09-09 10:23 [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
  2015-09-09 10:23 ` [PATCH net v2 1/2] xen-netback: " Wei Liu
  2015-09-09 10:23 ` [PATCH net v2 2/2] xen-netfront: " Wei Liu
@ 2015-09-10  4:53 ` David Miller
  2015-09-10  5:05   ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2015-09-10  4:53 UTC (permalink / raw)
  To: wei.liu2; +Cc: xen-devel, netdev

From: Wei Liu <wei.liu2@citrix.com>
Date: Wed, 9 Sep 2015 11:23:04 +0100

> Wei Liu (2):
>   xen-netback: respect user provided max_queues
>   xen-netfront: respect user provided max_queues

Both applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues
  2015-09-10  4:53 ` [PATCH net v2 0/2] xen-net{front,back}: " David Miller
@ 2015-09-10  5:05   ` David Miller
  2015-09-10  9:05     ` Wei Liu
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2015-09-10  5:05 UTC (permalink / raw)
  To: wei.liu2; +Cc: xen-devel, netdev

From: David Miller <davem@davemloft.net>
Date: Wed, 09 Sep 2015 21:53:22 -0700 (PDT)

> From: Wei Liu <wei.liu2@citrix.com>
> Date: Wed, 9 Sep 2015 11:23:04 +0100
> 
>> Wei Liu (2):
>>   xen-netback: respect user provided max_queues
>>   xen-netfront: respect user provided max_queues
> 
> Both applied, thanks.

Yo, this doesn't even compile!

drivers/net/xen-netfront.c: In function ‘netif_init’:
drivers/net/xen-netfront.c:2138:6: error: ‘xenvif_max_queues’ undeclared (first use in this function)
  if (xenvif_max_queues == 0)
      ^
drivers/net/xen-netfront.c:2138:6: note: each undeclared identifier is reported only once for each function it appears in


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues
  2015-09-10  5:05   ` David Miller
@ 2015-09-10  9:05     ` Wei Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2015-09-10  9:05 UTC (permalink / raw)
  To: David Miller; +Cc: wei.liu2, xen-devel, netdev

On Wed, Sep 09, 2015 at 10:05:53PM -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 09 Sep 2015 21:53:22 -0700 (PDT)
> 
> > From: Wei Liu <wei.liu2@citrix.com>
> > Date: Wed, 9 Sep 2015 11:23:04 +0100
> > 
> >> Wei Liu (2):
> >>   xen-netback: respect user provided max_queues
> >>   xen-netfront: respect user provided max_queues
> > 
> > Both applied, thanks.
> 
> Yo, this doesn't even compile!
> 
> drivers/net/xen-netfront.c: In function ‘netif_init’:
> drivers/net/xen-netfront.c:2138:6: error: ‘xenvif_max_queues’ undeclared (first use in this function)
>   if (xenvif_max_queues == 0)
>       ^
> drivers/net/xen-netfront.c:2138:6: note: each undeclared identifier is reported only once for each function it appears in
> 

Sorry about this.

I will send an updated version.

Wei.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-10  9:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 10:23 [PATCH net v2 0/2] xen-net{front,back}: respect user provided max_queues Wei Liu
2015-09-09 10:23 ` [PATCH net v2 1/2] xen-netback: " Wei Liu
2015-09-09 10:23 ` [PATCH net v2 2/2] xen-netfront: " Wei Liu
2015-09-09 10:24   ` David Vrabel
2015-09-10  4:53 ` [PATCH net v2 0/2] xen-net{front,back}: " David Miller
2015-09-10  5:05   ` David Miller
2015-09-10  9:05     ` Wei Liu

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).