From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6017C8E01 for ; Wed, 21 Mar 2018 04:03:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 20:03:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,338,1517904000"; d="scan'208";a="43883963" Received: from dpdk9.bj.intel.com ([172.16.182.183]) by orsmga002.jf.intel.com with ESMTP; 20 Mar 2018 20:03:48 -0700 From: zhiyong.yang@intel.com To: dev@dpdk.org Cc: jianfeng.tan@intel.com, zhihong.wang@intel.com, maxime.coquelin@redhat.com, thomas@monjalon.net, dong1.wang@intel.com, tiwei.bie@intel.com, Zhiyong Yang Date: Wed, 21 Mar 2018 11:03:41 +0800 Message-Id: <20180321030343.64399-3-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180321030343.64399-1-zhiyong.yang@intel.com> References: <20180214145330.4679-1-zhiyong.yang@intel.com> <20180321030343.64399-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH v3 2/4] net/virtio: add checking for cvq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 03:03:51 -0000 Add checking for cvq to judge if virtio_ack_link_announce should be called. The existing code doesn't cause issue, and add the checking just to look more reasonable. Signed-off-by: Zhiyong Yang --- drivers/net/virtio/virtio_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index f377d8aa3..b567d3cf8 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1337,7 +1337,8 @@ virtio_interrupt_handler(void *param) if (isr & VIRTIO_NET_S_ANNOUNCE) { virtio_notify_peers(dev); - virtio_ack_link_announce(dev); + if (hw->cvq) + virtio_ack_link_announce(dev); } } -- 2.14.3