[dpdk-dev,v2,6/6] net/tap: link set down must be before close

Message ID 20170205160509.88530-6-keith.wiles@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation fail apply patch file failure

Commit Message

Wiles, Keith Feb. 5, 2017, 4:05 p.m. UTC
  Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Pascal Mazon Feb. 6, 2017, 3:57 p.m. UTC | #1
On Sun,  5 Feb 2017 10:05:09 -0600
Keith Wiles <keith.wiles@intel.com> wrote:

> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> ---
>  drivers/net/tap/rte_eth_tap.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 65e4bab..966e91a 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -353,10 +353,11 @@ tap_dev_stop(struct rte_eth_dev *dev)
>  	int i;
>  	struct pmd_internals *internals = dev->data->dev_private;
>  
> +	tap_link_set_down(dev);
> +
>  	for (i = 0; i < internals->nb_queues; i++)
>  		if (internals->rxq[i].fd != -1)
>  			close(internals->rxq[i].fd);
> -	tap_link_set_down(dev);
>  }
>  
>  static int

There's a word missing in your commit title.
Otherwise the patch is absolutely necessary.

Could you add this line to your patch, please, for traceability?

Fixes: ee418a25b0d3 ("net/tap: implement link up and down callbacks")

Thanks for fixing my bug.

Regards,
Pascal
  
Wiles, Keith Feb. 6, 2017, 4:03 p.m. UTC | #2
> On Feb 6, 2017, at 9:57 AM, Pascal Mazon <pascal.mazon@6wind.com> wrote:

> 

> Fixes: ee418a25b0d3 ("net/tap: implement link up and down callbacks”)


As I need to add these changes I will produce a v3 patch

Regards,
Keith
  

Patch

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 65e4bab..966e91a 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -353,10 +353,11 @@  tap_dev_stop(struct rte_eth_dev *dev)
 	int i;
 	struct pmd_internals *internals = dev->data->dev_private;
 
+	tap_link_set_down(dev);
+
 	for (i = 0; i < internals->nb_queues; i++)
 		if (internals->rxq[i].fd != -1)
 			close(internals->rxq[i].fd);
-	tap_link_set_down(dev);
 }
 
 static int