I have tested the patch ,it passed. -----Original Message----- From: Dai, Wei Sent: Thursday, September 7, 2017 3:36 PM To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Tu, LijuanX A <[email protected]> Cc: [email protected]; [email protected] Subject: RE: [PATCH] net/i40e: fix mirror rule reset when port is stopped
Hi, Lijuan How about your test result ? > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, September 6, 2017 10:52 PM > To: Wu, Jingjing <[email protected]>; Xing, Beilei > <[email protected]> > Cc: [email protected]; Dai, Wei <[email protected]>; [email protected] > Subject: [PATCH] net/i40e: fix mirror rule reset when port is stopped > > 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: [email protected] > > Signed-off-by: Wei Dai <[email protected]> Tested-by: Lijuan Tu<[email protected]> > --- > 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

