From: Jin Yu <jin.yu@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>
Cc: dev@dpdk.org, changpeng.liu@intel.com, Jin Yu <jin.yu@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check
Date: Wed, 25 Dec 2019 22:18:35 +0800 [thread overview]
Message-ID: <20191225141835.65587-1-jin.yu@intel.com> (raw)
The frontend may not send the get_inflight_fd and
set_inflight_fd although we negotiate the protocol
feature. When we meet this situation just return OK.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
---
lib/librte_vhost/vhost_user.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 0cfb8b792..eb0f27c29 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1629,8 +1629,11 @@ vhost_check_queue_inflights_split(struct virtio_net *dev,
(1ULL << VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)))
return RTE_VHOST_MSG_RESULT_OK;
+ /* The frontend may still not support the inflight feature
+ * although we negotiate the protocol feature.
+ */
if ((!vq->inflight_split))
- return RTE_VHOST_MSG_RESULT_ERR;
+ return RTE_VHOST_MSG_RESULT_OK;
if (!vq->inflight_split->version) {
vq->inflight_split->version = INFLIGHT_VERSION;
@@ -1710,8 +1713,11 @@ vhost_check_queue_inflights_packed(struct virtio_net *dev,
(1ULL << VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)))
return RTE_VHOST_MSG_RESULT_OK;
+ /* The frontend may still not support the inflight feature
+ * although we negotiate the protocol feature.
+ */
if ((!vq->inflight_packed))
- return RTE_VHOST_MSG_RESULT_ERR;
+ return RTE_VHOST_MSG_RESULT_OK;
if (!vq->inflight_packed->version) {
vq->inflight_packed->version = INFLIGHT_VERSION;
--
2.17.2
next reply other threads:[~2019-12-25 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 14:18 Jin Yu [this message]
2020-02-12 10:14 ` Maxime Coquelin
2020-02-13 16:30 ` Maxime Coquelin
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=20191225141835.65587-1-jin.yu@intel.com \
--to=jin.yu@intel.com \
--cc=changpeng.liu@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=zhihong.wang@intel.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).