From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Xueming Li <xuemingl@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"matan@nvidia.com" <matan@nvidia.com>,
"stable@dpdk.org" <stable@dpdk.org>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] vdpa/mlx5: fix TSO offload without CSUM
Date: Wed, 30 Jun 2021 11:55:24 +0000 [thread overview]
Message-ID: <MN2PR11MB40634E90F6F7E88D0B9251E39C019@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210613125139.17998-1-xuemingl@nvidia.com>
> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Xueming Li
> Sent: Sunday, June 13, 2021 8:52 PM
> Cc: dev@dpdk.org; xuemingl@nvidia.com; matan@nvidia.com; stable@dpdk.org;
> Viacheslav Ovsiienko <viacheslavo@nvidia.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>
> Subject: [dpdk-stable] [PATCH] vdpa/mlx5: fix TSO offload without CSUM
>
> Packet was corrupted when TSO requested without CSUM update.
>
> Enables CSUM automatically if only TSO requested.
>
> Fixes: 2aa8444b0084 ("vdpa/mlx5: support stateless offloads")
> Cc: matan@nvidia.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Xueming Li <xuemingl@nvidia.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 024c5c4180..f530646058 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
> @@ -442,6 +442,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.25.1
Applied to next-virtio/main, thanks!
prev parent reply other threads:[~2021-06-30 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-13 12:51 [dpdk-dev] " Xueming Li
2021-06-25 7:35 ` [dpdk-dev] [dpdk-stable] " Xia, Chenbo
2021-06-30 11:55 ` Xia, Chenbo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN2PR11MB40634E90F6F7E88D0B9251E39C019@MN2PR11MB4063.namprd11.prod.outlook.com \
--to=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@nvidia.com \
--cc=xuemingl@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).