[dpdk-dev,4/5] net/mlx5: fix fdir flow removal

Message ID 438eecc3ed3eac501959a3c6c002e771e6a1f2a4.1509464921.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro Oct. 31, 2017, 3:51 p.m. UTC
  Initialise struct mlx5_fdir to avoid passing non initialised items/actions
arrays elements to the generic flow interpreter.

Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Yongseok Koh Nov. 1, 2017, 12:43 a.m. UTC | #1
> On Oct 31, 2017, at 8:51 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> Initialise struct mlx5_fdir to avoid passing non initialised items/actions
> arrays elements to the generic flow interpreter.
> 
> Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index fcc9a260e..d8b0d7508 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2847,7 +2847,9 @@  static int
 priv_fdir_filter_delete(struct priv *priv,
 			const struct rte_eth_fdir_filter *fdir_filter)
 {
-	struct mlx5_fdir attributes;
+	struct mlx5_fdir attributes = {
+		.attr.group = 0,
+	};
 	struct mlx5_flow_parse parser = {
 		.create = 1,
 		.layer = HASH_RXQ_ETH,