app/test: fix vdev names
The vdev eth_ring has been renamed to net_ring.
Some unit tests are using the old name and fail.
Fixes also the vdev comments in EAL and ethdev.
Fixes: 2f45703c17
("drivers: make driver names consistent")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
parent
5ce434a642
commit
5fc07e3eb7
@ -78,19 +78,19 @@ test_devargs(void)
|
||||
goto fail;
|
||||
if (rte_eal_devargs_type_count(RTE_DEVTYPE_VIRTUAL) != 0)
|
||||
goto fail;
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring0") < 0)
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring0") < 0)
|
||||
goto fail;
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,key=val,k2=val2") < 0)
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring1,key=val,k2=val2") < 0)
|
||||
goto fail;
|
||||
if (rte_eal_devargs_type_count(RTE_DEVTYPE_VIRTUAL) != 2)
|
||||
goto fail;
|
||||
free_devargs_list();
|
||||
|
||||
/* check virtual device with argument parsing */
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
|
||||
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring1,k1=val,k2=val2") < 0)
|
||||
goto fail;
|
||||
devargs = TAILQ_FIRST(&devargs_list);
|
||||
if (strncmp(devargs->virt.drv_name, "eth_ring1",
|
||||
if (strncmp(devargs->virt.drv_name, "net_ring1",
|
||||
sizeof(devargs->virt.drv_name)) != 0)
|
||||
goto fail;
|
||||
if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
|
||||
|
@ -414,13 +414,13 @@ test_invalid_vdev_flag(void)
|
||||
|
||||
/* Test with valid vdev option */
|
||||
const char *vdevval1[] = {prgname, prefix, "-n", "1",
|
||||
"-c", "1", vdev, "eth_ring0"};
|
||||
"-c", "1", vdev, "net_ring0"};
|
||||
|
||||
const char *vdevval2[] = {prgname, prefix, "-n", "1",
|
||||
"-c", "1", vdev, "eth_ring0,args=test"};
|
||||
"-c", "1", vdev, "net_ring0,args=test"};
|
||||
|
||||
const char *vdevval3[] = {prgname, prefix, "-n", "1",
|
||||
"-c", "1", vdev, "eth_ring0,nodeaction=r1:0:CREATE"};
|
||||
"-c", "1", vdev, "net_ring0,nodeaction=r1:0:CREATE"};
|
||||
|
||||
if (launch_proc(vdevinval) == 0) {
|
||||
printf("Error - process did run ok with invalid "
|
||||
|
@ -434,7 +434,7 @@ test_pmd_ring(void)
|
||||
/* create the rings and eth_rings in the test code.
|
||||
* This does not test the rte_pmd_ring_devinit function.
|
||||
*
|
||||
* Test with the command line option --vdev=eth_ring0 to test rte_pmd_ring_devinit.
|
||||
* Test with the command line option --vdev=net_ring0 to test rte_pmd_ring_devinit.
|
||||
*/
|
||||
rxtx[0] = rte_ring_create("R0", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
|
||||
if (rxtx[0] == NULL) {
|
||||
@ -448,11 +448,11 @@ test_pmd_ring(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
tx_porta = rte_eth_from_rings("eth_ringa", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rx_portb = rte_eth_from_rings("eth_ringb", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_portc = rte_eth_from_rings("eth_ringc", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_portd = rte_eth_from_rings("eth_ringd", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_porte = rte_eth_from_rings("eth_ringe", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
tx_porta = rte_eth_from_rings("net_ringa", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rx_portb = rte_eth_from_rings("net_ringb", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_portc = rte_eth_from_rings("net_ringc", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_portd = rte_eth_from_rings("net_ringd", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
rxtx_porte = rte_eth_from_rings("net_ringe", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
|
||||
|
||||
printf("tx_porta=%d rx_portb=%d rxtx_portc=%d rxtx_portd=%d rxtx_porte=%d\n",
|
||||
tx_porta, rx_portb, rxtx_portc, rxtx_portd, rxtx_porte);
|
||||
@ -501,7 +501,7 @@ test_pmd_ring(void)
|
||||
if (test_pmd_ring_pair_create_attach(rxtx_portd, rxtx_porte) < 0)
|
||||
return -1;
|
||||
|
||||
/* find a port created with the --vdev=eth_ring0 command line option */
|
||||
/* find a port created with the --vdev=net_ring0 command line option */
|
||||
for (port = 0; port < nb_ports; port++) {
|
||||
struct rte_eth_dev_info dev_info;
|
||||
|
||||
|
@ -631,7 +631,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
|
||||
* @param devargs
|
||||
* A pointer to a strings array describing the new device
|
||||
* to be attached. The strings should be a pci address like
|
||||
* `0000:01:00.0` or **virtual** device name like `eth_pcap0`.
|
||||
* `0000:01:00.0` or **virtual** device name like `net_pcap0`.
|
||||
* @param port_id
|
||||
* A pointer to a port identifier actually attached.
|
||||
*
|
||||
@ -643,7 +643,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
|
||||
* Doxygen supports Markdown style syntax such as bold, italics, fixed width text and lists.
|
||||
For example the second line in the ``devargs`` parameter in the previous example will be rendered as:
|
||||
|
||||
The strings should be a pci address like ``0000:01:00.0`` or **virtual** device name like ``eth_pcap0``.
|
||||
The strings should be a pci address like ``0000:01:00.0`` or **virtual** device name like ``net_pcap0``.
|
||||
|
||||
* Use ``-`` instead of ``*`` for lists within the Doxygen comment since the latter can get confused with the comment delimiter.
|
||||
|
||||
|
@ -80,7 +80,7 @@ Port Hotplug API overview
|
||||
returns the attached port number. Before calling the API, the device
|
||||
should be recognized by an userspace driver I/O framework. The API
|
||||
receives a pci address like "0000:01:00.0" or a virtual device name
|
||||
like "eth_pcap0,iface=eth0". In the case of virtual device name, the
|
||||
like "net_pcap0,iface=eth0". In the case of virtual device name, the
|
||||
format is the same as the general "--vdev" option of DPDK.
|
||||
|
||||
* Detaching a port
|
||||
|
@ -1021,7 +1021,7 @@ eal_common_usage(void)
|
||||
" [NOTE: PCI whitelist cannot be used with -b option]\n"
|
||||
" --"OPT_VDEV" Add a virtual device.\n"
|
||||
" The argument format is <driver><id>[,key=val,...]\n"
|
||||
" (ex: --vdev=eth_pcap0,iface=eth2).\n"
|
||||
" (ex: --vdev=net_pcap0,iface=eth2).\n"
|
||||
" -d LIB.so|DIR Add a driver or driver directory\n"
|
||||
" (can be used multiple times)\n"
|
||||
" --"OPT_VMWARE_TSC_MAP" Use VMware TSC map instead of native RDTSC\n"
|
||||
|
@ -71,7 +71,7 @@ rte_eal_vdev_init(const char *name, const char *args)
|
||||
/*
|
||||
* search a driver prefix in virtual device name.
|
||||
* For example, if the driver is pcap PMD, driver->name
|
||||
* will be "eth_pcap", but "name" will be "eth_pcapN".
|
||||
* will be "net_pcap", but "name" will be "net_pcapN".
|
||||
* So use strncmp to compare.
|
||||
*/
|
||||
if (!strncmp(driver->driver.name, name,
|
||||
@ -95,7 +95,7 @@ rte_eal_vdev_uninit(const char *name)
|
||||
/*
|
||||
* search a driver prefix in virtual device name.
|
||||
* For example, if the driver is pcap PMD, driver->name
|
||||
* will be "eth_pcap", but "name" will be "eth_pcapN".
|
||||
* will be "net_pcap", but "name" will be "net_pcapN".
|
||||
* So use strncmp to compare.
|
||||
*/
|
||||
if (!strncmp(driver->driver.name, name,
|
||||
|
@ -107,8 +107,8 @@ extern struct rte_devargs_list devargs_list;
|
||||
* "04:00.0,arg=val".
|
||||
*
|
||||
* For virtual devices, the format of arguments string is "DRIVER_NAME*"
|
||||
* or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "eth_ring",
|
||||
* "eth_ring0", "eth_pmdAnything,arg=0:arg2=1".
|
||||
* or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "net_ring",
|
||||
* "net_ring0", "net_pmdAnything,arg=0:arg2=1".
|
||||
*
|
||||
* The function parses the arguments string to get driver name and driver
|
||||
* arguments.
|
||||
@ -135,8 +135,8 @@ int rte_eal_parse_devargs_str(const char *devargs_str,
|
||||
* "04:00.0,arg=val".
|
||||
*
|
||||
* For virtual devices, the format of arguments string is "DRIVER_NAME*"
|
||||
* or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "eth_ring",
|
||||
* "eth_ring0", "eth_pmdAnything,arg=0:arg2=1". The validity of the
|
||||
* or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "net_ring",
|
||||
* "net_ring0", "net_pmdAnything,arg=0:arg2=1". The validity of the
|
||||
* driver name is not checked by this function, it is done when probing
|
||||
* the drivers.
|
||||
*
|
||||
|
@ -1771,7 +1771,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
|
||||
* @param devargs
|
||||
* A pointer to a strings array describing the new device
|
||||
* to be attached. The strings should be a pci address like
|
||||
* '0000:01:00.0' or virtual device name like 'eth_pcap0'.
|
||||
* '0000:01:00.0' or virtual device name like 'net_pcap0'.
|
||||
* @param port_id
|
||||
* A pointer to a port identifier actually attached.
|
||||
* @return
|
||||
@ -4324,7 +4324,7 @@ rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
|
||||
|
||||
/**
|
||||
* Get the port id from pci adrress or device name
|
||||
* Ex: 0000:2:00.0 or vdev name eth_pcap0
|
||||
* Ex: 0000:2:00.0 or vdev name net_pcap0
|
||||
*
|
||||
* @param name
|
||||
* pci address or name of the device
|
||||
|
Loading…
Reference in New Issue
Block a user