All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure
@ 2018-01-04  6:33 Zhiyong Yang
  2018-01-09 13:23 ` Yuanhan Liu
  2018-01-10  6:01 ` [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve " Zhiyong Yang
  0 siblings, 2 replies; 5+ messages in thread
From: Zhiyong Yang @ 2018-01-04  6:33 UTC (permalink / raw)
  To: dev; +Cc: stable, Zhiyong Yang

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

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 */
-- 
2.13.3

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

* Re: [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure
  2018-01-04  6:33 [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure Zhiyong Yang
@ 2018-01-09 13:23 ` Yuanhan Liu
  2018-01-10  1:26   ` Yang, Zhiyong
  2018-01-10  6:01 ` [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve " Zhiyong Yang
  1 sibling, 1 reply; 5+ messages in thread
From: Yuanhan Liu @ 2018-01-09 13:23 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: dev, stable

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

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

* Re: [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure
  2018-01-09 13:23 ` Yuanhan Liu
@ 2018-01-10  1:26   ` Yang, Zhiyong
  0 siblings, 0 replies; 5+ messages in thread
From: Yang, Zhiyong @ 2018-01-10  1:26 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev, stable

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

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

* [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve startup failure
  2018-01-04  6:33 [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure Zhiyong Yang
  2018-01-09 13:23 ` Yuanhan Liu
@ 2018-01-10  6:01 ` Zhiyong Yang
  2018-01-10 12:36   ` Yuanhan Liu
  1 sibling, 1 reply; 5+ messages in thread
From: Zhiyong Yang @ 2018-01-10  6:01 UTC (permalink / raw)
  To: dev; +Cc: yliu, stable, Zhiyong Yang

For vhost sample, the operation if (dev_info.max_rx_queues >
MAX_QUEUES) in the function port_init causes startup failure
when using X710(i40e driver). X710 requires that MAX_QUEUES
should be defined no less than 320, however it is defined as
128 currently.

Such checking is overkill and Removal don't affect any
functionality (have already validated ixgbe and i40e).

The removal can avoid similar issue when introduing new physical
NIC.

Fixes: 8bd6c395a568("examples/vhost: increase maximum queue number")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---

Changes in V2:
1. Remove the checking instead of redefine macro "MAX_QUEUES"

 examples/vhost/main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 10a7f5d32..1f532fe3b 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -279,12 +279,6 @@ port_init(uint16_t port)
 	/* The max pool number from dev_info will be used to validate the pool number specified in cmd line */
 	rte_eth_dev_info_get (port, &dev_info);
 
-	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__);
-	}
-
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
 	rxconf->rx_drop_en = 1;
-- 
2.13.3

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

* Re: [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve startup failure
  2018-01-10  6:01 ` [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve " Zhiyong Yang
@ 2018-01-10 12:36   ` Yuanhan Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2018-01-10 12:36 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: dev, stable

On Wed, Jan 10, 2018 at 02:01:01PM +0800, Zhiyong Yang wrote:
> For vhost sample, the operation if (dev_info.max_rx_queues >
> MAX_QUEUES) in the function port_init causes startup failure
> when using X710(i40e driver). X710 requires that MAX_QUEUES
> should be defined no less than 320, however it is defined as
> 128 currently.
> 
> Such checking is overkill and Removal don't affect any
> functionality (have already validated ixgbe and i40e).
> 
> The removal can avoid similar issue when introduing new physical
> NIC.
> 
> Fixes: 8bd6c395a568("examples/vhost: increase maximum queue number")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu

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

end of thread, other threads:[~2018-01-10 12:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04  6:33 [PATCH] examples/vhost: fix extend MAX_QUEUES to resolve startup failure Zhiyong Yang
2018-01-09 13:23 ` Yuanhan Liu
2018-01-10  1:26   ` Yang, Zhiyong
2018-01-10  6:01 ` [PATCH v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve " Zhiyong Yang
2018-01-10 12:36   ` Yuanhan Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.