From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>, Chenbo Xia <chenbox@nvidia.com>,
Jay Zhou <jianjay.zhou@huawei.com>,
Fan Zhang <fanzhang.oss@gmail.com>
Cc: Anoob Joseph <anoobj@marvell.com>,
Akhil Goyal <gakhil@marvell.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [EXTERNAL] Re: [v5 1/5] vhost: skip crypto op fetch before vring init
Date: Wed, 26 Feb 2025 17:40:07 +0000 [thread overview]
Message-ID: <CO1PR18MB471448E31FF025EF606442A6CBC22@CO1PR18MB4714.namprd18.prod.outlook.com> (raw)
In-Reply-To: <00e98b7d-a240-4f8f-a06a-a28712e5ef95@redhat.com>
Hi Maxime,
> >
> > + if (unlikely(vq == NULL)) {
> > + VC_LOG_ERR("Invalid virtqueue %u", qid);
> > + return 0;
> > + }
> > +
> > + if (unlikely(vq->avail == NULL)) {
> > + VC_LOG_DBG("Virtqueue ring not yet initialized %u", qid);
> > + return 0;
> > + }
> > +
>
> I think the proper fix to:
> 1. acquire the access_lock as reader
> 2. check whether vq is enabled
> 3. acquire the iotlb lock as a reader
> 4. check vq's access_ok
>
Ack. Except for vq->enabled, next version of this patch would carry these checks.
Current virtio crypto for vhost_user does not request SET_VRING_ENABLE, so this flag would not be set.
Thanks,
Gowrishankar
> You can have a look at rte_vhost_dequeue_burst for example.
>
> > avail_idx = *((volatile uint16_t *)&vq->avail->idx);
> > start_idx = vq->last_used_idx;
> > count = avail_idx - start_idx;
next prev parent reply other threads:[~2025-02-26 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1740390893.git.gmuthukrishn@marvell.com>
2025-02-24 10:35 ` Gowrishankar Muthukrishnan
2025-02-25 16:17 ` Maxime Coquelin
2025-02-26 17:40 ` Gowrishankar Muthukrishnan [this message]
2025-02-24 10:35 ` [v5 3/5] examples/vhost_crypto: fix user callbacks Gowrishankar Muthukrishnan
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=CO1PR18MB471448E31FF025EF606442A6CBC22@CO1PR18MB4714.namprd18.prod.outlook.com \
--to=gmuthukrishn@marvell.com \
--cc=anoobj@marvell.com \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.com \
--cc=jianjay.zhou@huawei.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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).