From: "Dai, Wei" <wei.dai@intel.com>
To: "Wu, Jingjing" <jingjing.wu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix mirror rule reset when port is stopped
Date: Thu, 7 Sep 2017 09:22:05 +0000 [thread overview]
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650B95D1A@PGSMSX106.gar.corp.intel.com> (raw)
In-Reply-To: <9BB6961774997848B5B42BEC655768F810E424CD@SHSMSX103.ccr.corp.intel.com>
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Thursday, September 7, 2017 3:51 PM
> To: Dai, Wei <wei.dai@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH] net/i40e: fix mirror rule reset when port is stopped
>
>
>
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Wednesday, September 6, 2017 10:52 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> > 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: 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;
> >
> It is correct to remove mirror rule in HW. But looking into the function
> i40e_mirror_rul_reset, it's waste to call the function here.
> It is much economic to do like
> while ((p_mirror = TAILQ_FIRST(&pf->mirror_list))) {
> i40e_aq_del_mirror_rule(hw, seid,
> p_mirror->rule_type,
> p_mirror->entries,
> p_mirror->num_entries, p_mirror->id);
> TAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);
> rte_free(p_mirror);
> i40e_mirror_rule_reset(dev, p_mirror->index);
Indeed, the function i40e_mirror_rule_reset( ) includes above 3 code lines:
I40e_aq_del_mirror_rule( ), TAILQ_REMOVE( ) and rte_free( ).
So did you suggest that use these 3 lines instead of calling i40e_mirror_rule_reset( ) ?
I mean i40e_mirror_rule_reset( ) is not necessary in your suggestion.
What's more, all these are in i40e_dev_stop( ), so it doesn't matter which method
to get same result :-)
> }
>
> Thanks
> Jingjing
next prev parent reply other threads:[~2017-09-07 9:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 14:52 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 [this message]
2017-09-11 2:10 ` [dpdk-stable] [PATCH v2] " Wei Dai
2017-09-11 2:11 ` Wei Dai
2017-09-11 2:45 ` [dpdk-stable] [dpdk-dev] " 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 ` [dpdk-stable] " Wei Dai
2017-09-20 1:59 ` [dpdk-stable] [PATCH v3] " Wei Dai
2017-09-20 2:12 ` [dpdk-stable] [PATCH v4] " Wei Dai
2017-09-20 4:16 ` [dpdk-stable] [PATCH v5] " Wei Dai
2017-09-20 9:23 ` [dpdk-stable] [dpdk-dev] " 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 ` [dpdk-stable] [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 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49759EB36A64CF4892C1AFEC9231E8D650B95D1A@PGSMSX106.gar.corp.intel.com \
--to=wei.dai@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).