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 18DBFA0032 for ; Fri, 18 Feb 2022 13:43:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1403940141; Fri, 18 Feb 2022 13:43:53 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 6237541142 for ; Fri, 18 Feb 2022 13:43:51 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id k1so14384278wrd.8 for ; Fri, 18 Feb 2022 04:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dcMNE7fMSSy/LDjMQvc/oAp0GWA0n/5co+R+Gj12k4I=; b=FGcmgEt0eswFZgO5/pJJH8bx9rKZ8SXck3qXdci/b1k0gJmRdYvRvASQFeEpglgdoR c/MW5//XbCo73Blpf7e4G2QGV9+nJ6FtQ/yG8CouygOgwsPuflY9+7fls4V/vhGjJfvZ KHYoXwbQEBQ7zzATwd3uP96hGy69d8G1J8b98YJfZy+Qmn1OfYCWepnz23hJ64Cy8DY0 itVpKn6us7GMaEaqg/3soWEG0pyKKkB+KhUTG4EzwnLz6+/4T1lJFq0oAtIT8INck0w6 94K5xtH2G+m8QUqnJv6s2MILRmRvQeb5/5l6/zQB5FvmME01Bv2aK9hvD/DqzcRT/HtJ Q9eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dcMNE7fMSSy/LDjMQvc/oAp0GWA0n/5co+R+Gj12k4I=; b=Fx2JIN5QuZZYR5JylTy0u+vv36BY41iwGH6yl/uF8993qYk518Stj1OmyWmHC+myx4 aL/A+1QOMrVViR+xNB68GqgMLhB/qbI9WqnzrrRPI5yFkLuB3tZK+brtOf0wO75J4//Q niX7GnHgELV5xYLyYvvXWPLBPs4xTCLXtvJXrE9rVoI3b4UHOzqFbY7cmaYpS5wMQdFV XMNiH4pGmKxuOhIcDkgUw4ZsaZG9lW3qqWj8sBnqn1fYtNY+VgIupr0WNonJbaZ8klI8 tpxcrZMzS8hyCdbn7HIe6nIrKzfTPG75m+3E96jedzkiWJLuXgraEyxI1d2fi0daxKfl CK+w== X-Gm-Message-State: AOAM533D05Ldpp5FNsEMsFdBZdaSIuKD+y5tCKrrONZ6nZpmnaWz1PVS XYuY7wk/3ah9pzqJV9wWK4GyKVMGr/17NSfL X-Google-Smtp-Source: ABdhPJxeDaP3hs9HGksXKVTZldmEHY0IeOT94+VzjS3h3SqWsMnFpsaP+Ft6KH3W37oDem7xaIcoUw== X-Received: by 2002:adf:e3cc:0:b0:1e3:24e4:4519 with SMTP id k12-20020adfe3cc000000b001e324e44519mr6069152wrm.230.1645188231127; Fri, 18 Feb 2022 04:43:51 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id t18sm4546055wmq.2.2022.02.18.04.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:43:50 -0800 (PST) From: luca.boccassi@gmail.com To: Huisong Li Cc: Min Hu , dpdk stable Subject: patch 'net/hns3: fix max packet size rollback in PF' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:52 +0000 Message-Id: <20220218123931.1749595-83-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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.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 02/20/22. 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/edfefb90ca2987fd7b0ee8daabb47362b234ace5 Thanks. Luca Boccassi --- >From edfefb90ca2987fd7b0ee8daabb47362b234ace5 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 28 Jan 2022 10:07:03 +0800 Subject: [PATCH] net/hns3: fix max packet size rollback in PF [ upstream commit e8f1f783d1cd61faf12658df64726bca88b7ff63 ] HNS3 PF driver use the hns->pf.mps to restore the MTU when a reset occurs. If user fails to configure the MTU, the MPS of PF may not be restored to the original value. Fixes: 25fb790f7868 ("net/hns3: fix HW buffer size on MTU update") Fixes: 1f5ca0b460cd ("net/hns3: support some device operations") Fixes: d51867db65c1 ("net/hns3: add initialization") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index fcbff7e5ae..8514d62617 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2457,7 +2457,6 @@ static int hns3_config_mtu(struct hns3_hw *hw, uint16_t mps) { struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); - uint16_t original_mps = hns->pf.mps; int err; int ret; @@ -2467,22 +2466,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps) return ret; } - hns->pf.mps = mps; ret = hns3_buffer_alloc(hw); if (ret) { hns3_err(hw, "failed to allocate buffer, ret = %d", ret); goto rollback; } + hns->pf.mps = mps; + return 0; rollback: - err = hns3_set_mac_mtu(hw, original_mps); - if (err) { + err = hns3_set_mac_mtu(hw, hns->pf.mps); + if (err) hns3_err(hw, "fail to rollback MTU, err = %d", err); - return ret; - } - hns->pf.mps = original_mps; return ret; } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.081383105 +0000 +++ 0083-net-hns3-fix-max-packet-size-rollback-in-PF.patch 2022-02-18 12:37:37.766793617 +0000 @@ -1 +1 @@ -From e8f1f783d1cd61faf12658df64726bca88b7ff63 Mon Sep 17 00:00:00 2001 +From edfefb90ca2987fd7b0ee8daabb47362b234ace5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e8f1f783d1cd61faf12658df64726bca88b7ff63 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index a5114662d2..73bf209717 100644 +index fcbff7e5ae..8514d62617 100644 @@ -26 +27 @@ -@@ -2075,7 +2075,6 @@ static int +@@ -2457,7 +2457,6 @@ static int @@ -34 +35 @@ -@@ -2085,22 +2084,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps) +@@ -2467,22 +2466,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)