From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v3 2/4] net/virtio: add checking for cvq Date: Thu, 29 Mar 2018 13:59:29 +0200 Message-ID: References: <20180214145330.4679-1-zhiyong.yang@intel.com> <20180321030343.64399-1-zhiyong.yang@intel.com> <20180321030343.64399-3-zhiyong.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jianfeng.tan@intel.com, zhihong.wang@intel.com, thomas@monjalon.net, dong1.wang@intel.com, tiwei.bie@intel.com To: zhiyong.yang@intel.com, dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 014872BCD for ; Thu, 29 Mar 2018 13:59:34 +0200 (CEST) In-Reply-To: <20180321030343.64399-3-zhiyong.yang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 03/21/2018 04:03 AM, zhiyong.yang@intel.com wrote: > 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); > } > } > > Reviewed-by: Maxime Coquelin Thanks, Maxime