[dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' has been queued to LTS release 17.11.1

Yuanhan Liu yliu at fridaylinux.org
Wed Feb 7 09:56:59 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f014d695bbfee54b24dc170106d5951537b7f3dd Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Date: Wed, 31 Jan 2018 16:33:06 +0100
Subject: [PATCH] net/mlx4: fix drop flow resources leak

[ upstream commit ff20ecbf2af7d7fe430526c055e980321a9fa7d9 ]

Resources allocated for drop flow rules are not freed properly. This causes
a memory leak and triggers an assertion failure on a reference counter when
compiled in debug mode.

This issue can be reproduced with testpmd by entering the following
commands:

 flow create 0 ingress pattern eth / end actions drop / end
 port start all
 port stop all
 port start all
 port stop all
 quit

The reason is additional references are taken when re-enabling existing
flow rules, a common occurrence when rehashing configuration.

Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")

Reported-by: Moti Haimovsky <motih at mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
 drivers/net/mlx4/mlx4_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 8b87b29..e81e24d 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -1048,6 +1048,8 @@ mlx4_flow_toggle(struct priv *priv,
 		flow->drop = missing;
 	}
 	if (flow->drop) {
+		if (flow->ibv_flow)
+			return 0;
 		mlx4_drop_get(priv);
 		if (!priv->drop) {
 			err = rte_errno;
-- 
2.7.4



More information about the stable mailing list