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 05390A034C for ; Fri, 25 Feb 2022 18:17:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 007EB41152; Fri, 25 Feb 2022 18:17:45 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id E4E1E410FD for ; Fri, 25 Feb 2022 18:17:43 +0100 (CET) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A70963F1BC for ; Fri, 25 Feb 2022 17:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809463; bh=I8w540YMQQdn6JMEcuTe4ACXnCFGLV2aEzo+v3vdm2A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ggGp8bWac6sD5DKwew6X5qPkmGehRY/Uk59rnmgaTov9syiXkEc3fWdqK9HzcQQfN q4E1pPJFTaOdeOw0bZJgiOyTk2uNAZu+VbQ5qGZKN/upJGsPRJjzHr2RvFi90/W968 VbvQlKafRiEvoHcGVxn7XFXgVA1tvyJRdfLkm04+dIoo7vqGtJ4k91YmAaplQP3XiX xs43H2PwJjVi4ufs+yRf8rhtvO97wuwGPhLC61mbcHp6XOSBxJyTjLdHJzMps4zXqM htA4aSmHXVw5lYEwKTlZqiRANSelFzU6sus9F4rjMgMA20w8aA5sju7pN4EC60AZms O2SzG34SPCsrA== Received: by mail-wm1-f70.google.com with SMTP id v125-20020a1cac83000000b0037e3d70e7e1so1847486wme.1 for ; Fri, 25 Feb 2022 09:17:43 -0800 (PST) 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=I8w540YMQQdn6JMEcuTe4ACXnCFGLV2aEzo+v3vdm2A=; b=quhjjrM3el0CTtMAZ22y7CNtUB3OXN97IqsL2V1YKofD/2B5q7Rm9ak22ZmmMl4+Y8 tDE6B/ynwGFdlIf0t6rYF8necPUfqLndFJAlvNtJ+K4Zk8gfCGjKc1371ANGAAUHpLa7 cr7EFSkCGXkW95cOFP3K2GZV6JWvDRPrJLAeDHuAuoZQdKSwh13EHDpvxyEEUGCSNNZW JzDRZtyNytsrTnEWiTmhONTjR970RRAwwOkMEnpQTRxX0x3lx9Elcfd/ntw44A/HUWRO bel06DA52By++EYxEvzhYHHfJje/U10qn3IZsEBOSH1et9fqSE8zvrvrsc0p3MwKZzMD p7vg== X-Gm-Message-State: AOAM530UvgND7/QHk0selJHyKmmUkzdBPib4wPspyN2eQMBi/jzcpn8Q 9IzLOZlH4LztbmHhcmnC0a/BCT6Sof5ilJP3HDDULsSPkDOiAQmOxKez7mEImPP8EKBtBVDG+h7 PnwQp4d7j1W0/k95kgRqCjFs3 X-Received: by 2002:a05:6000:1cb:b0:1ed:c295:3e3b with SMTP id t11-20020a05600001cb00b001edc2953e3bmr7144350wrx.111.1645809461769; Fri, 25 Feb 2022 09:17:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3V1YF5awMnVSuivBuTxSQ5ofE3hv6Num4Dff//Tf2spHRrkgCIvMbyj4TJYZfsCjzES650g== X-Received: by 2002:a05:6000:1cb:b0:1ed:c295:3e3b with SMTP id t11-20020a05600001cb00b001edc2953e3bmr7144338wrx.111.1645809461515; Fri, 25 Feb 2022 09:17:41 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id a3-20020adfe5c3000000b001e68a5e1c20sm2830030wrn.4.2022.02.25.09.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:17:41 -0800 (PST) From: christian.ehrhardt@canonical.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 19.11.12 Date: Fri, 25 Feb 2022 18:15:31 +0100 Message-Id: <20220225171550.3499040-38-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.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 19.11.12 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/27/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/f18c3d166a6fd2b1fdba5d6b6393220fedc48542 Thanks. Christian Ehrhardt --- >From f18c3d166a6fd2b1fdba5d6b6393220fedc48542 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 df76dfce7f..177a526df0 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2406,7 +2406,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; @@ -2416,22 +2415,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.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:45.700844070 +0100 +++ 0038-net-hns3-fix-max-packet-size-rollback-in-PF.patch 2022-02-25 16:58:44.252990423 +0100 @@ -1 +1 @@ -From e8f1f783d1cd61faf12658df64726bca88b7ff63 Mon Sep 17 00:00:00 2001 +From f18c3d166a6fd2b1fdba5d6b6393220fedc48542 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 df76dfce7f..177a526df0 100644 @@ -26 +27 @@ -@@ -2075,7 +2075,6 @@ static int +@@ -2406,7 +2406,6 @@ static int @@ -34 +35 @@ -@@ -2085,22 +2084,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps) +@@ -2416,22 +2415,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)