DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device
@ 2021-01-04 19:43 Dheemanth Mallikarjun
  2021-01-15 18:43 ` Ferruh Yigit
  2021-02-06 18:05 ` Yong Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Dheemanth Mallikarjun @ 2021-01-04 19:43 UTC (permalink / raw)
  To: dev; +Cc: yongwang

The vmxnet3 driver didn't have the dev_reset function
pointer set. Hence, provided the necessary function
pointer so that DPDK developers can use the rte_eth_dev_reset
API to reset the vmxnet3 device data.

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	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device
  2021-01-04 19:43 [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device Dheemanth Mallikarjun
@ 2021-01-15 18:43 ` Ferruh Yigit
  2021-02-06 18:05 ` Yong Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2021-01-15 18:43 UTC (permalink / raw)
  To: yongwang; +Cc: Dheemanth Mallikarjun, dev

On 1/4/2021 7:43 PM, Dheemanth Mallikarjun wrote:
> The vmxnet3 driver didn't have the dev_reset function
> pointer set. Hence, provided the necessary function
> pointer so that DPDK developers can use the rte_eth_dev_reset
> API to reset the vmxnet3 device data.
> 
> 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)
> 

Hi Yong,

Can you please review this patch?

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device
  2021-01-04 19:43 [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device Dheemanth Mallikarjun
  2021-01-15 18:43 ` Ferruh Yigit
@ 2021-02-06 18:05 ` Yong Wang
  2021-02-22 16:53   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Yong Wang @ 2021-02-06 18:05 UTC (permalink / raw)
  To: Dheemanth Mallikarjun, dev

-----Original Message-----
From: Dheemanth Mallikarjun <dheemanthm@vmware.com>
Date: Monday, January 4, 2021 at 11:43 AM
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Yong Wang <yongwang@vmware.com>
Subject: [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device

    The vmxnet3 driver didn't have the dev_reset function
    pointer set. Hence, provided the necessary function
    pointer so that DPDK developers can use the rte_eth_dev_reset
    API to reset the vmxnet3 device data.

    Signed-off-by: Dheemanth Mallikarjun <dheemanthm@vmware.com>
    ---

Acked-by: Yong Wang <yongwang@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	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device
  2021-02-06 18:05 ` Yong Wang
@ 2021-02-22 16:53   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2021-02-22 16:53 UTC (permalink / raw)
  To: Yong Wang, Dheemanth Mallikarjun, dev

On 2/6/2021 6:05 PM, Yong Wang wrote:
> -----Original Message-----
> From: Dheemanth Mallikarjun <dheemanthm@vmware.com>
> Date: Monday, January 4, 2021 at 11:43 AM
> To: "dev@dpdk.org" <dev@dpdk.org>
> Cc: Yong Wang <yongwang@vmware.com>
> Subject: [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device
> 
>      The vmxnet3 driver didn't have the dev_reset function
>      pointer set. Hence, provided the necessary function
>      pointer so that DPDK developers can use the rte_eth_dev_reset
>      API to reset the vmxnet3 device data.
> 
>      Signed-off-by: Dheemanth Mallikarjun <dheemanthm@vmware.com>
>      ---
> 
> Acked-by: Yong Wang <yongwang@vmware.com>
> 

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-22 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 19:43 [dpdk-dev] [PATCH v1 2/2] net/vmxnet3: Provided API to reset vmxnet device Dheemanth Mallikarjun
2021-01-15 18:43 ` Ferruh Yigit
2021-02-06 18:05 ` Yong Wang
2021-02-22 16:53   ` Ferruh Yigit

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git