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 2A3542C2E for ; Wed, 30 Aug 2017 15:28:07 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 06:28:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="145636185" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga005.fm.intel.com with ESMTP; 30 Aug 2017 06:28:05 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX151.ger.corp.intel.com (163.33.192.59) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 14:28:05 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx111.ger.corp.intel.com ([169.254.2.30]) with mapi id 14.03.0319.002; Wed, 30 Aug 2017 14:28:05 +0100 From: "Iremonger, Bernard" To: Adrien Mazarguil CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "Dumitrescu, Cristian" Thread-Topic: [PATCH v2 3/6] librte_ether: initialise IPv4 protocol mask for rte_flow Thread-Index: AQHTHby61ZLcrb4WZEWT6CbEBfEvG6KczbkAgAAbp3A= Date: Wed, 30 Aug 2017 13:28:04 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C24E042C4F@IRSMSX108.ger.corp.intel.com> References: <1503496275-27492-1-git-send-email-bernard.iremonger@intel.com> <1503677438-27591-4-git-send-email-bernard.iremonger@intel.com> <20170830123912.GJ4301@6wind.com> In-Reply-To: <20170830123912.GJ4301@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGNkYWExODYtZWMyYi00ZWEwLTg5OWItMzQwYTUwYmI4NmIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5cL25EUjhhbVNBWUo2cUh0THNMeHpmSmJjZEI1K2tvQ2UyXC8xWFdnWGo1Zz0ifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/6] librte_ether: initialise IPv4 protocol mask for rte_flow 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, 30 Aug 2017 13:28:07 -0000 Hi Adrien, > -----Original Message----- > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > Sent: Wednesday, August 30, 2017 1:39 PM > To: Iremonger, Bernard > Cc: dev@dpdk.org; Yigit, Ferruh ; Ananyev, > Konstantin ; Dumitrescu, Cristian > > Subject: Re: [PATCH v2 3/6] librte_ether: initialise IPv4 protocol mask f= or > rte_flow >=20 > Hi Bernard, >=20 > On Fri, Aug 25, 2017 at 05:10:35PM +0100, Bernard Iremonger wrote: > > Initialise the next_proto_id mask in the default mask for > > rte_flow_item_type_ipv4. > > > > Signed-off-by: Bernard Iremonger > > --- > > lib/librte_ether/rte_flow.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > > index bba6169..59c42fa 100644 > > --- a/lib/librte_ether/rte_flow.h > > +++ b/lib/librte_ether/rte_flow.h > > @@ -489,6 +489,7 @@ struct rte_flow_item_ipv4 { #ifndef __cplusplus > > static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask =3D { > > .hdr =3D { > > + .next_proto_id =3D 0xff, >=20 > Please don't change the default mask to cover this field as it means > all rte_flow-based applications that do not provide a specific mask > (.mask =3D=3D NULL) have to always set this field to some valid value. > This is not a convenient default behavior. >=20 > > .src_addr =3D RTE_BE32(0xffffffff), > > .dst_addr =3D RTE_BE32(0xffffffff), > > }, > > -- > > 1.9.1 > > >=20 > I'll have to NACK this change. The example application should define its = own > mask if next_proto_id must be always set. Surely for IPv4 the next_proto_id will always be set to TCP(6) , UDP(17) or= SCTP (132). If the mask is 0 for next_proto_id then it is not possible to match on the = protocol. I can define an ipv4_mask in the application if you insist.=20 Regards, Bernard.