[dpdk-stable] patch 'vdpa/mlx5: fix TSO offload without checksum' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:04:50 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

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

Thanks.

Luca Boccassi

---
>From 3cc66cf708ba329b29a658090d20368ce3256f56 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at nvidia.com>
Date: Sun, 13 Jun 2021 20:51:39 +0800
Subject: [PATCH] vdpa/mlx5: fix TSO offload without checksum

[ upstream commit ff09f8069702bd233f5d39c4d0b8cfbc392d9edc ]

Packet was corrupted when TSO requested without CSUM update.

Enables CSUM automatically if only TSO requested.

Fixes: 2aa8444b0084 ("vdpa/mlx5: support stateless offloads")

Signed-off-by: Xueming Li <xuemingl at nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 87704c782b..472bda6c23 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -439,6 +439,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)
 		DRV_LOG(ERR, "Failed to configure negotiated features.");
 		return -1;
 	}
+	if ((priv->features & (1ULL << VIRTIO_NET_F_CSUM)) == 0 &&
+	    ((priv->features & (1ULL << VIRTIO_NET_F_HOST_TSO4)) > 0 ||
+	     (priv->features & (1ULL << VIRTIO_NET_F_HOST_TSO6)) > 0)) {
+		/* Packet may be corrupted if TSO is enabled without CSUM. */
+		DRV_LOG(INFO, "TSO is enabled without CSUM, force CSUM.");
+		priv->features |= (1ULL << VIRTIO_NET_F_CSUM);
+	}
 	if (nr_vring > priv->caps.max_num_virtio_queues * 2) {
 		DRV_LOG(ERR, "Do not support more than %d virtqs(%d).",
 			(int)priv->caps.max_num_virtio_queues * 2,
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:39.520996085 +0100
+++ 0055-vdpa-mlx5-fix-TSO-offload-without-checksum.patch	2021-07-12 13:41:36.446121694 +0100
@@ -1 +1 @@
-From ff09f8069702bd233f5d39c4d0b8cfbc392d9edc Mon Sep 17 00:00:00 2001
+From 3cc66cf708ba329b29a658090d20368ce3256f56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff09f8069702bd233f5d39c4d0b8cfbc392d9edc ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 024c5c4180..f530646058 100644
+index 87704c782b..472bda6c23 100644
@@ -23 +24 @@
-@@ -442,6 +442,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)
+@@ -439,6 +439,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)


More information about the stable mailing list