net/mlx5: fix missing Rx queue flags clear

Message ID 1587108210-454878-1-git-send-email-bingz@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix missing Rx queue flags clear |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Bing Zhao April 17, 2020, 7:23 a.m. UTC
  After inserting an offload flow, the software flag information will
be updated based on the flow. When receiving a packet on this queue,
the hardware packet type bits and the software flag will be used
together to get the inner packet and tunnel header type (if any) from
the global packet type table.
When destroying a flow, the corresponding Rx queue flag needs to be
updated. All flags should be cleared when closing a device because
all control flows and application flows are invalid anymore.
Such behavior is missed when implementing the non-cached mode.

Fixes: e1f94d51b8f7 ("net/mlx5: change operations for non-cached flows")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Raslan Darawsheh April 29, 2020, 9:03 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Bing Zhao <bingz@mellanox.com>
> Sent: Friday, April 17, 2020 10:24 AM
> To: Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>
> Cc: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> Subject: [PATCH] net/mlx5: fix missing Rx queue flags clear
> 
> After inserting an offload flow, the software flag information will
> be updated based on the flow. When receiving a packet on this queue,
> the hardware packet type bits and the software flag will be used
> together to get the inner packet and tunnel header type (if any) from
> the global packet type table.
> When destroying a flow, the corresponding Rx queue flag needs to be
> updated. All flags should be cleared when closing a device because
> all control flows and application flows are invalid anymore.
> Such behavior is missed when implementing the non-cached mode.
> 
> Fixes: e1f94d51b8f7 ("net/mlx5: change operations for non-cached flows")
Fixed fixes line,
> 
> Signed-off-by: Bing Zhao <bingz@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index c529aa3..bb7fb1e 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -4653,6 +4653,7 @@ struct rte_flow *
>  mlx5_flow_stop_default(struct rte_eth_dev *dev)
>  {
>  	flow_mreg_del_default_copy_action(dev);
> +	flow_rxq_flags_clear(dev);
>  }
> 
>  /**
> --
> 1.8.3.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c529aa3..bb7fb1e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4653,6 +4653,7 @@  struct rte_flow *
 mlx5_flow_stop_default(struct rte_eth_dev *dev)
 {
 	flow_mreg_del_default_copy_action(dev);
+	flow_rxq_flags_clear(dev);
 }
 
 /**