From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4407D1B494 for ; Thu, 22 Nov 2018 17:53:03 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A4CE5307D860; Thu, 22 Nov 2018 16:53:02 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B14C60E3F; Thu, 22 Nov 2018 16:53:01 +0000 (UTC) From: Kevin Traynor To: Haiyue Wang Cc: Qi Zhang , dpdk stable Date: Thu, 22 Nov 2018 16:49:42 +0000 Message-Id: <20181122164957.13003-50-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 22 Nov 2018 16:53:02 +0000 (UTC) Subject: [dpdk-stable] patch 'net/i40e: enable loopback function for X722 MAC' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 16:53:03 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/28/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. Kevin Traynor --- >>From eab51dd4f64d8a0d54875b0c74b3890e91d07c8d Mon Sep 17 00:00:00 2001 From: Haiyue Wang 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 Acked-by: Qi Zhang --- 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 541bab7d0..53b40fa1f 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5287,5 +5287,5 @@ i40e_enable_pf_lb(struct i40e_pf *pf) /* 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; @@ -5558,5 +5558,5 @@ i40e_vsi_setup(struct i40e_pf *pf, /* 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 |= diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c index bba62b1c5..7ce5d02fa 100644 --- a/drivers/net/i40e/rte_pmd_i40e.c +++ b/drivers/net/i40e/rte_pmd_i40e.c @@ -339,5 +339,5 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on) /* 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.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:33.567429226 +0000 +++ 0050-net-i40e-enable-loopback-function-for-X722-MAC.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,8 +1,10 @@ -From 2c6d4f0338efc2134efc55a574f73ac481b323b4 Mon Sep 17 00:00:00 2001 +From eab51dd4f64d8a0d54875b0c74b3890e91d07c8d Mon Sep 17 00:00:00 2001 From: Haiyue Wang 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@dpdk.org Signed-off-by: Haiyue Wang Acked-by: Qi Zhang @@ -20,17 +21,17 @@ 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 541bab7d0..53b40fa1f 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c -@@ -5373,5 +5373,5 @@ i40e_enable_pf_lb(struct i40e_pf *pf) +@@ -5287,5 +5287,5 @@ i40e_enable_pf_lb(struct i40e_pf *pf) /* 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; -@@ -5644,5 +5644,5 @@ i40e_vsi_setup(struct i40e_pf *pf, +@@ -5558,5 +5558,5 @@ i40e_vsi_setup(struct i40e_pf *pf, /* Use the VEB configuration if FW >= v5.0 */ - if (hw->aq.fw_maj_ver >= 5) {