From c94c9f3152a37fb31553e410ab7fd06f23802c71 Mon Sep 17 00:00:00 2001 From: Jiayu Hu Date: Tue, 20 Apr 2021 04:57:45 -0400 Subject: [PATCH] vhost: fix redundant vring status change notification 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: d0fcc38f5fa4 ("vhost: improve device readiness notifications") Cc: stable@dpdk.org Signed-off-by: Jiayu Hu Tested-by: Yinan Wang Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index fa8929f563..611ff209e3 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -1922,9 +1922,6 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg, */ if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) { vq->enabled = true; - if (dev->notify_ops->vring_state_changed) - dev->notify_ops->vring_state_changed( - dev->vid, file.index, 1); } if (vq->ready) { -- 2.20.1