All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix mirror rule reset when port is stopped
@ 2017-09-06 14:52 Wei Dai
  2017-09-07  7:34 ` Dai, Wei
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Wei Dai @ 2017-09-06 14:52 UTC (permalink / raw)
  To: jingjing.wu, beilei.xing; +Cc: dev, Wei Dai, stable

When an i40e PF port is stopped, all mirror rules should be removed.
All rule related SW and HW resources should also be removed. All of
them are should be removed by calling i40e_mirror_rule_reset( ).

Fixes: a4def5edf0fc ("i40e: enable port mirroring")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5f26e24..93fb6cd 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2094,8 +2094,7 @@ i40e_dev_stop(struct rte_eth_dev *dev)
 
 	/* Remove all mirror rules */
 	while ((p_mirror = TAILQ_FIRST(&pf->mirror_list))) {
-		TAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);
-		rte_free(p_mirror);
+		i40e_mirror_rule_reset(dev, p_mirror->index);
 	}
 	pf->nb_mirror_rule = 0;
 
-- 
2.7.5

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

end of thread, other threads:[~2017-09-28 15:49 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 14:52 [PATCH] net/i40e: fix mirror rule reset when port is stopped Wei Dai
2017-09-07  7:34 ` Dai, Wei
2017-09-07  7:35 ` Dai, Wei
2017-09-07  7:37   ` Tu, LijuanX A
2017-09-07  7:50 ` Wu, Jingjing
2017-09-07  9:22   ` Dai, Wei
2017-09-11  2:11 ` [PATCH v2] " Wei Dai
2017-09-11  2:45   ` Xing, Beilei
2017-09-13  7:32     ` Wu, Jingjing
2017-09-19  2:21     ` Wu, Jingjing
2017-09-20  1:44       ` Dai, Wei
2017-09-11  2:30 ` Wei Dai
2017-09-20  1:59   ` [PATCH v3] " Wei Dai
2017-09-20  2:12     ` [PATCH v4] " Wei Dai
2017-09-20  4:16       ` [PATCH v5] " Wei Dai
2017-09-20  9:23         ` Ananyev, Konstantin
2017-09-20 14:26           ` Dai, Wei
2017-09-20 22:46             ` Ananyev, Konstantin
2017-09-23  2:26               ` Wu, Jingjing
2017-09-23 10:37                 ` Ananyev, Konstantin
2017-09-23 16:34                   ` Dai, Wei
2017-09-25  6:36         ` [PATCH v6] net/i40e: fix mirror rule reset when port is closed Wei Dai
2017-09-26 13:49           ` Wu, Jingjing
2017-09-28 15:49             ` [dpdk-stable] " Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.