From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B967A0547; Tue, 20 Apr 2021 04:28:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A798415AD; Tue, 20 Apr 2021 04:28:51 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 290F0415A3; Tue, 20 Apr 2021 04:28:43 +0200 (CEST) IronPort-SDR: HMmLv84y+fe1rUpVZYai6DDzBd950o6xk7pxbquha0yL33vvOoljqBC/kmHFktii/BGehj2AC2 u6jgZGlNyj6Q== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="256741038" X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="256741038" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 19:28:42 -0700 IronPort-SDR: x58qikL7eLq0suMgFJxfPSI6VLHAlj7Ki3KlnSGNjMUm3Xd1bbZwuzaxgEWNnmcOnGw28iEPQ4 q7QfHoKdilfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="426739879" Received: from npg_dpdk_virtio_jiayuhu_07.sh.intel.com ([10.67.118.193]) by orsmga008.jf.intel.com with ESMTP; 19 Apr 2021 19:28:40 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, yinan.wang@intel.com, sunil.pai.g@intel.com, cheng1.jiang@intel.com, jiayu.hu@intel.com, stable@dpdk.org Date: Tue, 20 Apr 2021 04:57:45 -0400 Message-Id: <1618909066-114980-4-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618909066-114980-1-git-send-email-jiayu.hu@intel.com> References: <1617368642-131298-1-git-send-email-jiayu.hu@intel.com> <1618909066-114980-1-git-send-email-jiayu.hu@intel.com> Subject: [dpdk-dev] [PATCH v3 3/4] vhost: fix unnecessary vring_state_changed call X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: 966027b4b3a3 ("vhost: fix silent queue enabling with legacy guests") Cc: stable@dpdk.org Signed-off-by: Jiayu Hu Tested-by: Yinan Wang --- lib/librte_vhost/vhost_user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index fa8929f..611ff20 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_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.7.4