test: do not short-circuit null device creation

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>
This commit is contained in:
Jan Blunck 2017-04-11 17:44:16 +02:00 committed by Thomas Monjalon
parent f02513445e
commit 87c3bf29c6
2 changed files with 3 additions and 1 deletions

View 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
};

View 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);