[dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:15:24 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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/07/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/87c6bb64850286a80a65477a2c13fad3fd2e8b34

Thanks.

Luca Boccassi

---
>From 87c6bb64850286a80a65477a2c13fad3fd2e8b34 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang at intel.com>
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 <alvinx.zhang at intel.com>
Acked-by: Haiyue Wang <haiyue.wang at intel.com>
---
 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 9a47a8b262..d7a1806ab8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6555,7 +6555,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 6cfbb582e2..7bb8460359 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5634,8 +5634,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.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:31.002416352 +0000
+++ 0038-net-ixgbe-detect-failed-VF-MTU-set.patch	2021-02-05 11:18:28.698689056 +0000
@@ -1 +1 @@
-From c77866a1690416c279c4153d0416c15e9a26547d Mon Sep 17 00:00:00 2001
+From 87c6bb64850286a80a65477a2c13fad3fd2e8b34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list