From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0E2252A62 for ; Thu, 30 Nov 2017 10:17:21 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 01:17:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,341,1508828400"; d="scan'208";a="182322229" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 30 Nov 2017 01:17:20 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 01:17:20 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 01:17:19 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Thu, 30 Nov 2017 17:17:18 +0800 From: "Xing, Beilei" To: "Rybalchenko, Kirill" , "dev@dpdk.org" CC: "Chilikin, Andrey" , "Wu, Jingjing" Thread-Topic: [PATCH] net/i40e: do not turn on flexible payload on driver init Thread-Index: AQHTaRFpTUUpqOXBX0upp9ntkhaf46MspKVg Date: Thu, 30 Nov 2017 09:17:17 +0000 Message-ID: <94479800C636CB44BD422CB454846E01320754AF@SHSMSX101.ccr.corp.intel.com> References: <1511960148-128836-1-git-send-email-kirill.rybalchenko@intel.com> In-Reply-To: <1511960148-128836-1-git-send-email-kirill.rybalchenko@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: do not turn on flexible payload on driver init 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: Thu, 30 Nov 2017 09:17:22 -0000 > -----Original Message----- > From: Rybalchenko, Kirill > Sent: Wednesday, November 29, 2017 8:56 PM > To: dev@dpdk.org > Cc: Rybalchenko, Kirill ; Chilikin, Andrey > ; Xing, Beilei ; Wu, > Jingjing > Subject: [PATCH] net/i40e: do not turn on flexible payload on driver init >=20 > Function i40e_GLQF_reg_init() overwrites global register for flexible pay= load, > forcing extraction of first 16 bytes of L2/L3/L4 payload to the field vec= tor > even if flexible payload is not used by an application. Such unconditiona= l turn > on of flexible payload effectively disables ability to use outer IP Desti= nation > address for RSS/FDIR for tunnelled packets, as flexible payload overwrite= s > outer IP destination address on the field vector. >=20 > Now flexible payload turned on only when flow director is enabled and > configured. >=20 > Signed-off-by: Kirill Rybalchenko > --- > drivers/net/i40e/i40e_ethdev.c | 11 ----------- > drivers/net/i40e/i40e_fdir.c | 8 ++++++++ > 2 files changed, 8 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 811cc9f..de5e2a3 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -701,17 +701,6 @@ RTE_PMD_REGISTER_KMOD_DEP(net_i40e, "* > igb_uio | uio_pci_generic | vfio-pci"); static inline void > i40e_GLQF_reg_init(struct i40e_hw *hw) { > /* > - * Force global configuration for flexible payload > - * to the first 16 bytes of the corresponding L2/L3/L4 paylod. > - * This should be removed from code once proper > - * configuration API is added to avoid configuration conflicts > - * between ports of the same device. > - */ > - I40E_WRITE_REG(hw, I40E_GLQF_ORT(33), 0x000000E0); > - I40E_WRITE_REG(hw, I40E_GLQF_ORT(34), 0x000000E3); > - I40E_WRITE_REG(hw, I40E_GLQF_ORT(35), 0x000000E6); > - > - /* > * Initialize registers for parsing packet type of QinQ > * This should be removed from code once proper > * configuration API is added to avoid configuration conflicts diff --g= it > a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index > 3d7170d..8191f72 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -342,6 +342,14 @@ i40e_init_flx_pld(struct i40e_pf *pf) > uint16_t flow_type; >=20 > /* > + * Force global configuration for flexible payload > + * to the first 16 bytes of the corresponding L2/L3/L4 paylod. > + */ > + I40E_WRITE_REG(hw, I40E_GLQF_ORT(33), 0x000000E0); > + I40E_WRITE_REG(hw, I40E_GLQF_ORT(34), 0x000000E3); > + I40E_WRITE_REG(hw, I40E_GLQF_ORT(35), 0x000000E6); > + In this case, the global registers will be set when enabling flow director,= but it won't be reset to default value unless core reset. So need an alternative mechani= sm to configure the global registers. > + /* > * Define the bytes stream extracted as flexible payload in > * field vector. By default, select 8 words from the beginning > * of payload as flexible payload. > -- > 2.5.5