[dpdk-dev] examples/vhost: fix extend MAX_QUEUES to resolve startup failure

Message ID 20180104063332.5248-1-zhiyong.yang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Yuanhan Liu
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yang, Zhiyong Jan. 4, 2018, 6:33 a.m. UTC
  When binding X710 NIC (i40e driver) to DPDK, vhost sample startups
failure.
The sample requires that MAX_QUEUES should be defined no less than 320.
So, the patch redefines MAX_QUEUES 320 to fix the issue.

Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 examples/vhost/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yuanhan Liu Jan. 9, 2018, 1:23 p.m. UTC | #1
On Thu, Jan 04, 2018 at 02:33:32PM +0800, Zhiyong Yang wrote:
> When binding X710 NIC (i40e driver) to DPDK, vhost sample startups
> failure.
> The sample requires that MAX_QUEUES should be defined no less than 320.
> So, the patch redefines MAX_QUEUES 320 to fix the issue.

It just makes the issue disappear. It doesn't really fix the issue.
And I belive we have tried to fix this kind of issues in this way
many times. (just check the git history). As you known, none of them
really worked. You just added one more try, which is very likely
will be broken again when Intel has one more new NIC.

The error comes from:

        if (dev_info.max_rx_queues > MAX_QUEUES) {
                rte_exit(EXIT_FAILURE,
                        "please define MAX_QUEUES no less than %u in %s\n",
                        dev_info.max_rx_queues, __FILE__);
        }

I think such check is overkill and we don't really need that. Could
you just remove such check and do some validations on few difference
nics?

Thanks.

	--yliu
  
Yang, Zhiyong Jan. 10, 2018, 1:26 a.m. UTC | #2
Yuanhan,

> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Tuesday, January 9, 2018 9:24 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix extend MAX_QUEUES
> to resolve startup failure
> 
> On Thu, Jan 04, 2018 at 02:33:32PM +0800, Zhiyong Yang wrote:
> > When binding X710 NIC (i40e driver) to DPDK, vhost sample startups
> > failure.
> > The sample requires that MAX_QUEUES should be defined no less than 320.
> > So, the patch redefines MAX_QUEUES 320 to fix the issue.
> 
> It just makes the issue disappear. It doesn't really fix the issue.
> And I belive we have tried to fix this kind of issues in this way many times.
> (just check the git history). As you known, none of them really worked. You
> just added one more try, which is very likely will be broken again when Intel
> has one more new NIC.
> 
> The error comes from:
> 
>         if (dev_info.max_rx_queues > MAX_QUEUES) {
>                 rte_exit(EXIT_FAILURE,
>                         "please define MAX_QUEUES no less than %u in %s\n",
>                         dev_info.max_rx_queues, __FILE__);
>         }
> 
> I think such check is overkill and we don't really need that. Could you just
> remove such check and do some validations on few difference nics?
> 

Agreed, Such check doesn't help anything, Let me send V2 to remove it if nothing  can be affected.

Thanks
Zhiyong

> Thanks.
> 
> 	--yliu
  

Patch

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 89a61f0e5..487cc530e 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -57,7 +57,7 @@ 
 #include "main.h"
 
 #ifndef MAX_QUEUES
-#define MAX_QUEUES 128
+#define MAX_QUEUES 320
 #endif
 
 /* the maximum number of external ports supported */