test: do not short-circuit null device creation
authorJan Blunck <jblunck@infradead.org>
Tue, 11 Apr 2017 15:44:16 +0000 (17:44 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 18 Apr 2017 17:02:45 +0000 (19:02 +0200)
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>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/null/rte_eth_null.c
test/test/test_link_bonding_rssconf.c

index a7b57bc..4a0d07d 100644 (file)
@@ -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
 };
 
index ba7163e..12602f1 100644 (file)
@@ -551,7 +551,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);