From: "Fu, Patrick" <patrick.fu@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"Xia, Chenbo" <chenbo.xia@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1] vhost: fix vring disable fail in async transfer
Date: Thu, 23 Jul 2020 06:17:03 +0000 [thread overview]
Message-ID: <BYAPR11MB37356EAC250E36EA7EC86F0084760@BYAPR11MB3735.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200723053801.3616928-1-patrick.fu@intel.com>
Hi,
Sorry but I'd like to withdraw this patch as the issue could be addressed by applications to register a pre_msg_handler.
Thanks,
Patrick
> -----Original Message-----
> From: Fu, Patrick <patrick.fu@intel.com>
> Sent: Thursday, July 23, 2020 1:38 PM
> To: dev@dpdk.org; maxime.coquelin@redhat.com; Xia, Chenbo
> <chenbo.xia@intel.com>
> Cc: Fu, Patrick <patrick.fu@intel.com>
> Subject: [PATCH v1] vhost: fix vring disable fail in async transfer
>
> From: Patrick Fu <patrick.fu@intel.com>
>
> Async inflight packets is checked when front end virtio requests to disable
> vring. If inflight packets exists, vring disabling will fail.
> However, there is no good way for application to get notified before vring is
> disabled and properly complete inflight packets. This patch moves the inflight
> packets check from vring disabling time to the vring enabling time, so that
> applications have chances to drain out pending packets.
>
> Fixes: 78639d54563a ("vhost: introduce async enqueue registration API")
>
> Signed-off-by: Patrick Fu <patrick.fu@intel.com>
> ---
> lib/librte_vhost/vhost_user.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 9ddeae362..36da1380a 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -2038,9 +2038,9 @@ vhost_user_set_vring_enable(struct virtio_net
> **pdev,
> "set queue enable: %d to qp idx: %d\n",
> enable, index);
>
> - if (!enable && dev->virtqueue[index]->async_registered) {
> + if (enable && dev->virtqueue[index]->async_registered) {
> if (dev->virtqueue[index]->async_pkts_inflight_n) {
> - VHOST_LOG_CONFIG(ERR, "failed to disable vring. "
> + VHOST_LOG_CONFIG(ERR, "failed to enable vring. "
> "async inflight packets must be completed first\n");
> return RTE_VHOST_MSG_RESULT_ERR;
> }
> --
> 2.18.4
prev parent reply other threads:[~2020-07-23 6:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 5:38 patrick.fu
2020-07-23 6:17 ` Fu, Patrick [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=BYAPR11MB37356EAC250E36EA7EC86F0084760@BYAPR11MB3735.namprd11.prod.outlook.com \
--to=patrick.fu@intel.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.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).