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 DC4EB326B for ; Wed, 5 Apr 2017 04:03:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491357791; x=1522893791; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=sx+qisXbNFWEFXh39Zuhe4PyMF8h2Cp0PVHL1TdJe90=; b=RRty20Tm1QrY0uI5DQs4GKnR3y2rfSsFNw102489p2JltMnaazpdMRc3 iYT9SRhivWpZK9ztLIwlt6FUdMk52A==; Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2017 19:03:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,276,1486454400"; d="scan'208";a="84470237" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 04 Apr 2017 19:03:09 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 19:03:09 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 19:03:08 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0319.002; Wed, 5 Apr 2017 10:03:02 +0800 From: "Xing, Beilei" To: "Iremonger, Bernard" , "Yigit, Ferruh" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix eth pattern parsing Thread-Index: AQHSrJVXoj6jliWgQk+Kt248C82dpKG0oc+AgAADhYCAAWJhkA== Date: Wed, 5 Apr 2017 02:03:02 +0000 Message-ID: <94479800C636CB44BD422CB454846E01315D5699@SHSMSX101.ccr.corp.intel.com> References: <1491236049-6747-1-git-send-email-bernard.iremonger@intel.com> <8CEF83825BEC744B83065625E567D7C224D4F2B7@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C224D4F2B7@IRSMSX108.ger.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 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 02:03:11 -0000 > -----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 >=20 > Hi Ferruh, >=20 > > -----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 clarify= it. >=20 > Yes , the intention is to only except the "eth" key word, I will send a v= 2. Seem " if (eth_spec || eth_mask) " is enough, what do you think? Beilei >=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. >=20 > Yes , I will describe valid patterns for the flow rule in a separate patc= h. >=20 > > Thanks, > > ferruh > > > > > rte_flow_error_set(error, EINVAL, > > > > > RTE_FLOW_ERROR_TYPE_ITEM, > > > item, > > > > Regards, >=20 > Bernard.