Message ID | 1419405248-14158-1-git-send-email-helin.zhang@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 919872A9; Wed, 24 Dec 2014 08:14:18 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6F8B818F for <dev@dpdk.org>; Wed, 24 Dec 2014 08:14:16 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 23 Dec 2014 23:12:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="432873789" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 23 Dec 2014 23:02:40 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sBO7EBHW005344; Wed, 24 Dec 2014 15:14:11 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sBO7E9rL014192; Wed, 24 Dec 2014 15:14:11 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sBO7E946014188; Wed, 24 Dec 2014 15:14:09 +0800 From: Helin Zhang <helin.zhang@intel.com> To: dev@dpdk.org Date: Wed, 24 Dec 2014 15:14:08 +0800 Message-Id: <1419405248-14158-1-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] i40e: workaround for XL710 performance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Zhang, Helin
Dec. 24, 2014, 7:14 a.m. UTC
on XL710, performance number is far from the expectation on recent
firmware versions, if promiscuous mode is disabled, or promiscuous
mode is enabled and port MAC address is equal to the packet
destination MAC address. The fix for this issue may not be integrated
in the following firmware version. So the workaround in software
driver is needed. It needs to modify the initial values of 2 internal
only registers which is the same 2 of 3 registers of it did for X710.
Note that the workaround can be removed when it is fixed in firmware
in the future.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
lib/librte_pmd_i40e/i40e_ethdev.c | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
Comments
On Wed, Dec 24, 2014 at 03:14:08PM +0800, Helin Zhang wrote: > on XL710, performance number is far from the expectation on recent > firmware versions, if promiscuous mode is disabled, or promiscuous > mode is enabled and port MAC address is equal to the packet > destination MAC address. The fix for this issue may not be integrated > in the following firmware version. So the workaround in software > driver is needed. It needs to modify the initial values of 2 internal > only registers which is the same 2 of 3 registers of it did for X710. > Note that the workaround can be removed when it is fixed in firmware > in the future. > > Signed-off-by: Helin Zhang <helin.zhang@intel.com> > --- > lib/librte_pmd_i40e/i40e_ethdev.c | 35 ++++++++++++++++++++++------------- > 1 file changed, 22 insertions(+), 13 deletions(-) > > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c > index b47a3d2..3bb75d8 100644 > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > @@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw *hw, uint32_t addr, uint64_t *val) > > /* > * On X710, performance number is far from the expectation on recent firmware > - * versions. The fix for this issue may not be integrated in the following > + * versions; on XL710, performance number is also far from the expectation on > + * recent firmware versions, if promiscuous mode is disabled, or promiscuous > + * mode is enabled and port MAC address is equal to the packet destination MAC > + * address. The fix for this issue may not be integrated in the following > * firmware version. So the workaround in software driver is needed. It needs > - * to modify the initial values of 3 internal only registers. Note that the > - * workaround can be removed when it is fixed in firmware in the future. > + * to modify the initial values of 3 internal only registers for X710, and the > + * same 2 internal registers for XL710. Note that the workaround can be removed > + * when it is fixed in firmware in the future. Wouldn't it be preferable to add a firmware version check to this code so that a single driver can handle both cards with old and 'fixed' firmware? That way nothing needs to be removed and all i40e cards will have a consistent behavior Neil > */ > -static void > -i40e_configure_registers(struct i40e_hw *hw) > -{ > -#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > -#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > -#define I40E_GL_SWR_PM_UP_THR 0x269FBC > + > +/* For both X710 and XL710 */ > #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200 > +#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > + > #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200 > +#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > + > +/* For X710 only */ > #define I40E_GL_SWR_PM_UP_THR_VALUE 0x03030303 > +#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > +static void > +i40e_configure_registers(struct i40e_hw *hw) > +{ > static const struct { > uint32_t addr; > uint64_t val; > @@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw *hw) > uint32_t i; > int ret; > > - /* Below fix is for X710 only */ > - if (i40e_is_40G_device(hw->device_id)) > - return; > - > for (i = 0; i < RTE_DIM(reg_table); i++) { > + if ((i40e_is_40G_device(hw->device_id)) && > + (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR)) > + continue; > + > ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); > if (ret < 0) { > PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32, > -- > 1.9.3 > >
Hi Neil > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Wednesday, December 24, 2014 10:55 PM > To: Zhang, Helin > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] i40e: workaround for XL710 performance > > On Wed, Dec 24, 2014 at 03:14:08PM +0800, Helin Zhang wrote: > > on XL710, performance number is far from the expectation on recent > > firmware versions, if promiscuous mode is disabled, or promiscuous > > mode is enabled and port MAC address is equal to the packet > > destination MAC address. The fix for this issue may not be integrated > > in the following firmware version. So the workaround in software > > driver is needed. It needs to modify the initial values of 2 internal > > only registers which is the same 2 of 3 registers of it did for X710. > > Note that the workaround can be removed when it is fixed in firmware > > in the future. > > > > Signed-off-by: Helin Zhang <helin.zhang@intel.com> > > --- > > lib/librte_pmd_i40e/i40e_ethdev.c | 35 > > ++++++++++++++++++++++------------- > > 1 file changed, 22 insertions(+), 13 deletions(-) > > > > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c > > b/lib/librte_pmd_i40e/i40e_ethdev.c > > index b47a3d2..3bb75d8 100644 > > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > > @@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw *hw, > > uint32_t addr, uint64_t *val) > > > > /* > > * On X710, performance number is far from the expectation on recent > > firmware > > - * versions. The fix for this issue may not be integrated in the > > following > > + * versions; on XL710, performance number is also far from the > > + expectation on > > + * recent firmware versions, if promiscuous mode is disabled, or > > + promiscuous > > + * mode is enabled and port MAC address is equal to the packet > > + destination MAC > > + * address. The fix for this issue may not be integrated in the > > + following > > * firmware version. So the workaround in software driver is needed. > > It needs > > - * to modify the initial values of 3 internal only registers. Note > > that the > > - * workaround can be removed when it is fixed in firmware in the future. > > + * to modify the initial values of 3 internal only registers for > > + X710, and the > > + * same 2 internal registers for XL710. Note that the workaround can > > + be removed > > + * when it is fixed in firmware in the future. > > Wouldn't it be preferable to add a firmware version check to this code so that a > single driver can handle both cards with old and 'fixed' firmware? That way > nothing needs to be removed and all i40e cards will have a consistent behavior > Neil Yes, good idea! The problem is that no firmware contains this fix till now, firmware guys even cannot tell me which version will have this fix at this moment. As it reads the registers first, and compares if it is what we wanted, and then decides if a write is needed or not. With this, removing this piece of code is not actually needed even a fix occur in the future, though the code will be redundant. Thank you for the comments! Regards, Helin > > > */ > > -static void > > -i40e_configure_registers(struct i40e_hw *hw) -{ > > -#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > -#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > -#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > + > > +/* For both X710 and XL710 */ > > #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200 > > +#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > + > > #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200 > > +#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > + > > +/* For X710 only */ > > #define I40E_GL_SWR_PM_UP_THR_VALUE 0x03030303 > > +#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > > > +static void > > +i40e_configure_registers(struct i40e_hw *hw) { > > static const struct { > > uint32_t addr; > > uint64_t val; > > @@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw *hw) > > uint32_t i; > > int ret; > > > > - /* Below fix is for X710 only */ > > - if (i40e_is_40G_device(hw->device_id)) > > - return; > > - > > for (i = 0; i < RTE_DIM(reg_table); i++) { > > + if ((i40e_is_40G_device(hw->device_id)) && > > + (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR)) > > + continue; > > + > > ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); > > if (ret < 0) { > > PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32, > > -- > > 1.9.3 > > > >
On Thu, Dec 25, 2014 at 12:20:11AM +0000, Zhang, Helin wrote: > Hi Neil > > > -----Original Message----- > > From: Neil Horman [mailto:nhorman@tuxdriver.com] > > Sent: Wednesday, December 24, 2014 10:55 PM > > To: Zhang, Helin > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] i40e: workaround for XL710 performance > > > > On Wed, Dec 24, 2014 at 03:14:08PM +0800, Helin Zhang wrote: > > > on XL710, performance number is far from the expectation on recent > > > firmware versions, if promiscuous mode is disabled, or promiscuous > > > mode is enabled and port MAC address is equal to the packet > > > destination MAC address. The fix for this issue may not be integrated > > > in the following firmware version. So the workaround in software > > > driver is needed. It needs to modify the initial values of 2 internal > > > only registers which is the same 2 of 3 registers of it did for X710. > > > Note that the workaround can be removed when it is fixed in firmware > > > in the future. > > > > > > Signed-off-by: Helin Zhang <helin.zhang@intel.com> > > > --- > > > lib/librte_pmd_i40e/i40e_ethdev.c | 35 > > > ++++++++++++++++++++++------------- > > > 1 file changed, 22 insertions(+), 13 deletions(-) > > > > > > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c > > > b/lib/librte_pmd_i40e/i40e_ethdev.c > > > index b47a3d2..3bb75d8 100644 > > > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > > > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > > > @@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw *hw, > > > uint32_t addr, uint64_t *val) > > > > > > /* > > > * On X710, performance number is far from the expectation on recent > > > firmware > > > - * versions. The fix for this issue may not be integrated in the > > > following > > > + * versions; on XL710, performance number is also far from the > > > + expectation on > > > + * recent firmware versions, if promiscuous mode is disabled, or > > > + promiscuous > > > + * mode is enabled and port MAC address is equal to the packet > > > + destination MAC > > > + * address. The fix for this issue may not be integrated in the > > > + following > > > * firmware version. So the workaround in software driver is needed. > > > It needs > > > - * to modify the initial values of 3 internal only registers. Note > > > that the > > > - * workaround can be removed when it is fixed in firmware in the future. > > > + * to modify the initial values of 3 internal only registers for > > > + X710, and the > > > + * same 2 internal registers for XL710. Note that the workaround can > > > + be removed > > > + * when it is fixed in firmware in the future. > > > > Wouldn't it be preferable to add a firmware version check to this code so that a > > single driver can handle both cards with old and 'fixed' firmware? That way > > nothing needs to be removed and all i40e cards will have a consistent behavior > > Neil > Yes, good idea! > The problem is that no firmware contains this fix till now, firmware guys even > cannot tell me which version will have this fix at this moment. > As it reads the registers first, and compares if it is what we wanted, and then > decides if a write is needed or not. With this, removing this piece of code is not > actually needed even a fix occur in the future, though the code will be redundant. > Very well, lets just make sure when it is fixed, the driver works with both patched and unpatched firmware Acked-by: Neil Horman <nhorman@tuxdriver.com> > Thank you for the comments! > > Regards, > Helin > > > > > > */ > > > -static void > > > -i40e_configure_registers(struct i40e_hw *hw) -{ > > > -#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > > -#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > > -#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > > + > > > +/* For both X710 and XL710 */ > > > #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200 > > > +#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > > + > > > #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200 > > > +#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > > + > > > +/* For X710 only */ > > > #define I40E_GL_SWR_PM_UP_THR_VALUE 0x03030303 > > > +#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > > > > > +static void > > > +i40e_configure_registers(struct i40e_hw *hw) { > > > static const struct { > > > uint32_t addr; > > > uint64_t val; > > > @@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw *hw) > > > uint32_t i; > > > int ret; > > > > > > - /* Below fix is for X710 only */ > > > - if (i40e_is_40G_device(hw->device_id)) > > > - return; > > > - > > > for (i = 0; i < RTE_DIM(reg_table); i++) { > > > + if ((i40e_is_40G_device(hw->device_id)) && > > > + (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR)) > > > + continue; > > > + > > > ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); > > > if (ret < 0) { > > > PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32, > > > -- > > > 1.9.3 > > > > > > >
Hi Neil Great to have your Ack! Thank you very much! Regards, Helin > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Friday, December 26, 2014 10:29 PM > To: Zhang, Helin > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] i40e: workaround for XL710 performance > > On Thu, Dec 25, 2014 at 12:20:11AM +0000, Zhang, Helin wrote: > > Hi Neil > > > > > -----Original Message----- > > > From: Neil Horman [mailto:nhorman@tuxdriver.com] > > > Sent: Wednesday, December 24, 2014 10:55 PM > > > To: Zhang, Helin > > > Cc: dev@dpdk.org > > > Subject: Re: [dpdk-dev] [PATCH] i40e: workaround for XL710 > > > performance > > > > > > On Wed, Dec 24, 2014 at 03:14:08PM +0800, Helin Zhang wrote: > > > > on XL710, performance number is far from the expectation on recent > > > > firmware versions, if promiscuous mode is disabled, or promiscuous > > > > mode is enabled and port MAC address is equal to the packet > > > > destination MAC address. The fix for this issue may not be > > > > integrated in the following firmware version. So the workaround in > > > > software driver is needed. It needs to modify the initial values > > > > of 2 internal only registers which is the same 2 of 3 registers of it did for > X710. > > > > Note that the workaround can be removed when it is fixed in > > > > firmware in the future. > > > > > > > > Signed-off-by: Helin Zhang <helin.zhang@intel.com> > > > > --- > > > > lib/librte_pmd_i40e/i40e_ethdev.c | 35 > > > > ++++++++++++++++++++++------------- > > > > 1 file changed, 22 insertions(+), 13 deletions(-) > > > > > > > > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c > > > > b/lib/librte_pmd_i40e/i40e_ethdev.c > > > > index b47a3d2..3bb75d8 100644 > > > > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > > > > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > > > > @@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw > > > > *hw, uint32_t addr, uint64_t *val) > > > > > > > > /* > > > > * On X710, performance number is far from the expectation on > > > > recent firmware > > > > - * versions. The fix for this issue may not be integrated in the > > > > following > > > > + * versions; on XL710, performance number is also far from the > > > > + expectation on > > > > + * recent firmware versions, if promiscuous mode is disabled, or > > > > + promiscuous > > > > + * mode is enabled and port MAC address is equal to the packet > > > > + destination MAC > > > > + * address. The fix for this issue may not be integrated in the > > > > + following > > > > * firmware version. So the workaround in software driver is needed. > > > > It needs > > > > - * to modify the initial values of 3 internal only registers. > > > > Note that the > > > > - * workaround can be removed when it is fixed in firmware in the future. > > > > + * to modify the initial values of 3 internal only registers for > > > > + X710, and the > > > > + * same 2 internal registers for XL710. Note that the workaround > > > > + can be removed > > > > + * when it is fixed in firmware in the future. > > > > > > Wouldn't it be preferable to add a firmware version check to this > > > code so that a single driver can handle both cards with old and > > > 'fixed' firmware? That way nothing needs to be removed and all i40e > > > cards will have a consistent behavior Neil > > Yes, good idea! > > The problem is that no firmware contains this fix till now, firmware > > guys even cannot tell me which version will have this fix at this moment. > > As it reads the registers first, and compares if it is what we wanted, > > and then decides if a write is needed or not. With this, removing this > > piece of code is not actually needed even a fix occur in the future, though the > code will be redundant. > > > Very well, lets just make sure when it is fixed, the driver works with both > patched and unpatched firmware > Acked-by: Neil Horman <nhorman@tuxdriver.com> > > > Thank you for the comments! > > > > Regards, > > Helin > > > > > > > > > */ > > > > -static void > > > > -i40e_configure_registers(struct i40e_hw *hw) -{ > > > > -#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > > > -#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > > > -#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > > > + > > > > +/* For both X710 and XL710 */ > > > > #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200 > > > > +#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 > > > > + > > > > #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200 > > > > +#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 > > > > + > > > > +/* For X710 only */ > > > > #define I40E_GL_SWR_PM_UP_THR_VALUE 0x03030303 > > > > +#define I40E_GL_SWR_PM_UP_THR 0x269FBC > > > > > > > > +static void > > > > +i40e_configure_registers(struct i40e_hw *hw) { > > > > static const struct { > > > > uint32_t addr; > > > > uint64_t val; > > > > @@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw > *hw) > > > > uint32_t i; > > > > int ret; > > > > > > > > - /* Below fix is for X710 only */ > > > > - if (i40e_is_40G_device(hw->device_id)) > > > > - return; > > > > - > > > > for (i = 0; i < RTE_DIM(reg_table); i++) { > > > > + if ((i40e_is_40G_device(hw->device_id)) && > > > > + (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR)) > > > > + continue; > > > > + > > > > ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); > > > > if (ret < 0) { > > > > PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32, > > > > -- > > > > 1.9.3 > > > > > > > > > >
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index b47a3d2..3bb75d8 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw *hw, uint32_t addr, uint64_t *val) /* * On X710, performance number is far from the expectation on recent firmware - * versions. The fix for this issue may not be integrated in the following + * versions; on XL710, performance number is also far from the expectation on + * recent firmware versions, if promiscuous mode is disabled, or promiscuous + * mode is enabled and port MAC address is equal to the packet destination MAC + * address. The fix for this issue may not be integrated in the following * firmware version. So the workaround in software driver is needed. It needs - * to modify the initial values of 3 internal only registers. Note that the - * workaround can be removed when it is fixed in firmware in the future. + * to modify the initial values of 3 internal only registers for X710, and the + * same 2 internal registers for XL710. Note that the workaround can be removed + * when it is fixed in firmware in the future. */ -static void -i40e_configure_registers(struct i40e_hw *hw) -{ -#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 -#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 -#define I40E_GL_SWR_PM_UP_THR 0x269FBC + +/* For both X710 and XL710 */ #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200 +#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00 + #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200 +#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08 + +/* For X710 only */ #define I40E_GL_SWR_PM_UP_THR_VALUE 0x03030303 +#define I40E_GL_SWR_PM_UP_THR 0x269FBC +static void +i40e_configure_registers(struct i40e_hw *hw) +{ static const struct { uint32_t addr; uint64_t val; @@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw *hw) uint32_t i; int ret; - /* Below fix is for X710 only */ - if (i40e_is_40G_device(hw->device_id)) - return; - for (i = 0; i < RTE_DIM(reg_table); i++) { + if ((i40e_is_40G_device(hw->device_id)) && + (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR)) + continue; + ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); if (ret < 0) { PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32,