All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 2/2] vmxnet3_dev_reset: Provided API to reset vmxnet device
@ 2021-01-02  7:12 Dheemanth Mallikarjun
  0 siblings, 0 replies; only message in thread
From: Dheemanth Mallikarjun @ 2021-01-02  7:12 UTC (permalink / raw)
  To: dev

Signed-off-by: Dheemanth Mallikarjun <dheemanthm@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 23a2ebbef..814ccfa79 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -67,6 +67,7 @@ static int vmxnet3_dev_configure(struct rte_eth_dev *dev);
 static int vmxnet3_dev_start(struct rte_eth_dev *dev);
 static int vmxnet3_dev_stop(struct rte_eth_dev *dev);
 static int vmxnet3_dev_close(struct rte_eth_dev *dev);
+static int vmxnet3_dev_reset(struct rte_eth_dev *dev);
 static void vmxnet3_dev_set_rxmode(struct vmxnet3_hw *hw, uint32_t feature, int set);
 static int vmxnet3_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static int vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev);
@@ -112,6 +113,7 @@ static const struct eth_dev_ops vmxnet3_eth_dev_ops = {
 	.dev_start            = vmxnet3_dev_start,
 	.dev_stop             = vmxnet3_dev_stop,
 	.dev_close            = vmxnet3_dev_close,
+	.dev_reset            = vmxnet3_dev_reset,
 	.promiscuous_enable   = vmxnet3_dev_promiscuous_enable,
 	.promiscuous_disable  = vmxnet3_dev_promiscuous_disable,
 	.allmulticast_enable  = vmxnet3_dev_allmulticast_enable,
@@ -913,6 +915,18 @@ vmxnet3_dev_close(struct rte_eth_dev *dev)
 	return ret;
 }
 
+static int
+vmxnet3_dev_reset(struct rte_eth_dev *dev)
+{
+	int ret;
+
+	ret = eth_vmxnet3_dev_uninit(dev);
+	if (ret)
+		return ret;
+	ret = eth_vmxnet3_dev_init(dev);
+	return ret;
+}
+
 static void
 vmxnet3_hw_tx_stats_get(struct vmxnet3_hw *hw, unsigned int q,
 			struct UPT1_TxStats *res)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-04 10:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-02  7:12 [dpdk-dev] [PATCH v1 2/2] vmxnet3_dev_reset: Provided API to reset vmxnet device Dheemanth Mallikarjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.