Skip to content

Commit

Permalink
vhost: fix redundant vring status change notification
Browse files Browse the repository at this point in the history
[ upstream commit c94c9f3 ]

When VHOST_USER_F_PROTOCOL_FEATURES is not negotiated,
there is no need for vhost_user_set_vring_kick() to
notify the application of vring enabled, as
vhost_user_msg_handler() also notifies the application.

This patch is to remove unnecessary vring_state_changed() call.

Fixes: d0fcc38 ("vhost: improve device readiness notifications")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  • Loading branch information
humasama authored and steevenlee committed Jun 8, 2021
1 parent b0a7aab commit 24743b7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/librte_vhost/vhost_user.c
Expand Up @@ -1876,9 +1876,6 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
*/
if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
vq->enabled = 1;
if (dev->notify_ops->vring_state_changed)
dev->notify_ops->vring_state_changed(
dev->vid, file.index, 1);
}

if (vq->ready) {
Expand Down

0 comments on commit 24743b7

Please sign in to comment.