patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Beilei Xing <beilei.xing@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/i40e: fix link speed for X722' has been queued to LTS release 17.11.7
Date: Mon, 22 Jul 2019 18:01:07 -0700	[thread overview]
Message-ID: <20190723010115.6446-100-yskoh@mellanox.com> (raw)
In-Reply-To: <20190723010115.6446-1-yskoh@mellanox.com>

Hi,

FYI, your patch has been queued to LTS release 17.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 07/27/19. So please
shout if anyone has objection.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Yongseok

---
From 83b55ae6306819b9a6240541d64773637bcd32c8 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 30 Apr 2019 14:56:37 +0800
Subject: [PATCH] net/i40e: fix link speed for X722

[ upstream commit f2310dddf41c19c9c1d77dbd857d4fab1fb368b7 ]

If disable LSC when launching testpmd with X722, shown
link speed is 20G but not 10G. It's caused by wrongly
parsed link speed.
Correct it according to X722 datasheet.

Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 45 ++++++++++++++++++++--------------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 74467454e7..e58c482ac7 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2501,11 +2501,11 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
 #define I40E_PRTMAC_MACC		0x001E24E0
 #define I40E_REG_MACC_25GB		0x00020000
 #define I40E_REG_SPEED_MASK		0x38000000
-#define I40E_REG_SPEED_100MB		0x00000000
-#define I40E_REG_SPEED_1GB		0x08000000
-#define I40E_REG_SPEED_10GB		0x10000000
-#define I40E_REG_SPEED_20GB		0x20000000
-#define I40E_REG_SPEED_25_40GB		0x18000000
+#define I40E_REG_SPEED_0		0x00000000
+#define I40E_REG_SPEED_1		0x08000000
+#define I40E_REG_SPEED_2		0x10000000
+#define I40E_REG_SPEED_3		0x18000000
+#define I40E_REG_SPEED_4		0x20000000
 	uint32_t link_speed;
 	uint32_t reg_val;
 
@@ -2519,26 +2519,35 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
 
 	/* Parse the link status */
 	switch (link_speed) {
-	case I40E_REG_SPEED_100MB:
+	case I40E_REG_SPEED_0:
 		link->link_speed = ETH_SPEED_NUM_100M;
 		break;
-	case I40E_REG_SPEED_1GB:
+	case I40E_REG_SPEED_1:
 		link->link_speed = ETH_SPEED_NUM_1G;
 		break;
-	case I40E_REG_SPEED_10GB:
-		link->link_speed = ETH_SPEED_NUM_10G;
-		break;
-	case I40E_REG_SPEED_20GB:
-		link->link_speed = ETH_SPEED_NUM_20G;
+	case I40E_REG_SPEED_2:
+		if (hw->mac.type == I40E_MAC_X722)
+			link->link_speed = ETH_SPEED_NUM_2_5G;
+		else
+			link->link_speed = ETH_SPEED_NUM_10G;
 		break;
-	case I40E_REG_SPEED_25_40GB:
-		reg_val = I40E_READ_REG(hw, I40E_PRTMAC_MACC);
+	case I40E_REG_SPEED_3:
+		if (hw->mac.type == I40E_MAC_X722) {
+			link->link_speed = ETH_SPEED_NUM_5G;
+		} else {
+			reg_val = I40E_READ_REG(hw, I40E_PRTMAC_MACC);
 
-		if (reg_val & I40E_REG_MACC_25GB)
-			link->link_speed = ETH_SPEED_NUM_25G;
+			if (reg_val & I40E_REG_MACC_25GB)
+				link->link_speed = ETH_SPEED_NUM_25G;
+			else
+				link->link_speed = ETH_SPEED_NUM_40G;
+		}
+		break;
+	case I40E_REG_SPEED_4:
+		if (hw->mac.type == I40E_MAC_X722)
+			link->link_speed = ETH_SPEED_NUM_10G;
 		else
-			link->link_speed = ETH_SPEED_NUM_40G;
-
+			link->link_speed = ETH_SPEED_NUM_20G;
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "Unknown link speed info %u", link_speed);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-07-22 17:55:11.865193997 -0700
+++ 0100-net-i40e-fix-link-speed-for-X722.patch	2019-07-22 17:55:06.504474000 -0700
@@ -1,15 +1,16 @@
-From f2310dddf41c19c9c1d77dbd857d4fab1fb368b7 Mon Sep 17 00:00:00 2001
+From 83b55ae6306819b9a6240541d64773637bcd32c8 Mon Sep 17 00:00:00 2001
 From: Beilei Xing <beilei.xing@intel.com>
 Date: Tue, 30 Apr 2019 14:56:37 +0800
 Subject: [PATCH] net/i40e: fix link speed for X722
 
