[dpdk-dev,10/38] app/test: don't short-circuit null device creation

Message ID 1488794430-25179-11-git-send-email-jblunck@infradead.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Jan Blunck March 6, 2017, 10 a.m. UTC
  A virtual device should get initialized through the rte_eal_vdev_init()
function to properly initialize the driver.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 drivers/net/null/rte_eth_null.c       | 1 +
 test/test/test_link_bonding_rssconf.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index f4242b0..b856073 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -50,6 +50,7 @@  static unsigned default_packet_copy;
 static const char *valid_arguments[] = {
 	ETH_NULL_PACKET_SIZE_ARG,
 	ETH_NULL_PACKET_COPY_ARG,
+	"driver",
 	NULL
 };
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 34f1c16..1023f7f 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -552,7 +552,8 @@  test_setup(void)
 		port_id = rte_eth_dev_count();
 		snprintf(name, sizeof(name), SLAVE_DEV_NAME_FMT, port_id);
 
-		retval = eth_dev_null_create(name, 0, 64, 0);
+		retval = rte_eal_vdev_init(name,
+			"driver=net_null,size=64,copy=0");
 		TEST_ASSERT_SUCCESS(retval, "Failed to create null device '%s'\n",
 				name);