DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check
@ 2019-12-25 14:18 Jin Yu
  2020-02-12 10:14 ` Maxime Coquelin
  2020-02-13 16:30 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Jin Yu @ 2019-12-25 14:18 UTC (permalink / raw)
  To: Maxime Coquelin, Tiwei Bie, Zhihong Wang
  Cc: dev, changpeng.liu, Jin Yu, stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check
  2019-12-25 14:18 [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check Jin Yu
@ 2020-02-12 10:14 ` Maxime Coquelin
  2020-02-13 16:30 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-02-12 10:14 UTC (permalink / raw)
  To: Jin Yu, Tiwei Bie, Zhihong Wang; +Cc: dev, changpeng.liu, stable



On 12/25/19 3:18 PM, Jin Yu wrote:
> 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(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check
  2019-12-25 14:18 [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check Jin Yu
  2020-02-12 10:14 ` Maxime Coquelin
@ 2020-02-13 16:30 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-02-13 16:30 UTC (permalink / raw)
  To: Jin Yu, Tiwei Bie, Zhihong Wang; +Cc: dev, changpeng.liu, stable



On 12/25/19 3:18 PM, Jin Yu wrote:
> 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(-)

Applied to dpdk-next-virtio/master

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-13 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 14:18 [dpdk-dev] [PATCH] vhost: fix the inflight resubmit check Jin Yu
2020-02-12 10:14 ` Maxime Coquelin
2020-02-13 16:30 ` Maxime Coquelin

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).