+[ upstream commit f2310dddf41c19c9c1d77dbd857d4fab1fb368b7 ]
+
 If disable LSC when launching testpmd with X722, shown
 link speed is 20G but not 10G. It's caused by wrongly
 parsed link speed.
 Correct it according to X722 datasheet.
 
 Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
-Cc: stable@dpdk.org
 
 Signed-off-by: Beilei Xing <beilei.xing@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 27 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 62865c5fd9..2eea5232a0 100644
+index 74467454e7..e58c482ac7 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -2670,11 +2670,11 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
+@@ -2501,11 +2501,11 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
  #define I40E_PRTMAC_MACC		0x001E24E0
  #define I40E_REG_MACC_25GB		0x00020000
  #define I40E_REG_SPEED_MASK		0x38000000
@@ -38,7 +39,7 @@
  	uint32_t link_speed;
  	uint32_t reg_val;
  
-@@ -2688,26 +2688,35 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
+@@ -2519,26 +2519,35 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
  
  	/* Parse the link status */
  	switch (link_speed) {

  parent reply	other threads:[~2019-07-23  1:04 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  0:59 [dpdk-stable] patch 'eal: improve musl compatibility of string functions' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/mlx5: fix instruction hotspot on replenishing Rx buffer' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'drivers/net: do not use private ethdev data' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/sfc: log port ID as 16-bit unsigned integer on panic' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/sfc: remove control path logging from Rx queue count' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/virtio: remove forward declaration' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'eal: support strlcat function' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'mbuf: fix a typo' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/bnxt: support IOVA VA mode' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'doc: fix a minor typo in testpmd guide' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/bonding: avoid warning for invalid port' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/bonding: fix reset active slave' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'mk: fix build of shared library with libbsd' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/bnx2x: fix segfaults due to stale interrupt status' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'doc: remove reference to rte.doc.mk in programmers guide' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'examples/ethtool: fix two typos' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'doc: fix link in Linux getting started guide' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'mk: fix AVX512 disabled warning on non x86' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'bus/vdev: fix debug message on probing' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'eal: fix check when retrieving current CPU affinity' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'eal: remove dead code in core list parsing' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/enic: fix flow director SCTP matching' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/enic: fix SCTP match for flow API' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/enic: check for unsupported flow item types' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/ixgbe: fix crash on remove' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/mlx5: fix hex dump of error completion' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/mlx5: fix sync when handling Tx completions' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Yongseok Koh
2019-07-23  0:59 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bonding: fix queue index " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'eal/ppc: fix global memory " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'bus/dpaa: fix Rx discard register mask' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'power: fix frequency list buffer validation' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'bus/fslmc: remove unused include of error.h' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'bus/fslmc: fix build with musl libc' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/test: " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/testpmd: remove useless casts on statistics' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'ethdev: fix a typo' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx VLAN offload flags' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/fm10k: fix VLAN strip offload flag' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/virtio: fix duplicate naming of include guard' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/virtio: remove useless condition' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/test: fix sprintf with strlcat' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'maintainers: update for IBM POWER' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'ring: fix an error message' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'event/sw: fix enqueue checks in self-test' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix session clearing' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'ring: fix namesize macro documentation block' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bonding: fix buffer length when printing strings' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'test/distributor: replace sprintf with strlcpy' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'test/hash: replace sprintf with snprintf' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'eal: fix typo in comment of vector function' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'doc: fix links to doxygen and sphinx sites' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'cfgfile: replace strcat with strlcat' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/testpmd: fix typo in comment' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net: fix Tx VLAN flag for offload emulation' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'examples/l2fwd-cat: fix build on FreeBSD' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/crypto-perf: check range of socket id' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'kni: fix build with Linux 5.1' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnx2x: fix DMAE " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/bnx2x: fix optic module verification' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'vhost: fix device leak on connection add failure' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'bitrate: fix unchecked return value' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'bus/fslmc: " Yongseok Koh
2019-07-23  1:00 ` [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/mlx5: fix comments mixing Rx and Tx' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'doc: fix interactive commands in testpmd guide' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/ring: avoid hard-coded length' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/ring: use calloc style where appropriate' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/ring: check length of ring name' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/ring: fix return value check' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/kni: " Yongseok Koh
2019-07-23  1:01 ` Yongseok Koh [this message]
2019-07-23  1:01 ` [dpdk-stable] patch 'net/mlx5: check Tx queue size overflow' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/mlx5: fix max number of queues for NEON Tx' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'app/testpmd: revert fixed flag for exact link speed' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'hash: fix doc about thread/process safety' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'doc: fix broken link in LPM guide' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'net/mlx5: fix release of Rx queue object' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'doc: fix typo in mlx5 guide' " Yongseok Koh
2019-07-23  1:01 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix build error log' " Yongseok Koh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723010115.6446-100-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=beilei.xing@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).