From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id CD112374E; Thu, 7 Sep 2017 09:35:44 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 07 Sep 2017 00:35:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,357,1500966000"; d="scan'208";a="1215814312" Received: from kmsmsx154.gar.corp.intel.com ([172.21.73.14]) by fmsmga002.fm.intel.com with ESMTP; 07 Sep 2017 00:35:38 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.199]) by KMSMSX154.gar.corp.intel.com ([169.254.12.132]) with mapi id 14.03.0319.002; Thu, 7 Sep 2017 15:35:36 +0800 From: "Dai, Wei" To: "Wu, Jingjing" , "Xing, Beilei" , "Tu, LijuanX A" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix mirror rule reset when port is stopped Thread-Index: AQHTJyGHiy0MQOKRA0S20IATaurQ9qKpCWMg Date: Thu, 7 Sep 2017 07:35:36 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650B95C0D@PGSMSX106.gar.corp.intel.com> References: <1504709549-50804-1-git-send-email-wei.dai@intel.com> In-Reply-To: <1504709549-50804-1-git-send-email-wei.dai@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTkzNWJjOTEtZmRjYy00ZWYxLTk4ZmItYTdmNTllMDM5NTM3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlBQQWM4ak1wbW5RXC9vblZNaXdvYWF6UUJ3V2dkU0pud21ra01Ha2J5NkI0PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix mirror rule reset when port is stopped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 07:35:45 -0000 Hi, Lijuan How about your test result ? > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, September 6, 2017 10:52 PM > To: Wu, Jingjing ; Xing, Beilei > > Cc: dev@dpdk.org; Dai, Wei ; stable@dpdk.org > Subject: [PATCH] net/i40e: fix mirror rule reset when port is stopped >=20 > 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( ). >=20 > Fixes: a4def5edf0fc ("i40e: enable port mirroring") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Dai > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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) >=20 > /* Remove all mirror rules */ > while ((p_mirror =3D 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 =3D 0; >=20 > -- > 2.7.5