From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhiyong.yang@intel.com Subject: [PATCH v2 2/5] net/virtio: add checking for cvq Date: Thu, 15 Mar 2018 17:45:11 +0800 Message-ID: <20180315094514.50417-3-zhiyong.yang@intel.com> References: <20180214145330.4679-2-zhiyong.yang@intel.com> <20180315094514.50417-1-zhiyong.yang@intel.com> Cc: maxime.coquelin@redhat.com, jianfeng.tan@intel.com, dong1.wang@intel.com, zhihong.wang@intel.com, thomas@monjalon.net, Zhiyong Yang To: dev@dpdk.org Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6290C5F28 for ; Thu, 15 Mar 2018 10:45:22 +0100 (CET) In-Reply-To: <20180315094514.50417-1-zhiyong.yang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add checking for cvq to judge if virtio_ack_link_announce is called. The original 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 b38582c8d..74943a5a9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1338,7 +1338,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