From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 1AE7EF94 for ; Mon, 29 Oct 2018 13:54:08 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id y15-v6so8553804wru.9 for ; Mon, 29 Oct 2018 05:54:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jZx/OZuUJ5RJeZqHPjchKWF2n3BZ9bhHRT4c+AIBJ9c=; b=LBZXuKatntKC+PsMgj0k3U9KOzNl3WnKed0dAwNJrAiHgVMNVBsOmzKQu2MG1BMre7 cB7NJo+WMcNJYkRLq2d6jtFHEMmI9qGj6//KoqH1rXRgScOlvizc3UKBQ6g026+XQ6Az MG2T63STOmuzbKK2VjD7yj+vSPzy88c5L7oQdE7NQMOSc4Go5SpziCKlpUr/doAahcGr NqWSf9pjMLXOdwn/jg0pvBu9uG4ZE7J4KHtrLPsJbHwr9PzabYdAFyeQMZBq8qdVlUI3 w8s/ZCuvPJGdMB4pQPRBBtbFkOaXrViE7+7WP3raGV0g3r04w48ou5ku1nBRZ06OYXw5 QpMg== X-Gm-Message-State: AGRZ1gKAUPcFZxqMnuDxw+P2hMqjQkotRXfoZamSlzXiEH2eZU44Pf1g dQ1yx1jslP30YCpG49GBle8= X-Google-Smtp-Source: AJdET5fa8wspK431CncGv8voSSntapzJIxrySBzuWPT7Uq6IM2LJDnnUKSRHDgJwHB/FHP49mkmSqw== X-Received: by 2002:a05:6000:10e:: with SMTP id o14mr2172084wrx.279.1540817647629; Mon, 29 Oct 2018 05:54:07 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id m16sm14935445wrx.75.2018.10.29.05.54.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 05:54:06 -0700 (PDT) From: Luca Boccassi To: Haiyue Wang Cc: Qi Zhang , dpdk stable Date: Mon, 29 Oct 2018 12:53:22 +0000 Message-Id: <20181029125329.17729-13-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181029125329.17729-1-bluca@debian.org> References: <20181015115144.27626-1-bluca@debian.org> <20181029125329.17729-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: enable loopback function for X722 MAC' has been queued to LTS release 16.11.9 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: Mon, 29 Oct 2018 12:54:08 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/31/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. Luca Boccassi --- >>From c4ba88a06b7cef17dc8db6705e423988080ff8ed 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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index f98be9429..52974a3a9 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4593,7 +4593,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; } @@ -4862,7 +4862,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); -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-29 12:48:14.722219560 +0000 +++ 0013-net-i40e-enable-loopback-function-for-X722-MAC.patch 2018-10-29 12:48:14.466417981 +0000 @@ -1,8 +1,10 @@ -From 2c6d4f0338efc2134efc55a574f73ac481b323b4 Mon Sep 17 00:00:00 2001 +From c4ba88a06b7cef17dc8db6705e423988080ff8ed 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,20 +12,18 @@ 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 --- - drivers/net/i40e/i40e_ethdev.c | 4 ++-- - drivers/net/i40e/rte_pmd_i40e.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + drivers/net/i40e/i40e_ethdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c -index 48aca1aca..1c779068a 100644 +index f98be9429..52974a3a9 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) +@@ -4593,7 +4593,7 @@ i40e_enable_pf_lb(struct i40e_pf *pf) int ret; /* Use the FW API if FW >= v5.0 */ @@ -32,7 +32,7 @@ PMD_INIT_LOG(ERR, "FW < v5.0, cannot enable loopback"); return; } -@@ -5643,7 +5643,7 @@ i40e_vsi_setup(struct i40e_pf *pf, +@@ -4862,7 +4862,7 @@ i40e_vsi_setup(struct i40e_pf *pf, ctxt.flags = I40E_AQ_VSI_TYPE_VF; /* Use the VEB configuration if FW >= v5.0 */ @@ -41,19 +41,6 @@ /* 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 bba62b1c5..7ce5d02fa 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) - 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.19.1