From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C60F72BB1 for ; Sun, 21 Aug 2016 03:21:24 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 20 Aug 2016 18:21:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,552,1464678000"; d="scan'208";a="151573" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 20 Aug 2016 18:21:23 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 20 Aug 2016 18:21:23 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 20 Aug 2016 18:21:22 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Sun, 21 Aug 2016 09:21:20 +0800 From: "Wu, Jingjing" To: "Xing, Beilei" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix parsing QinQ packets type issue Thread-Index: AQHR+cir/tWwH+aNz0ms/SSPwGcGQKBSn54g Date: Sun, 21 Aug 2016 01:21:19 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F80E17D64E@SHSMSX103.ccr.corp.intel.com> References: <1471576805-16857-1-git-send-email-beilei.xing@intel.com> In-Reply-To: <1471576805-16857-1-git-send-email-beilei.xing@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDQ2N2YwNDUtMTBkNy00ODc0LWI2YmMtNWIzNDBiMDM5ZjU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IllWVW13ZW9YeDZYMlludFFpUlg0SU0rVGlsUnUzek9MNnJ4MnNzdmt2V009In0= x-ctpclassification: CTP_IC 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 parsing QinQ packets type issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2016 01:21:25 -0000 > -----Original Message----- > From: Xing, Beilei > Sent: Friday, August 19, 2016 11:20 AM > To: Wu, Jingjing > Cc: dev@dpdk.org; Xing, Beilei > Subject: [PATCH] net/i40e: fix parsing QinQ packets type issue >=20 > Previously, PTYPE filed in the RX descriptors is not set properly > for QinQ packets, wrong PTYPE is generated because outer Tag did > not have ORT/PIT configured. > Fix this issue by configuring ORT/PIT. >=20 > Fixes: 4861cde46116 ("i40e: new poll mode driver") >=20 > Signed-off-by: Beilei Xing > --- > drivers/net/i40e/i40e_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 55c4887..ba0eca0 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -747,8 +747,10 @@ static inline void i40e_flex_payload_reg_init(struct= i40e_hw *hw) > I40E_WRITE_REG(hw, I40E_GLQF_ORT(20), 0x00000031); > I40E_WRITE_REG(hw, I40E_GLQF_ORT(23), 0x00000031); > I40E_WRITE_REG(hw, I40E_GLQF_ORT(63), 0x0000002D); > + I40E_WRITE_REG(hw, I40E_GLQF_ORT(40), 0x00000029); Setting of GLQF_ORT(40) and GLQF_PIT(16) is for outer vlan, but not for Fle= xible payload. So it may not be suitable to put the code in i40e_flex_payload_reg_init. How about change the function's name and add comments in code? > /* GLQF_PIT Registers */ > + I40E_WRITE_REG(hw, I40E_GLQF_PIT(9), 0x00009420); > I40E_WRITE_REG(hw, I40E_GLQF_PIT(16), 0x00007480); > I40E_WRITE_REG(hw, I40E_GLQF_PIT(17), 0x00007440); > } > -- > 2.5.0