From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 7F67F915D; Mon, 31 Jul 2017 19:01:56 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 649331405F1; Mon, 31 Jul 2017 17:01:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 649331405F1 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=maxime.coquelin@redhat.com Received: from [10.36.112.15] (unknown [10.36.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABA6A17CC7; Mon, 31 Jul 2017 17:01:53 +0000 (UTC) To: Jiayu Hu , dev@dpdk.org Cc: yliu@fridaylinux.org, jianfeng.tan@intel.com, lei.a.yao@intel.com, stable@dpdk.org References: <1500434303-12975-1-git-send-email-jiayu.hu@intel.com> <1501487804-50970-1-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: <4732e2c6-0bef-b45a-fe57-0906d72ac661@redhat.com> Date: Mon, 31 Jul 2017 19:01:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1501487804-50970-1-git-send-email-jiayu.hu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 31 Jul 2017 17:01:55 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: fix fail to configure rxq interrupt 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: Mon, 31 Jul 2017 17:01:56 -0000 On 07/31/2017 09:56 AM, Jiayu Hu wrote: > When use rte_eth_dev_configure() to enable rx queue interrupt for virtio > devices, virtio_init_device() isn't called to set up the interrupt > environment, which causes rx queue interrupt setup failed. This patch is > to fix this issue. > > Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts") > Cc: stable@dpdk.org > > Signed-off-by: Jiayu Hu > --- > changes in v2: > - fix QEMU crash issue. > > drivers/net/virtio/virtio_ethdev.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index 00a3122..e320811 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1659,9 +1659,16 @@ virtio_dev_configure(struct rte_eth_dev *dev) > { > const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; > struct virtio_hw *hw = dev->data->dev_private; > + int ret; > > PMD_INIT_LOG(DEBUG, "configure"); > > + if (dev->data->dev_conf.intr_conf.rxq) { > + ret = virtio_init_device(dev, hw->req_guest_features); > + if (ret < 0) > + return ret; > + } > + > /* Virtio does L4 checksum but not L3! */ > if (rxmode->hw_ip_checksum) { > PMD_DRV_LOG(NOTICE, > Looking at v1's discussions, it seems to be the right fix. I haven't tried it myself, but it looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime