Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com>
---
 app/test/virtual_pmd.c | 10 ++++++++++
 app/test/virtual_pmd.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 615243e19aed..f2d807de8d89 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -639,3 +639,13 @@ virtual_ethdev_set_dev_flags(uint16_t port_id, uint32_t 
dev_flags)
 
        return 0;
 }
+
+int
+virtual_ethdev_get_dev_data(uint16_t port_id, struct rte_eth_dev_data **data)
+{
+       struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
+
+       *data = eth_dev->data;
+
+       return 0;
+}
diff --git a/app/test/virtual_pmd.h b/app/test/virtual_pmd.h
index 80d5d343579a..374bb4148f96 100644
--- a/app/test/virtual_pmd.h
+++ b/app/test/virtual_pmd.h
@@ -80,6 +80,10 @@ virtual_ethdev_ops_get(uint16_t port_id);
 int
 virtual_ethdev_set_dev_flags(uint16_t port_id, uint32_t dev_flags);
 
+/* Get device data for various checks */
+int
+virtual_ethdev_get_dev_data(uint16_t port_id, struct rte_eth_dev_data **data);
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.31.1

Reply via email to