From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jianfeng.tan@intel.com>
Received: from mga18.intel.com (mga18.intel.com [134.134.136.126])
 by dpdk.org (Postfix) with ESMTP id A862144BE
 for <dev@dpdk.org>; Wed, 28 Mar 2018 10:34:37 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga007.fm.intel.com ([10.253.24.52])
 by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Mar 2018 01:34:36 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.48,370,1517904000"; d="scan'208";a="27647326"
Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.67.64.59])
 ([10.67.64.59])
 by fmsmga007.fm.intel.com with ESMTP; 28 Mar 2018 01:34:34 -0700
To: zhiyong.yang@intel.com, dev@dpdk.org
References: <20180214145330.4679-1-zhiyong.yang@intel.com>
 <20180321030343.64399-1-zhiyong.yang@intel.com>
 <20180321030343.64399-3-zhiyong.yang@intel.com>
Cc: zhihong.wang@intel.com, maxime.coquelin@redhat.com, thomas@monjalon.net,
 dong1.wang@intel.com, tiwei.bie@intel.com
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
Message-ID: <3ed6322c-2b23-03af-d8a9-d92acb23f206@intel.com>
Date: Wed, 28 Mar 2018 16:34:34 +0800
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20180321030343.64399-3-zhiyong.yang@intel.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Mar 2018 08:34:38 -0000



On 3/21/2018 11: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 <zhiyong.yang@intel.com>

Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>

Thanks,
Jianfeng

> ---
>   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);
>   	}
>   }
>