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 44B35A09E4 for ; Thu, 4 Feb 2021 12:30:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D4D724072F; Thu, 4 Feb 2021 12:30:56 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id CDF62240722 for ; Thu, 4 Feb 2021 12:30:54 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cqc-000561-JP; Thu, 04 Feb 2021 11:30:54 +0000 From: Christian Ehrhardt To: Alvin Zhang Cc: Haiyue Wang , dpdk stable Date: Thu, 4 Feb 2021 12:27:52 +0100 Message-Id: <20210204112954.2488123-17-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' has been queued to stable release 19.11.7 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.7 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/06/21. 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/2616ee630c974a9ef65f2c86e9a8d442214ed302 Thanks. Christian Ehrhardt --- >From 2616ee630c974a9ef65f2c86e9a8d442214ed302 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Wed, 2 Dec 2020 17:48:06 +0800 Subject: [PATCH] net/ixgbe: detect failed VF MTU set [ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ] If a VF request to set a invalid maximum packet length value, The PF kernel driver may disable its reception. This patch add codes to output information and return the error status. Fixes: 12cd0cccc3db ("ixgbevf: allow to set MTU") Signed-off-by: Alvin Zhang Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++- drivers/net/ixgbe/ixgbe_rxtx.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index de528d242b..80bf06a1b4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -6658,7 +6658,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) * prior to 3.11.33 which contains the following change: * "ixgbe: Enable jumbo frames support w/ SR-IOV" */ - ixgbevf_rlpml_set_vf(hw, max_frame); + if (ixgbevf_rlpml_set_vf(hw, max_frame)) + return -EINVAL; /* update max frame size */ dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame; diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index a7b24cd053..8c78cc0589 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -5522,8 +5522,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) * ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way, * VF packets received can work in all cases. */ - ixgbevf_rlpml_set_vf(hw, - (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len); + if (ixgbevf_rlpml_set_vf(hw, + (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) { + PMD_INIT_LOG(ERR, "Set max packet length to %d failed.", + dev->data->dev_conf.rxmode.max_rx_pkt_len); + return -EINVAL; + } /* * Assume no header split and no VLAN strip support -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-04 12:04:28.906743634 +0100 +++ 0017-net-ixgbe-detect-failed-VF-MTU-set.patch 2021-02-04 12:04:27.862789565 +0100 @@ -1 +1 @@ -From c77866a1690416c279c4153d0416c15e9a26547d Mon Sep 17 00:00:00 2001 +From 2616ee630c974a9ef65f2c86e9a8d442214ed302 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 9a47a8b262..d7a1806ab8 100644 +index de528d242b..80bf06a1b4 100644 @@ -25 +26 @@ -@@ -6555,7 +6555,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) +@@ -6658,7 +6658,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) @@ -36 +37 @@ -index 6cfbb582e2..7bb8460359 100644 +index a7b24cd053..8c78cc0589 100644 @@ -39 +40 @@ -@@ -5634,8 +5634,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) +@@ -5522,8 +5522,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)