From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 13566376C for ; Wed, 28 Dec 2016 08:44:05 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 27 Dec 2016 23:44:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,421,1477983600"; d="scan'208";a="1087382656" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 27 Dec 2016 23:44:05 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 23:44:04 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 23:44:04 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Wed, 28 Dec 2016 15:44:03 +0800 From: "Xing, Beilei" To: "Wu, Jingjing" , "Zhang, Helin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 07/17] net/i40e: add flow validate function Thread-Index: AQHSYLVl/gb5npteCk+mliBNjCIH86Ec97HQ Date: Wed, 28 Dec 2016 07:44:02 +0000 Message-ID: <94479800C636CB44BD422CB454846E013158C07D@SHSMSX101.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-8-git-send-email-beilei.xing@intel.com> <9BB6961774997848B5B42BEC655768F810CC00A6@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810CC00A6@SHSMSX103.ccr.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 v2 07/17] net/i40e: add flow validate function 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 07:44:06 -0000 > -----Original Message----- > From: Wu, Jingjing > Sent: Wednesday, December 28, 2016 10:52 AM > To: Xing, Beilei ; Zhang, Helin > > Cc: dev@dpdk.org > Subject: RE: [PATCH v2 07/17] net/i40e: add flow validate function >=20 >=20 > > > > +union i40e_filter_t { > > + struct rte_eth_ethertype_filter ethertype_filter; > > + struct rte_eth_fdir_filter fdir_filter; > > + struct rte_eth_tunnel_filter_conf tunnel_filter; } cons_filter; > > + > > +typedef int (*parse_filter_t)(struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > + const struct rte_flow_item pattern[], > > + const struct rte_flow_action actions[], > > + struct rte_flow_error *error, > > + union i40e_filter_t *filter); > You can use void* instead of define union i40e_filter_t. I tried the void * before, but I should determine the filter type when crea= ting a flow. If using void*, I can get the filter info but I don't know wh= ich filer type it belongs to. >=20 > > +struct i40e_valid_pattern { > > + enum rte_flow_item_type *items; > What the item points to? Add few comments It's the pattern without VOID items. I'll add comments in next version. > > + > > + ret =3D parse_filter(dev, attr, items, actions, error, &cons_filter); >=20 > Will you use cons_filter later? If not, it looks like we don't need the a= rgument > at all. Yes, it's used to create flow. We us parse_filter to get the filter info. W= hen creating a flow, flow_validate will be involved first to get filter inf= o, then set filter according to the filter info. > > + > > + rte_free(items); > > + > > + return ret; > > +} > > -- > > 2.5.5