From patchwork Thu Mar 15 09:45:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 36119 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 112046833; Thu, 15 Mar 2018 10:45:25 +0100 (CET) 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2018 02:45:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,310,1517904000"; d="scan'208";a="25460416" Received: from dpdk9.bj.intel.com ([172.16.182.183]) by orsmga008.jf.intel.com with ESMTP; 15 Mar 2018 02:45:19 -0700 From: zhiyong.yang@intel.com To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, jianfeng.tan@intel.com, dong1.wang@intel.com, zhihong.wang@intel.com, thomas@monjalon.net, Zhiyong Yang Date: Thu, 15 Mar 2018 17:45:11 +0800 Message-Id: <20180315094514.50417-3-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315094514.50417-1-zhiyong.yang@intel.com> References: <20180214145330.4679-2-zhiyong.yang@intel.com> <20180315094514.50417-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH v2 2/5] 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: , 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); } }