DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Li Feng <fengli@smartx.com>
Cc: Chenbo Xia <chenbo.xia@intel.com>, Lin Li <lilin24@baidu.com>,
	Jin Yu <jin.yu@intel.com>, Yu Zhang <zhangyu31@baidu.com>,
	Xun Ni <nixun@baidu.com>,
	dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] vhost: add sanity check when operating the split ring
Date: Thu, 21 Oct 2021 14:32:29 +0200	[thread overview]
Message-ID: <d9fea7fb-f7a4-7f95-a046-64709dfee5f4@redhat.com> (raw)
In-Reply-To: <CAHckoCwC4HksDt5377biSEo_CEXCPWduEtFU_334K4Q2ZG81Qw@mail.gmail.com>



On 10/15/21 11:25, Li Feng wrote:
> On Fri, Oct 15, 2021 at 4:52 PM Maxime Coquelin
> <maxime.coquelin@redhat.com> wrote:
>>
>> The title is too vague, I would put something like:
>>
>> vhost: add sanity check on inflight last index
>>
>> On 10/14/21 14:40, Li Feng wrote:
>>> The idx in rte_vhost_set_last_inflight_io_split is from the frontend
>>
>> s/idx/index/
>>
>>> driver, check if it's in the virtqueue range.
>>>
>>> Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Li Feng <fengli@smartx.com>
>>> ---
>>>    lib/vhost/vhost.c | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
>>> index 9540522dac..3b674ac320 100644
>>> --- a/lib/vhost/vhost.c
>>> +++ b/lib/vhost/vhost.c
>>> @@ -1226,6 +1226,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
>>>        if (unlikely(!vq->inflight_split))
>>>                return -1;
>>>
>>> +     if (unlikely(idx >= vq->size))
>>> +             return -1;
>>> +
>>>        vq->inflight_split->last_inflight_io = idx;
>>>        return 0;
>>>    }
>>>
>>
>> Other than that, this is fine to me:
>>
>> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>>
>> If my suggestions are fine for you, I can fix while applying.
>>
> It's fine.
> 
>> Thanks,
>> Maxime
>>
> 

Applied to dpdk-next-virtio/main.

Thanks,
Maxime


      reply	other threads:[~2021-10-21 12:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  5:12 [dpdk-dev] [PATCH v1] vhost: add sanity check for resubmiting reqs in " Li Feng
2021-09-01  5:01 ` Li Feng
2021-10-14  8:17 ` Maxime Coquelin
2021-10-14  8:25   ` Maxime Coquelin
2021-10-14  8:28     ` Xia, Chenbo
2021-10-18  1:01       ` Liu, Changpeng
2021-10-14 11:25   ` Li Feng
2021-10-14 11:38     ` Maxime Coquelin
2021-10-14 11:54       ` Li Feng
2021-10-14 12:40 ` [dpdk-dev] [PATCH v2] vhost: add sanity check when operating the " Li Feng
2021-10-15  8:51   ` Maxime Coquelin
2021-10-15  9:25     ` Li Feng
2021-10-21 12:32       ` Maxime Coquelin [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=d9fea7fb-f7a4-7f95-a046-64709dfee5f4@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengli@smartx.com \
    --cc=jin.yu@intel.com \
    --cc=lilin24@baidu.com \
    --cc=nixun@baidu.com \
    --cc=stable@dpdk.org \
    --cc=zhangyu31@baidu.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).