[RFC,v2,3/8] test/virtual_pmd: enable updating device flags
Checks
Commit Message
To be able to test various dev_flags.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test/virtual_pmd.c | 10 ++++++++++
app/test/virtual_pmd.h | 4 ++++
2 files changed, 14 insertions(+)
@@ -629,3 +629,13 @@ virtual_ethdev_ops_get(uint16_t port_id)
return dev_ops;
}
+
+int
+virtual_ethdev_set_dev_flags(uint16_t port_id, uint32_t dev_flags)
+{
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
+
+ eth_dev->data->dev_flags = dev_flags;
+
+ return 0;
+}
@@ -76,6 +76,10 @@ virtual_ethdev_tx_burst_fn_set_tx_pkt_fail_count(uint16_t port_id,
struct eth_dev_ops *
virtual_ethdev_ops_get(uint16_t port_id);
+/* For application to be able to alter the device flags */
+int
+virtual_ethdev_set_dev_flags(uint16_t port_id, uint32_t dev_flags);
+
#ifdef __cplusplus
}
#endif