summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2017-07-07 02:04:30 +0200
committerThomas Monjalon <thomas@monjalon.net>2017-07-09 00:09:16 +0200
commitf3a1188cee4a5f2599fb88f17b237fbe03127d6e (patch)
tree8f07b60ff4fdd7c44ea39b01155b19bc5fcd6999 /test
parent02823c1db0bc4525b05c48fb301413d232b231ee (diff)
downloaddpdk-f3a1188cee4a5f2599fb88f17b237fbe03127d6e.zip
dpdk-f3a1188cee4a5f2599fb88f17b237fbe03127d6e.tar.gz
dpdk-f3a1188cee4a5f2599fb88f17b237fbe03127d6e.tar.xz
devargs: make device representation generic
Remove the dependency of this subsystem upon bus specific device representation. Devargs only validates that a device declaration is correct and handled by a bus. The device interpretation is done afterward within the bus. Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_devargs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/test/test_devargs.c b/test/test/test_devargs.c
index 63242f1..18f54ed 100644
--- a/test/test/test_devargs.c
+++ b/test/test/test_devargs.c
@@ -90,8 +90,8 @@ test_devargs(void)
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, "net_ring1",
- sizeof(devargs->virt.drv_name)) != 0)
+ if (strncmp(devargs->name, "net_ring1",
+ sizeof(devargs->name)) != 0)
goto fail;
if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
goto fail;
@@ -101,10 +101,7 @@ test_devargs(void)
if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "04:00.1") < 0)
goto fail;
devargs = TAILQ_FIRST(&devargs_list);
- if (devargs->pci.addr.domain != 0 ||
- devargs->pci.addr.bus != 4 ||
- devargs->pci.addr.devid != 0 ||
- devargs->pci.addr.function != 1)
+ if (strcmp(devargs->name, "04:00.1") != 0)
goto fail;
if (!devargs->args || strcmp(devargs->args, "") != 0)
goto fail;