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 0994F199B0; Thu, 7 Sep 2017 09:37:55 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 07 Sep 2017 00:37:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,357,1500966000"; d="scan'208";a="308954699" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 07 Sep 2017 00:37:54 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 7 Sep 2017 00:37:54 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by shsmsx102.ccr.corp.intel.com ([169.254.2.39]) with mapi id 14.03.0319.002; Thu, 7 Sep 2017 15:37:51 +0800 From: "Tu, LijuanX A" To: "Dai, Wei" , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix mirror rule reset when port is stopped Thread-Index: AQHTJ6vm2yDb/qtPHk+an4X5pmUW4qKpCJhQ Date: Thu, 7 Sep 2017 07:37:50 +0000 Message-ID: <38D041F150D4184C8114E499040E62343DC24D8F@SHSMSX103.ccr.corp.intel.com> References: <1504709549-50804-1-git-send-email-wei.dai@intel.com> <49759EB36A64CF4892C1AFEC9231E8D650B95C0D@PGSMSX106.gar.corp.intel.com> In-Reply-To: <49759EB36A64CF4892C1AFEC9231E8D650B95C0D@PGSMSX106.gar.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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:37:56 -0000 I have tested the patch ,it passed. -----Original Message----- From: Dai, Wei=20 Sent: Thursday, September 7, 2017 3:36 PM To: Wu, Jingjing ; Xing, Beilei ; Tu, LijuanX A Cc: dev@dpdk.org; stable@dpdk.org 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 ; Xing, Beilei=20 > > 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=20 > 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 Tested-by: Lijuan Tu > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c=20 > 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) >=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