From: Slava Ovsiienko <viacheslavo@nvidia.com>
To: Jiawei Zhu <17826875952@163.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "zhujiawei12@huawei.com" <zhujiawei12@huawei.com>,
Matan Azrad <matan@nvidia.com>,
Shahaf Shuler <shahafs@nvidia.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: fix wrong segmented packet in Rx
Date: Tue, 2 Mar 2021 17:18:12 +0000 [thread overview]
Message-ID: <DM6PR12MB3753E94C1758388E358452CEDF999@DM6PR12MB3753.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1614619190-3846-1-git-send-email-17826875952@163.com>
> -----Original Message-----
> From: Jiawei Zhu <17826875952@163.com>
> Sent: Monday, March 1, 2021 19:20
> To: dev@dpdk.org
> Cc: zhujiawei12@huawei.com; Matan Azrad <matan@nvidia.com>; Shahaf
> Shuler <shahafs@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Jiawei Zhu <17826875952@163.com>; stable@dpdk.org
> Subject: [PATCH v3] net/mlx5: fix wrong segmented packet in Rx
>
> The issue occurred if mbuf starvation happened in the middle of segmented
> packet reception.
> In such a situation, after release the segments of packet being received, code
> did not advance the consumer index to the next stride. This caused the
> receiving of the wrong segmented packet data.
>
> The possible error scenario:
> - we assume segs_n is 4 and we are receiving 4
> segments of multi-segment packet.
> - we fail to allocate mbuf while receiving the 3rd segment,
> and this frees the mbufs of the packet chain we have built.
> There are the 1st and 2nd segments in the chain.
> - the 1st and the 2nd segments of this stride of Rx queue
> are filled up (in elts array) with the new allocated
> mbufs and their data are random (the 3rd and 4th
> segments still contain the valid data of the packet though).
> - on the next iteration of stride processing we get
> the wrong two segments of the multi-segment packet.
>
> Hence, we should skip these mbufs in the stride and we should advance the
> consumer index on loop exit.
>
> Fixes: 15a756b63734 ("net/mlx5: fix possible NULL dereference in Rx path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jiawei Zhu <17826875952@163.com>
> ---
> v3:
> * Reword the commit message a little bit.
>
> v2:
> * Added extra explanation in commit message.
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Thank you for the nice catch and working on the patch update.
With best regards, Slava
next prev parent reply other threads:[~2021-03-02 17:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 10:15 [dpdk-dev] [PATCH] " Jiawei Zhu
2021-02-24 13:20 ` Slava Ovsiienko
2021-02-26 16:11 ` Jiawei Zhu
2021-03-01 9:13 ` Slava Ovsiienko
2021-03-01 17:01 ` Jiawei Zhu
2021-03-02 8:10 ` Slava Ovsiienko
2021-03-02 16:44 ` Jiawei Zhu
2021-03-01 16:58 ` [dpdk-dev] [PATCH v2] " Jiawei Zhu
2021-03-01 17:19 ` [dpdk-dev] [PATCH v3] " Jiawei Zhu
2021-03-02 17:18 ` Slava Ovsiienko [this message]
2021-03-04 9:00 ` Raslan Darawsheh
2021-03-13 19:45 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
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=DM6PR12MB3753E94C1758388E358452CEDF999@DM6PR12MB3753.namprd12.prod.outlook.com \
--to=viacheslavo@nvidia.com \
--cc=17826875952@163.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=shahafs@nvidia.com \
--cc=stable@dpdk.org \
--cc=zhujiawei12@huawei.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).