* Re: [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues
2021-09-10 13:52 [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues Wenwu Ma
@ 2021-09-10 2:12 ` Jiang, Cheng1
2021-09-10 3:17 ` Xia, Chenbo
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Jiang, Cheng1 @ 2021-09-10 2:12 UTC (permalink / raw)
To: Ma, WenwuX, dev; +Cc: maxime.coquelin, Xia, Chenbo, Hu, Jiayu, Wang, Yinan
Acked-by: Cheng Jiang <cheng1.jiang@intel.com>
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Friday, September 10, 2021 9:52 PM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>;
> Jiang, Cheng1 <cheng1.jiang@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>;
> Wang, Yinan <yinan.wang@intel.com>; Ma, WenwuX
> <wenwux.ma@intel.com>
> Subject: [PATCH] examples/vhost: change the default value of NIC's max
> queues
>
> vswitch can't launch with 40G FTV due to Device start fails if NIC’s max
> queues > the default number of 128, so, we changed the default value from
> 128 to 512.
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c index
> bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
> --
> 2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues
2021-09-10 13:52 [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues Wenwu Ma
2021-09-10 2:12 ` Jiang, Cheng1
@ 2021-09-10 3:17 ` Xia, Chenbo
2021-09-13 15:49 ` Maxime Coquelin
` (2 more replies)
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
2021-10-15 20:01 ` [dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues Wenwu Ma
3 siblings, 3 replies; 15+ messages in thread
From: Xia, Chenbo @ 2021-09-10 3:17 UTC (permalink / raw)
To: Ma, WenwuX, dev; +Cc: maxime.coquelin, Jiang, Cheng1, Hu, Jiayu, Wang, Yinan
Hi Wenwu,
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Friday, September 10, 2021 9:52 PM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Jiang,
> Cheng1 <cheng1.jiang@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>; Wang, Yinan
> <yinan.wang@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>
> Subject: [PATCH] examples/vhost: change the default value of NIC's max queues
>
> vswitch can't launch with 40G FTV due to Device start fails
Not many people can understand what's FTV. So let's describe it with a driver
name. Example if it's 'i40e':
vswitch can't launch with a 40G i40e port...
And Device -> device
> if NIC’s max queues > the default number of 128,
> so, we changed the default value from 128 to 512.
>
I'd say it's not cool to still hard-code the MAX_QUEUES so that only 'some' NICs
can work with the example. The app should have a way to check this kind of info
before init/start. But as I would like to see at some point, this example will
be removed and all our tests go to testpmd. Let's not waste too much effort on
this example.
Besides: it can be a fix. Let's backport it.
Thanks,
Chenbo
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
> --
> 2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues
2021-09-10 3:17 ` Xia, Chenbo
@ 2021-09-13 15:49 ` Maxime Coquelin
2021-10-15 7:30 ` Maxime Coquelin
2021-10-15 8:52 ` David Marchand
2 siblings, 0 replies; 15+ messages in thread
From: Maxime Coquelin @ 2021-09-13 15:49 UTC (permalink / raw)
To: Xia, Chenbo, Ma, WenwuX, dev; +Cc: Jiang, Cheng1, Hu, Jiayu, Wang, Yinan
On 9/10/21 5:17 AM, Xia, Chenbo wrote:
> Hi Wenwu,
>
>> -----Original Message-----
>> From: Ma, WenwuX <wenwux.ma@intel.com>
>> Sent: Friday, September 10, 2021 9:52 PM
>> To: dev@dpdk.org
>> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Jiang,
>> Cheng1 <cheng1.jiang@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>; Wang, Yinan
>> <yinan.wang@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>
>> Subject: [PATCH] examples/vhost: change the default value of NIC's max queues
>>
>> vswitch can't launch with 40G FTV due to Device start fails
>
> Not many people can understand what's FTV. So let's describe it with a driver
> name. Example if it's 'i40e':
>
> vswitch can't launch with a 40G i40e port...
>
> And Device -> device
>
>> if NIC’s max queues > the default number of 128,
>> so, we changed the default value from 128 to 512.
>>
>
> I'd say it's not cool to still hard-code the MAX_QUEUES so that only 'some' NICs
> can work with the example. The app should have a way to check this kind of info
> before init/start. But as I would like to see at some point, this example will
> be removed and all our tests go to testpmd. Let's not waste too much effort on
> this example.
+1 on this, I agree with Chenbo it is better to invest time in porting
existing tests to testpmd.
>
> Besides: it can be a fix. Let's backport it.
>
> Thanks,
> Chenbo
>
>> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
>> ---
>> examples/vhost/main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
>> index bc3d71c898..36969a4de5 100644
>> --- a/examples/vhost/main.c
>> +++ b/examples/vhost/main.c
>> @@ -29,7 +29,7 @@
>> #include "main.h"
>>
>> #ifndef MAX_QUEUES
>> -#define MAX_QUEUES 128
>> +#define MAX_QUEUES 512
>> #endif
>>
>> /* the maximum number of external ports supported */
>> --
>> 2.25.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues
2021-09-10 3:17 ` Xia, Chenbo
2021-09-13 15:49 ` Maxime Coquelin
@ 2021-10-15 7:30 ` Maxime Coquelin
2021-10-15 8:52 ` David Marchand
2 siblings, 0 replies; 15+ messages in thread
From: Maxime Coquelin @ 2021-10-15 7:30 UTC (permalink / raw)
To: Xia, Chenbo, Ma, WenwuX, dev; +Cc: Jiang, Cheng1, Hu, Jiayu, Wang, Yinan
Hi,
On 9/10/21 05:17, Xia, Chenbo wrote:
> Hi Wenwu,
>
>> -----Original Message-----
>> From: Ma, WenwuX <wenwux.ma@intel.com>
>> Sent: Friday, September 10, 2021 9:52 PM
>> To: dev@dpdk.org
>> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Jiang,
>> Cheng1 <cheng1.jiang@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>; Wang, Yinan
>> <yinan.wang@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>
>> Subject: [PATCH] examples/vhost: change the default value of NIC's max queues
>>
>> vswitch can't launch with 40G FTV due to Device start fails
>
> Not many people can understand what's FTV. So let's describe it with a driver
> name. Example if it's 'i40e':
>
> vswitch can't launch with a 40G i40e port...
>
> And Device -> device
>
>> if NIC’s max queues > the default number of 128,
>> so, we changed the default value from 128 to 512.
>>
>
> I'd say it's not cool to still hard-code the MAX_QUEUES so that only 'some' NICs
> can work with the example. The app should have a way to check this kind of info
> before init/start. But as I would like to see at some point, this example will
> be removed and all our tests go to testpmd. Let's not waste too much effort on
> this example.
>
> Besides: it can be a fix. Let's backport it.
>
> Thanks,
> Chenbo
>
>> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
>> ---
>> examples/vhost/main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
>> index bc3d71c898..36969a4de5 100644
>> --- a/examples/vhost/main.c
>> +++ b/examples/vhost/main.c
>> @@ -29,7 +29,7 @@
>> #include "main.h"
>>
>> #ifndef MAX_QUEUES
>> -#define MAX_QUEUES 128
>> +#define MAX_QUEUES 512
>> #endif
>>
>> /* the maximum number of external ports supported */
>> --
>> 2.25.1
>
Are you planning to post a new revision handling Chenbo's comments?
Thanks,
Maxime
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues
2021-09-10 3:17 ` Xia, Chenbo
2021-09-13 15:49 ` Maxime Coquelin
2021-10-15 7:30 ` Maxime Coquelin
@ 2021-10-15 8:52 ` David Marchand
2 siblings, 0 replies; 15+ messages in thread
From: David Marchand @ 2021-10-15 8:52 UTC (permalink / raw)
To: Xia, Chenbo
Cc: Ma, WenwuX, dev, maxime.coquelin, Jiang, Cheng1, Hu, Jiayu, Wang, Yinan
On Fri, Sep 10, 2021 at 5:17 AM Xia, Chenbo <chenbo.xia@intel.com> wrote:
> > if NIC’s max queues > the default number of 128,
> > so, we changed the default value from 128 to 512.
> >
>
> I'd say it's not cool to still hard-code the MAX_QUEUES so that only 'some' NICs
> can work with the example. The app should have a way to check this kind of info
+1...
> before init/start. But as I would like to see at some point, this example will
> be removed and all our tests go to testpmd. Let's not waste too much effort on
> this example.
And +1, this example is a mess.
--
David Marchand
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v3] examples/vhost: change the default value of NIC's max queues
2021-09-10 13:52 [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues Wenwu Ma
2021-09-10 2:12 ` Jiang, Cheng1
2021-09-10 3:17 ` Xia, Chenbo
@ 2021-10-15 16:48 ` Wenwu Ma
2021-10-21 11:29 ` Maxime Coquelin
` (3 more replies)
2021-10-15 20:01 ` [dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues Wenwu Ma
3 siblings, 4 replies; 15+ messages in thread
From: Wenwu Ma @ 2021-10-15 16:48 UTC (permalink / raw)
To: dev
Cc: maxime.coquelin, chenbo.xia, cheng1.jiang, jiayu.hu,
yvonnex.yang, Wenwu Ma, stable
vswitch can't launch with a 40G i40e port due to device start fails
if NIC’s max queues > the default number of 128, so, we changed
the default value from 128 to 512.
Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
Cc: stable@dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
examples/vhost/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index bc3d71c898..36969a4de5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -29,7 +29,7 @@
#include "main.h"
#ifndef MAX_QUEUES
-#define MAX_QUEUES 128
+#define MAX_QUEUES 512
#endif
/* the maximum number of external ports supported */
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v3] examples/vhost: change the default value of NIC's max queues
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
@ 2021-10-21 11:29 ` Maxime Coquelin
2021-10-21 12:34 ` Maxime Coquelin
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Maxime Coquelin @ 2021-10-21 11:29 UTC (permalink / raw)
To: Wenwu Ma, dev; +Cc: chenbo.xia, cheng1.jiang, jiayu.hu, yvonnex.yang, stable
On 10/15/21 18:48, Wenwu Ma wrote:
> vswitch can't launch with a 40G i40e port due to device start fails
> if NIC’s max queues > the default number of 128, so, we changed
> the default value from 128 to 512.
>
> Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
>
As discussed, this is far from ideal, but let's use our time to remove
gaps in Vhost testing with testpmd so that we can remove this example
later.
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v3] examples/vhost: change the default value of NIC's max queues
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
2021-10-21 11:29 ` Maxime Coquelin
@ 2021-10-21 12:34 ` Maxime Coquelin
2021-10-21 17:10 ` Ferruh Yigit
2021-11-03 14:17 ` [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost Wenwu Ma
3 siblings, 0 replies; 15+ messages in thread
From: Maxime Coquelin @ 2021-10-21 12:34 UTC (permalink / raw)
To: Wenwu Ma, dev; +Cc: chenbo.xia, cheng1.jiang, jiayu.hu, yvonnex.yang, stable
On 10/15/21 18:48, Wenwu Ma wrote:
> vswitch can't launch with a 40G i40e port due to device start fails
> if NIC’s max queues > the default number of 128, so, we changed
> the default value from 128 to 512.
>
> Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v3] examples/vhost: change the default value of NIC's max queues
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
2021-10-21 11:29 ` Maxime Coquelin
2021-10-21 12:34 ` Maxime Coquelin
@ 2021-10-21 17:10 ` Ferruh Yigit
2021-11-03 14:17 ` [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost Wenwu Ma
3 siblings, 0 replies; 15+ messages in thread
From: Ferruh Yigit @ 2021-10-21 17:10 UTC (permalink / raw)
To: Wenwu Ma, dev
Cc: maxime.coquelin, chenbo.xia, cheng1.jiang, jiayu.hu,
yvonnex.yang, stable
On 10/15/2021 5:48 PM, Wenwu Ma wrote:
> vswitch can't launch with a 40G i40e port due to device start fails
what is 'vswitch' that is referred? I expect what can't launch should
be this sample app but why referring it as 'vswitch'?
Also patch title describes what is done, better to describe why it is done,
like:
examples/vhost: fix init for devices that has big max queue number
btw, why a device with big max queue number causes failure in the sample app?
Can you please provide more detail on the error? What and why fails on
device start?
> if NIC’s max queues > the default number of 128, so, we changed
> the default value from 128 to 512.
>
> Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
` (2 preceding siblings ...)
2021-10-21 17:10 ` Ferruh Yigit
@ 2021-11-03 14:17 ` Wenwu Ma
2021-11-03 4:58 ` Xia, Chenbo
3 siblings, 1 reply; 15+ messages in thread
From: Wenwu Ma @ 2021-11-03 14:17 UTC (permalink / raw)
To: dev
Cc: maxime.coquelin, chenbo.xia, ferruh.yigit, cheng1.jiang,
jiayu.hu, yvonnex.yang, Wenwu Ma, stable
When the default max queue value of vhost is 128, dpdk-vhost will fail to
launch with a 40G i40e port due to the mbuf allocation of the port queue fails.
Therefore, we modify the default value of max queue from 128 to 512,
it will ensure that there are enough mbufs.
Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
Cc: stable@dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
examples/vhost/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index bc3d71c898..36969a4de5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -29,7 +29,7 @@
#include "main.h"
#ifndef MAX_QUEUES
-#define MAX_QUEUES 128
+#define MAX_QUEUES 512
#endif
/* the maximum number of external ports supported */
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
2021-11-03 14:17 ` [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost Wenwu Ma
@ 2021-11-03 4:58 ` Xia, Chenbo
2021-11-03 8:07 ` Maxime Coquelin
0 siblings, 1 reply; 15+ messages in thread
From: Xia, Chenbo @ 2021-11-03 4:58 UTC (permalink / raw)
To: Ma, WenwuX, dev
Cc: maxime.coquelin, Yigit, Ferruh, Jiang, Cheng1, Hu, Jiayu, Yang,
YvonneX, stable
Hi,
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Wednesday, November 3, 2021 10:17 PM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Yigit,
> Ferruh <ferruh.yigit@intel.com>; Jiang, Cheng1 <cheng1.jiang@intel.com>; Hu,
> Jiayu <jiayu.hu@intel.com>; Yang, YvonneX <yvonnex.yang@intel.com>; Ma, WenwuX
> <wenwux.ma@intel.com>; stable@dpdk.org
> Subject: [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
>
> When the default max queue value of vhost is 128, dpdk-vhost will fail to
> launch with a 40G i40e port due to the mbuf allocation of the port queue fails.
> Therefore, we modify the default value of max queue from 128 to 512,
> it will ensure that there are enough mbufs.
>
> Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
> Cc: stable@dpdk.org
When I was tracking the bad commit, I notice this change is on purpose to save hugepages:
commit f17eb179046962fdc29c3609b1c9bd46bfefa4f5
Author: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Thu Dec 10 15:49:17 2015 +0000
examples/vhost: reduce number of hugepages needed
Add #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed.
Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages
required by the vhost-switch program.
To change MAX_QUEUES add '-D MAX_QUEUES=512' to the EXTRA_CFLAGS variable,
before building the application.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
So as there's a way to solve the problem (although not perfect), I would suggest
using the compiler flag to do tests with the specific NIC.
If no one has objection, let's drop the patch.
Thanks,
Chenbo
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
> --
> 2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
2021-11-03 4:58 ` Xia, Chenbo
@ 2021-11-03 8:07 ` Maxime Coquelin
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Coquelin @ 2021-11-03 8:07 UTC (permalink / raw)
To: Xia, Chenbo, Ma, WenwuX, dev
Cc: Yigit, Ferruh, Jiang, Cheng1, Hu, Jiayu, Yang, YvonneX, stable
Hi Chenbo,
On 11/3/21 05:58, Xia, Chenbo wrote:
> Hi,
>
>> -----Original Message-----
>> From: Ma, WenwuX <wenwux.ma@intel.com>
>> Sent: Wednesday, November 3, 2021 10:17 PM
>> To: dev@dpdk.org
>> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Yigit,
>> Ferruh <ferruh.yigit@intel.com>; Jiang, Cheng1 <cheng1.jiang@intel.com>; Hu,
>> Jiayu <jiayu.hu@intel.com>; Yang, YvonneX <yvonnex.yang@intel.com>; Ma, WenwuX
>> <wenwux.ma@intel.com>; stable@dpdk.org
>> Subject: [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
>>
>> When the default max queue value of vhost is 128, dpdk-vhost will fail to
>> launch with a 40G i40e port due to the mbuf allocation of the port queue fails.
>> Therefore, we modify the default value of max queue from 128 to 512,
>> it will ensure that there are enough mbufs.
>>
>> Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
>> Cc: stable@dpdk.org
>
> When I was tracking the bad commit, I notice this change is on purpose to save hugepages:
>
> commit f17eb179046962fdc29c3609b1c9bd46bfefa4f5
> Author: Bernard Iremonger <bernard.iremonger@intel.com>
> Date: Thu Dec 10 15:49:17 2015 +0000
>
> examples/vhost: reduce number of hugepages needed
>
> Add #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed.
> Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages
> required by the vhost-switch program.
>
> To change MAX_QUEUES add '-D MAX_QUEUES=512' to the EXTRA_CFLAGS variable,
> before building the application.
>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
> So as there's a way to solve the problem (although not perfect), I would suggest
> using the compiler flag to do tests with the specific NIC.
>
> If no one has objection, let's drop the patch.
I agree, let's drop it.
Thanks,
Maxime
> Thanks,
> Chenbo
>
>>
>> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
>> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> ---
>> examples/vhost/main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
>> index bc3d71c898..36969a4de5 100644
>> --- a/examples/vhost/main.c
>> +++ b/examples/vhost/main.c
>> @@ -29,7 +29,7 @@
>> #include "main.h"
>>
>> #ifndef MAX_QUEUES
>> -#define MAX_QUEUES 128
>> +#define MAX_QUEUES 512
>> #endif
>>
>> /* the maximum number of external ports supported */
>> --
>> 2.25.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues
2021-09-10 13:52 [dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues Wenwu Ma
` (2 preceding siblings ...)
2021-10-15 16:48 ` [dpdk-dev] [PATCH v3] " Wenwu Ma
@ 2021-10-15 20:01 ` Wenwu Ma
2021-10-15 8:21 ` Xia, Chenbo
3 siblings, 1 reply; 15+ messages in thread
From: Wenwu Ma @ 2021-10-15 20:01 UTC (permalink / raw)
To: dev
Cc: maxime.coquelin, chenbo.xia, cheng1.jiang, jiayu.hu,
yvonnex.yang, Wenwu Ma
vswitch can't launch with a 40G i40e port due to device start fails
if NIC’s max queues > the default number of 128, so, we changed
the default value from 128 to 512.
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
examples/vhost/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index bc3d71c898..36969a4de5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -29,7 +29,7 @@
#include "main.h"
#ifndef MAX_QUEUES
-#define MAX_QUEUES 128
+#define MAX_QUEUES 512
#endif
/* the maximum number of external ports supported */
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues
2021-10-15 20:01 ` [dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues Wenwu Ma
@ 2021-10-15 8:21 ` Xia, Chenbo
0 siblings, 0 replies; 15+ messages in thread
From: Xia, Chenbo @ 2021-10-15 8:21 UTC (permalink / raw)
To: Ma, WenwuX, dev; +Cc: maxime.coquelin, Jiang, Cheng1, Hu, Jiayu, Yang, YvonneX
> -----Original Message-----
> From: Ma, WenwuX <wenwux.ma@intel.com>
> Sent: Saturday, October 16, 2021 4:01 AM
Is your server time incorrect? You are sending patch from future
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; Jiang,
> Cheng1 <cheng1.jiang@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>; Yang, YvonneX
> <yvonnex.yang@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>
> Subject: [PATCH v2] examples/vhost: change the default value of NIC's max
> queues
>
> vswitch can't launch with a 40G i40e port due to device start fails
> if NIC’s max queues > the default number of 128, so, we changed
> the default value from 128 to 512.
Still missing fix and cc-stable tag.
/Chenbo
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
> examples/vhost/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index bc3d71c898..36969a4de5 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -29,7 +29,7 @@
> #include "main.h"
>
> #ifndef MAX_QUEUES
> -#define MAX_QUEUES 128
> +#define MAX_QUEUES 512
> #endif
>
> /* the maximum number of external ports supported */
> --
> 2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread