From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 78AF22C4F for ; Wed, 28 Dec 2016 04:30:19 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 27 Dec 2016 19:30:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,420,1477983600"; d="scan'208";a="802850062" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 27 Dec 2016 19:30:18 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 19:30:15 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 19:30:15 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Wed, 28 Dec 2016 11:30:11 +0800 From: "Wu, Jingjing" To: "Xing, Beilei" , "Zhang, Helin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 12/17] net/i40e: destroy ethertype filter Thread-Index: AQHSYApMkXoAl+iAiU6hpWXbSQkmT6EcrBbA Date: Wed, 28 Dec 2016 03:30:11 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810CC00FA@SHSMSX103.ccr.corp.intel.com> References: <1480679625-4157-1-git-send-email-beilei.xing@intel.com> <1482819984-14120-1-git-send-email-beilei.xing@intel.com> <1482819984-14120-13-git-send-email-beilei.xing@intel.com> In-Reply-To: <1482819984-14120-13-git-send-email-beilei.xing@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 v2 12/17] net/i40e: destroy ethertype filter 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: Wed, 28 Dec 2016 03:30:19 -0000 >=20 > const struct rte_flow_ops i40e_flow_ops =3D { > .validate =3D i40e_flow_validate, > @@ -1492,11 +1495,16 @@ i40e_flow_destroy(__rte_unused struct > rte_eth_dev *dev, > struct rte_flow *flow, > struct rte_flow_error *error) > { > + struct i40e_pf *pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data- > >dev_private); > struct i40e_flow *pmd_flow =3D (struct i40e_flow *)flow; > enum rte_filter_type filter_type =3D pmd_flow->filter_type; > int ret; >=20 > switch (filter_type) { > + case RTE_ETH_FILTER_ETHERTYPE: > + ret =3D i40e_dev_destroy_ethertype_filter(pf, > + (struct i40e_ethertype_filter *)pmd_flow->rule); > + break; > default: > PMD_DRV_LOG(WARNING, "Filter type (%d) not supported", > filter_type); > @@ -1504,10 +1512,49 @@ i40e_flow_destroy(__rte_unused struct > rte_eth_dev *dev, > break; > } >=20 > - if (ret) > + if (!ret) { > + TAILQ_REMOVE(&pf->flow_list, pmd_flow, node); > + free(pmd_flow); Should it be freed inside the function? Is the API definition like that?