examples/vhost: change the default value of NIC's max queues
PATCH 1/1 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.
--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/vhost/main.c +1 -1
@@ -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 */
Signature · 1 line
2.25.1
Quoted 35 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Friday, September 10, 2021 9:52 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Wang, Yinan <[email protected]>; Ma, WenwuX <[email protected]>
Subject: [PATCH] examples/vhost: change the default value of NIC's max queuesvswitch 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 <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c index renamed from examples/vhost/main.c +0
-0
bc3d71c898..36969a4de5100644examples/vhost/main.c +1
-2@@ -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
Hi Wenwu,
Quoted 10 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Friday, September 10, 2021 9:52 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Wang, Yinan <[email protected]>; Ma, WenwuX <[email protected]>
Subject: [PATCH] examples/vhost: change the default value of NIC's max queuesvswitch 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
Quoted 3 lines
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
Quoted 20 lines
Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-2@@ -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
Quoted 24 lines · Chenbo
Hi Wenwu,
Quoted 10 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Friday, September 10, 2021 9:52 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Wang, Yinan <[email protected]>; Ma, WenwuX <[email protected]>
Subject: [PATCH] examples/vhost: change the default value of NIC's max queuesvswitch 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
Quoted 3 lines
if NIC’s max queues > the default number of 128,
so, we changed the default value from 128 to 512.
Quoted 5 lines
I'd say it's not cool to still hard-code the
MAX_QUEUESso 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.
Quoted 27 lines
Besides: it can be a fix. Let's backport it.
Thanks,
ChenboQuoted 20 lines
Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-2@@ -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
Hi,
Quoted 47 lines · Chenbo
Hi Wenwu,
Quoted 10 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Friday, September 10, 2021 9:52 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Wang, Yinan <[email protected]>; Ma, WenwuX <[email protected]>
Subject: [PATCH] examples/vhost: change the default value of NIC's max queuesvswitch 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
Quoted 3 lines
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_QUEUESso 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,
ChenboQuoted 12 lines
Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +0
-0@@ -29,7 +29,7 @@#include "main.h"
Quoted 9 lines
Quoted 8 lines
examples/vhost/main.c +1
-2#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
Quoted 6 lines · Chenbo
Quoted 3 lines
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_QUEUESso that only 'some' NICs can work with the example. The app should have a way to check this kind of info
+1...
Quoted 3 lines
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.
Signature · 1 line
David Marchand
PATCH v2 1/1 examples/vhost: change the default value of NIC's max queues
In reply to Wenwu Mavswitch 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.
--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/vhost/main.c +1 -1
@@ -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 */
Signature · 1 line
2.25.1
Quoted 3 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Saturday, October 16, 2021 4:01 AM
Is your server time incorrect? You are sending patch from future
Quoted 10 lines
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Yang, YvonneX <[email protected]>; Ma, WenwuX <[email protected]>
Subject: [PATCH v2] examples/vhost: change the default value of NIC's max queuesvswitch 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
Quoted 21 lines
Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-2@@ -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
PATCH v3 1/1 examples/vhost: change the default value of NIC's max queues
In reply to Wenwu Mavswitch 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.
--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/vhost/main.c +1 -1
@@ -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 */
Signature · 1 line
2.25.1
Quoted 18 lines · 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.
Fixes 4796ad63ba1f ("examples/vhost: import userspace vhost application")Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +0
-0
examples/vhost/main.c line 35
Quoted 8 lines
examples/vhost/main.c +1
-1@@ -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.
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 4 lines · 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.
Quoted 8 lines
Fixes 4796ad63ba1f ("examples/vhost: import userspace vhost application")Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
Quoted 1 line · Wenwu Ma
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?
Quoted 25 lines
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")Signed-off-by Wenwu Ma <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-1@@ -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 */
PATCH v4 1/1 examples/vhost: fix failure to launch dpdk-vhost
In reply to Wenwu MaWhen 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.
--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/vhost/main.c +1 -1
@@ -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 */
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
Hi,
Quoted 10 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Wednesday, November 3, 2021 10:17 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Yigit, Ferruh <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Yang, YvonneX <[email protected]>; Ma, WenwuX <[email protected]>; [email protected]
Subject: [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
Quoted 7 lines
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")
When I was tracking the bad commit, I notice this change is on purpose to save hugepages:
commit f17eb179046962fdc29c3609b1c9bd46bfefa4f5
Author: Bernard Iremonger <[email protected]> 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.
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
Quoted 22 lines
Signed-off-by Wenwu Ma <[email protected]>Reviewed-by Maxime Coquelin <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-2@@ -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
Re: [dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost
Hi Chenbo,
Quoted 35 lines · Chenbo
Hi,
Quoted 10 lines
-----Original Message-----
From: Ma, WenwuX <[email protected]>
Sent: Wednesday, November 3, 2021 10:17 PM
To: [email protected]
Cc: [email protected]; Xia, Chenbo <[email protected]>; Yigit, Ferruh <[email protected]>; Jiang, Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Yang, YvonneX <[email protected]>; Ma, WenwuX <[email protected]>; [email protected]
Subject: [PATCH v4] examples/vhost: fix failure to launch dpdk-vhostQuoted 7 lines
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")When I was tracking the bad commit, I notice this change is on purpose to save hugepages:
commit
f17eb179046962fdc29c3609b1c9bd46bfefa4f5Author: Bernard Iremonger <[email protected]> Date: Thu Dec 10 15:49:17 2015 +0000examples/vhost: reduce number of hugepages needed
Add #ifndef
MAX_QUEUESto changeMAX_QUEUESat compile time if needed. ChangeMAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.To change
MAX_QUEUESadd '-D MAX_QUEUES=512' to theEXTRA_CFLAGSvariable, before building the application.
Quoted 7 lines
Signed-off-by Bernard Iremonger <[email protected]>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
Quoted 26 lines
Thanks,
ChenboQuoted 22 lines
Signed-off-by Wenwu Ma <[email protected]>Reviewed-by Maxime Coquelin <[email protected]>--- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/vhost/main.c +1
-2@@ -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