[dpdk-dev,v2] examples/vhost: fix remove dev_info.max_rx_queues checking to solve startup failure

Message ID 20180110060101.26038-1-zhiyong.yang@intel.com (mailing list archive)
State Accepted, 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. 10, 2018, 6:01 a.m. UTC
  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(-)
  

Comments

Yuanhan Liu Jan. 10, 2018, 12:36 p.m. UTC | #1
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
  

Patch

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;