vhost: fix the inflight resubmit check
PATCH 1/1 vhost: fix the inflight resubmit check
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")
Signed-off-by Jin Yu <[email protected]>
--- lib/librte_vhost/vhost_user.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
lib/librte_vhost/vhost_user.c +8 -2
@@ -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 ;
Signature · 1 line
2.17.2
Quoted 4 lines · Jin Yu
The frontend may not send the
get_inflight_fdandset_inflight_fdalthough we negotiate the protocol feature. When we meet this situation just return OK.
Quoted 8 lines
Fixes ad0a4ae491fe ("vhost: checkout resubmit inflight information")Signed-off-by Jin Yu <[email protected]>--- lib/librte_vhost/vhost_user.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Reviewed-by Maxime Coquelin <[email protected]>
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 11 lines · Jin Yu
The frontend may not send the
get_inflight_fdandset_inflight_fdalthough we negotiate the protocol feature. When we meet this situation just return OK.Fixes ad0a4ae491fe ("vhost: checkout resubmit inflight information")Signed-off-by Jin Yu <[email protected]>--- lib/librte_vhost/vhost_user.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Applied to dpdk-next-virtio/master
Thanks,
Maxime