summaryrefslogtreecommitdiff
path: root/lib/librte_rawdev
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-07-02 10:56:08 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-07-02 17:04:30 +0200
commit863fd2930bbe9c982b042584d513d190487c983a (patch)
tree6add51b9e9bbee07c6c96801cb4455c96e9be752 /lib/librte_rawdev
parent88a81bcecb7b94ec3b0b1760bf7ab034df61cf8d (diff)
downloaddpdk-863fd2930bbe9c982b042584d513d190487c983a.zip
dpdk-863fd2930bbe9c982b042584d513d190487c983a.tar.gz
dpdk-863fd2930bbe9c982b042584d513d190487c983a.tar.xz
rawdev: pass the device id as parameter to selftest
When running self-tests, the driver needs to know the device on which to run the tests, so we need to take the device ID as parameter. Only the skeleton driver is providing this selftest capability right now, so we can easily update it for this change. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Diffstat (limited to 'lib/librte_rawdev')
-rw-r--r--lib/librte_rawdev/rte_rawdev.c2
-rw-r--r--lib/librte_rawdev/rte_rawdev_pmd.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index 2b2f45d..15de2d4 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -378,7 +378,7 @@ rte_rawdev_selftest(uint16_t dev_id)
struct rte_rawdev *dev = &rte_rawdevs[dev_id];
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_selftest, -ENOTSUP);
- return (*dev->dev_ops->dev_selftest)();
+ return (*dev->dev_ops->dev_selftest)(dev_id);
}
int
diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
index 5e6cf1d..aa6af4a 100644
--- a/lib/librte_rawdev/rte_rawdev_pmd.h
+++ b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -499,7 +499,7 @@ typedef int (*rawdev_firmware_unload_t)(struct rte_rawdev *dev);
* @return
* Return 0 on success
*/
-typedef int (*rawdev_selftest_t)(void);
+typedef int (*rawdev_selftest_t)(uint16_t dev_id);
/** Rawdevice operations function pointer table */
struct rte_rawdev_ops {