[dpdk-stable] patch 'net/i40e: enable loopback function for X722 MAC' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:11 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From 840c84aabf21111c768f0fa0d83219dffcbac872 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang at intel.com>
Date: Mon, 22 Oct 2018 15:47:41 +0800
Subject: [PATCH] net/i40e: enable loopback function for X722 MAC

[ upstream commit 2c6d4f0338efc2134efc55a574f73ac481b323b4 ]

In FVL, there was an issue and it didn't support the loopback function
before FW 5.0. For FPK (X722) it should work.

So it needs to distinguish between the devices by checking MAC type.

Fixes: 689bba33272d ("i40e: add VEB switching support")
Fixes: bce83974ba2c ("net/i40e: set Tx loopback from PF")

Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_ethdev.c  | 4 ++--
 drivers/net/i40e/rte_pmd_i40e.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5bbc3c44b..5e2a0f79f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5079,7 +5079,7 @@ i40e_enable_pf_lb(struct i40e_pf *pf)
 	int ret;
 
 	/* Use the FW API if FW >= v5.0 */
-	if (hw->aq.fw_maj_ver < 5) {
+	if (hw->aq.fw_maj_ver < 5 && hw->mac.type != I40E_MAC_X722) {
 		PMD_INIT_LOG(ERR, "FW < v5.0, cannot enable loopback");
 		return;
 	}
@@ -5350,7 +5350,7 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
 
 		/* Use the VEB configuration if FW >= v5.0 */
-		if (hw->aq.fw_maj_ver >= 5) {
+		if (hw->aq.fw_maj_ver >= 5 || hw->mac.type == I40E_MAC_X722) {
 			/* Configure switch ID */
 			ctxt.info.valid_sections |=
 			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 2d25873d6..5771645c0 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -367,7 +367,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
 	hw = I40E_VSI_TO_HW(vsi);
 
 	/* Use the FW API if FW >= v5.0 */
-	if (hw->aq.fw_maj_ver < 5) {
+	if (hw->aq.fw_maj_ver < 5 && hw->mac.type != I40E_MAC_X722) {
 		PMD_INIT_LOG(ERR, "FW < v5.0, cannot enable loopback");
 		return -ENOTSUP;
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:48.616091759 -0800
+++ 0077-net-i40e-enable-loopback-function-for-X722-MAC.patch	2018-11-29 15:01:45.205962000 -0800
@@ -1,8 +1,10 @@
-From 2c6d4f0338efc2134efc55a574f73ac481b323b4 Mon Sep 17 00:00:00 2001
+From 840c84aabf21111c768f0fa0d83219dffcbac872 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang at intel.com>
 Date: Mon, 22 Oct 2018 15:47:41 +0800
 Subject: [PATCH] net/i40e: enable loopback function for X722 MAC
 
+[ upstream commit 2c6d4f0338efc2134efc55a574f73ac481b323b4 ]
+
 In FVL, there was an issue and it didn't support the loopback function
 before FW 5.0. For FPK (X722) it should work.
 
@@ -10,7 +12,6 @@
 
 Fixes: 689bba33272d ("i40e: add VEB switching support")
 Fixes: bce83974ba2c ("net/i40e: set Tx loopback from PF")
-Cc: stable at dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
 Acked-by: Qi Zhang <qi.z.zhang at intel.com>
@@ -20,10 +21,10 @@
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 48aca1aca..1c779068a 100644
+index 5bbc3c44b..5e2a0f79f 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -5372,7 +5372,7 @@ i40e_enable_pf_lb(struct i40e_pf *pf)
+@@ -5079,7 +5079,7 @@ i40e_enable_pf_lb(struct i40e_pf *pf)
  	int ret;
  
  	/* Use the FW API if FW >= v5.0 */
@@ -32,7 +33,7 @@
  		PMD_INIT_LOG(ERR, "FW < v5.0, cannot enable loopback");
  		return;
  	}
-@@ -5643,7 +5643,7 @@ i40e_vsi_setup(struct i40e_pf *pf,
+@@ -5350,7 +5350,7 @@ i40e_vsi_setup(struct i40e_pf *pf,
  		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
  
  		/* Use the VEB configuration if FW >= v5.0 */
@@ -42,10 +43,10 @@
  			ctxt.info.valid_sections |=
  			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
 diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
-index bba62b1c5..7ce5d02fa 100644
+index 2d25873d6..5771645c0 100644
 --- a/drivers/net/i40e/rte_pmd_i40e.c
 +++ b/drivers/net/i40e/rte_pmd_i40e.c
-@@ -338,7 +338,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
+@@ -367,7 +367,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
  	hw = I40E_VSI_TO_HW(vsi);
  
  	/* Use the FW API if FW >= v5.0 */


More information about the stable mailing list