[dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:00 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/92569f9804d1ea7ab44a916fae55aec220823349

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Date: Thu, 2 Sep 2021 17:39:39 +0300
Subject: [PATCH] net/virtio: fix device configure without jumbo Rx offload
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]

Use max-pkt-len only if jumbo frames offload is requested
since otherwise this field isn't valid.

Fixes: 8b90e4358112 ("net/virtio: set offload flag for jumbo frames")
Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 25f1b951f9..7bbd483952 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 			return ret;
 	}
 
-	if (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len)
+	if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) &&
+	    (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len))
 		req_features &= ~(1ULL << VIRTIO_NET_F_MTU);
 
-	hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
+		hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+	else
+		hw->max_rx_pkt_len = ether_hdr_len + dev->data->mtu;
 
 	if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
 			   DEV_RX_OFFLOAD_TCP_CKSUM))
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.587367188 +0800
+++ 0056-net-virtio-fix-device-configure-without-jumbo-Rx-off.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 580f3af31c99824bdd1cc331035096e34de5ca01 Mon Sep 17 00:00:00 2001
+From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 51fa85b078..da1633d77e 100644
+index 25f1b951f9..7bbd483952 100644
@@ -24 +26 @@
-@@ -2103,10 +2103,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)


More information about the stable mailing list