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 11A0FA0C4C for ; Mon, 12 Jul 2021 15:12:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B61340685; Mon, 12 Jul 2021 15:12:57 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 3CB0840685 for ; Mon, 12 Jul 2021 15:12:54 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id v5so25567975wrt.3 for ; Mon, 12 Jul 2021 06:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6tnnmdgGZaZnUD64hwRNsTlFeJs6AcoRMfZgJl4qHYI=; b=ZP6/RVrwJgqtLsSie1TsoNVOfdjYVdXTAtYz/SFUpBgUeL7Ygf9wQZlagPKjZpBKhk LdWxpIZv4wv3elXrQris28EQZ1KqfonGBYAliK87ZA3d9i9igekwiwdmTVjAv+W4edmQ SeUH8Nah8QnOL+wgA2PXs+C9uVC1EZjIlaBB01lW5mhrNVsKIX5KqVNUiVlZy8mUbrzZ uUo4sAC4J78hkox7v2mQMfN2TSFCBxqJQe3QtKBUoaM1iyxMS9Gmxrcg0L7/H2oWuqIy fCggdDvobk391KAJKiprtd9HJB9e4ljoXU1K1/oUypTTAKTrO/c3xhg370Dob99Q4Hpm U7zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6tnnmdgGZaZnUD64hwRNsTlFeJs6AcoRMfZgJl4qHYI=; b=Of8i9ZwT3qEpS+PEjCEf4P8V6iGTvdG73AtaqogkCSyC8O9Uc06aixaB+fR9/ziGRd 0dQzkWCKrfJ58nBtRXoQ2mnIAq9GtuzCKzn9qztzVx3Rl+rGy8IEIPWDiW2+vsaIvQuV 76YxAfWCuF9vt04Qo/1PTwP4zZnCDKlhp7XMKytaIv8hn6iLf8PHh0fmXgdQ1QAW0bwW +3I45mzcoOk6yMfISSWQEgMrZn+Jja63/lqoWF36BqIa/jE+jixrmdBr4ouEAYvX9uWx 6DOCyPaFa/LzGu9X0482mnd+Qu7gMMtQrFJsMkeKC43XTMUBfjxDfa4lgljUDZjE06r8 F6Dw== X-Gm-Message-State: AOAM532nSNJybXAkgzG5Tzm253bIUQC0D6UsFNgMaj1yb1CmuJDDs/jS qLIhaITMCkuy818C58tUMLc= X-Google-Smtp-Source: ABdhPJxF5e/tEm0cc51QLcnhIEWMpy/z0WjH7D/O+sNq2re2G+H1ljGw59AmMrcFrxyrUsas+oXwrw== X-Received: by 2002:adf:f382:: with SMTP id m2mr32206997wro.335.1626095574006; Mon, 12 Jul 2021 06:12:54 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id x17sm14707605wru.6.2021.07.12.06.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:12:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Xueming Li Cc: Chenbo Xia , dpdk stable Date: Mon, 12 Jul 2021 14:04:50 +0100 Message-Id: <20210712130551.2462159-55-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vdpa/mlx5: fix TSO offload without checksum' has been queued to stable release 20.11.3 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 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 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 Reviewed-by: Chenbo Xia --- 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@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)