From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C01A641D50 for ; Thu, 23 Feb 2023 10:40:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD11F431B9; Thu, 23 Feb 2023 10:40:05 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id AD359427E9 for ; Thu, 23 Feb 2023 10:40:04 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id 6so9732905wrb.11 for ; Thu, 23 Feb 2023 01:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w5aT4m1zhnbudU6KZH9z4cGAtR8kix+EVRg3iU/4IFA=; b=B48qUHDzDwYFYBuY7CHTbc6/TbA4i4KoSiLq9b4LwrH9kp5celh1/yGLnX1x8537+H JPn+gLwGQlsrixypd1wPzmErWi48N4+2lCAnqdCvcJinCnAJyQWbVIUTh18GHd6YiND3 akNsX7Q4dzva0WwtHwIBWRGrVkzBMquoIYOI8vP+JIxFfdAK6JtRG5kuqpYe9YzmZBGB KaEgXUFwmgLGOIK4NGNAPZTkKMXLZrcpbgWaB1UKooQZvLPI/KlIA4U3NQzL+6z7L798 3HqWaz1qYcz9oM9vZCaGicMCwoNJb4LiweQNM8WNZ1TaU6ag6Tan3qV41Vhlyal09xtD l/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w5aT4m1zhnbudU6KZH9z4cGAtR8kix+EVRg3iU/4IFA=; b=kW4PgV5tmbwLZY2Held1ge4UxJvbaWaPoWk82ox7iT4JMKl7TNLqpzklAIxS0eS7WX 5rNVjlssNxompgO6+2RjUY6whAJjM2wA6HqNYJCRKXTKqcCQmD6Bhqy7gLd5GiN4KXEM Nw0kJLiHjgIkWpdrfJbgTcUH5ADRP4BnbGUxlidqBrwo7pgdFu1LqMZR9pK6oDH0GWoK /EbNmkkchMFPVBvFRxdCs/0aCd+l0IEqpzzyCEjGp2D1PuUCs409ynOIHLbmJuV3sgL4 eCu2pdO2nNfYKs+xkwHFXIVUH7UQlkWLxA0FeZjd6GAR/9Kfl27blCC7N1VhIFUdmMfU 4m0Q== X-Gm-Message-State: AO0yUKU9It5t5DuyB2P34Sgz6CKlJ8TT+fAqkDAgjuR4hTLUII6ZJOtX pPn2Qw3A+RSdJsMFNav/A+8FxPoaaj+t0w== X-Google-Smtp-Source: AK7set/xwe4BrD/7mvnjBSZcMI9dqmjsnW/rBJx1UC/N+66fR9qAXpuLEPrZ4jKDoMVSbfL+Gwcj7Q== X-Received: by 2002:a05:6000:1210:b0:2c3:eafd:143d with SMTP id e16-20020a056000121000b002c3eafd143dmr10823080wrx.69.1677145204435; Thu, 23 Feb 2023 01:40:04 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id i8-20020a5d5228000000b002c70851bfcasm5017090wra.28.2023.02.23.01.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:40:04 -0800 (PST) From: luca.boccassi@gmail.com To: Shiyang He Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , dpdk stable Subject: patch 'net/ixgbe: fix firmware version consistency' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:59 +0000 Message-Id: <20230223093715.3926893-55-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. 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. 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. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/060c26e4450a9237b49f8dc75fac282d05bb0e25 Thanks. Luca Boccassi --- >From 060c26e4450a9237b49f8dc75fac282d05bb0e25 Mon Sep 17 00:00:00 2001 From: Shiyang He Date: Mon, 9 Jan 2023 06:53:09 +0000 Subject: [PATCH] net/ixgbe: fix firmware version consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ] This patch follows the code of ixgbe kernel driver so that it keeps the firmware version obtained by dpdk-ethtool consistent with that obtained by linux-ethtool. Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get") Signed-off-by: Shiyang He Acked-by: Morten Brørup --- drivers/net/ixgbe/ixgbe_ethdev.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index cee7ee33f3..8041749e71 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3869,23 +3869,32 @@ static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - u16 eeprom_verh, eeprom_verl; - u32 etrack_id; + struct ixgbe_nvm_version nvm_ver; int ret; - ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh); - ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl); + ixgbe_get_oem_prod_version(hw, &nvm_ver); + if (nvm_ver.oem_valid) { + snprintf(fw_version, fw_size, "%x.%x.%x", + nvm_ver.oem_major, nvm_ver.oem_minor, + nvm_ver.oem_release); + return 0; + } - etrack_id = (eeprom_verh << 16) | eeprom_verl; - ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id); + ixgbe_get_etk_id(hw, &nvm_ver); + ixgbe_get_orom_version(hw, &nvm_ver); + + if (nvm_ver.or_valid) { + snprintf(fw_version, fw_size, "0x%08x, %d.%d.%d", + nvm_ver.etk_id, nvm_ver.or_major, + nvm_ver.or_build, nvm_ver.or_patch); + return 0; + } + + ret = snprintf(fw_version, fw_size, "0x%08x", nvm_ver.etk_id); if (ret < 0) return -EINVAL; - ret += 1; /* add the size of '\0' */ - if (fw_size < (size_t)ret) - return ret; - else - return 0; + return (fw_size < (size_t)ret++) ? ret : 0; } static int -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:30.427170255 +0000 +++ 0055-net-ixgbe-fix-firmware-version-consistency.patch 2023-02-23 09:36:28.326171781 +0000 @@ -1 +1 @@ -From b5c4535d5d9a6cf363f548503c2c755be0ab656b Mon Sep 17 00:00:00 2001 +From 060c26e4450a9237b49f8dc75fac282d05bb0e25 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +19,0 @@ - .mailmap | 1 + @@ -21 +21 @@ - 2 files changed, 21 insertions(+), 11 deletions(-) + 1 file changed, 20 insertions(+), 11 deletions(-) @@ -23,12 +22,0 @@ -diff --git a/.mailmap b/.mailmap -index b797fec215..cb9bd28bd3 100644 ---- a/.mailmap -+++ b/.mailmap -@@ -1217,6 +1217,7 @@ Shiqi Liu <835703180@qq.com> - Shiri Kuzin - Shivanshu Shukla - Shiweixian -+Shiyang He - Shlomi Gridish - Shougang Wang - Shraddha Joshi @@ -36 +24 @@ -index 3f8da11bd1..88118bc305 100644 +index cee7ee33f3..8041749e71 100644 @@ -39 +27 @@ -@@ -3853,23 +3853,32 @@ static int +@@ -3869,23 +3869,32 @@ static int