From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 802AE2E8A for ; Wed, 5 Apr 2017 10:00:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491379212; x=1522915212; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5TPd7MNP9Id44B0pzqjd8NXAyU+M/Kw5NUWMGi3Gt+M=; b=VcywS1YyTI7qQlhp6jb5Yac+dIrCf+JrEyviklib29NWd42TIrss6cS3 6EDMmX0Vgdmof0MqTqK10tHcRvF9vw==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2017 01:00:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,277,1486454400"; d="scan'208";a="73847038" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga004.jf.intel.com with ESMTP; 05 Apr 2017 01:00:08 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.239]) by irsmsx105.ger.corp.intel.com ([169.254.7.163]) with mapi id 14.03.0319.002; Wed, 5 Apr 2017 09:00:07 +0100 From: "Iremonger, Bernard" To: "Xing, Beilei" , "Yigit, Ferruh" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing Thread-Index: AQHSrJVXlFuIDmI2p0qbQA3BaizEDqG1FyeAgAATDvCAAM1fAIAAc+UQ Date: Wed, 5 Apr 2017 08:00:06 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C224D4F7AB@IRSMSX108.ger.corp.intel.com> References: <1491236049-6747-1-git-send-email-bernard.iremonger@intel.com> <8CEF83825BEC744B83065625E567D7C224D4F2B7@IRSMSX108.ger.corp.intel.com> <94479800C636CB44BD422CB454846E01315D5699@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <94479800C636CB44BD422CB454846E01315D5699@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzljYzE1MjYtMDM5Mi00Y2MxLThhOWYtZTY0ZDM4OWMwMzI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Im1YeXVRWXF4SXQralpcLzRockpNWVM1TUhxZ1RNV2pKaW5ldGphYStWalVFPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing 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, 05 Apr 2017 08:00:13 -0000 Hi Beilei, > -----Original Message----- > From: Xing, Beilei > Sent: Wednesday, April 5, 2017 3:03 AM > To: Iremonger, Bernard ; Yigit, Ferruh > ; dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing >=20 >=20 > > -----Original Message----- > > From: Iremonger, Bernard > > Sent: Tuesday, April 4, 2017 8:52 PM > > To: Yigit, Ferruh ; dev@dpdk.org; Xing, Beilei > > > > Cc: Lu, Wenzhuo > > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing > > > > Hi Ferruh, > > > > > -----Original Message----- > > > From: Yigit, Ferruh > > > Sent: Tuesday, April 4, 2017 1:40 PM > > > To: Iremonger, Bernard ; > dev@dpdk.org; > > > Xing, Beilei > > > Cc: Lu, Wenzhuo > > > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing > > > > > > On 4/3/2017 5:14 PM, Bernard Iremonger wrote: > > > > Handle the following eth patterns: > > > > eth dst spec aa:bb:cc:dd:ee:ff > > > > eth dst mask ff:ff:ff:ff:ff:ff > > > > eth src spec aa:bb:cc:dd:ee:ff > > > > eth src mask ff:ff:ff:ff:ff:ff > > > > > > > > Fixes: d46e85af6b5c ("net/i40e: parse QinQ pattern") > > > > > > > > Signed-off-by: Bernard Iremonger > > > > --- > > > > drivers/net/i40e/i40e_flow.c | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/net/i40e/i40e_flow.c > > > > b/drivers/net/i40e/i40e_flow.c index 9f541eaff..3fcd31036 100644 > > > > --- a/drivers/net/i40e/i40e_flow.c > > > > +++ b/drivers/net/i40e/i40e_flow.c > > > > @@ -1772,7 +1772,8 @@ > i40e_flow_parse_qinq_pattern(__rte_unused > > > struct rte_eth_dev *dev, > > > > case RTE_FLOW_ITEM_TYPE_ETH: > > > > eth_spec =3D (const struct rte_flow_item_eth *)item- > > spec; > > > > eth_mask =3D (const struct rte_flow_item_eth *)item- > > mask; > > > > - if (eth_spec && eth_mask) { > > > > + if ((eth_spec && eth_mask) || > > > > + (eth_spec || eth_mask)) { > > > > > > Is this check requires both spec and mask to be all zeros? If this > > > is the real intention, can you please add a comment above check to cl= arify > it. > > > > Yes , the intention is to only except the "eth" key word, I will send a= v2. >=20 > Seem " if (eth_spec || eth_mask) " is enough, what do you think? >=20 > Beilei Yes, I think you are right. I will change to how it is done for MPLS and send a v2. >=20 > > > > > > > > Also other i40e_flow_parse_xxx_pattern() functions has function > > > comment to describe expected/valid pattern for the flow rule. > > > i40e_flow_parse_qinq_pattern() is missing that function comment. > > > Would you mind adding it, which helps to validate implementation > > > against > > intention. > > > > Yes , I will describe valid patterns for the flow rule in a separate pa= tch. > > > > > Thanks, > > > ferruh > > > > > > > rte_flow_error_set(error, EINVAL, > > > > > > > RTE_FLOW_ERROR_TYPE_ITEM, > > > > item, > > > > > > Regards, > > > > Bernard. Regards, Bernard.