From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5C4879181; Mon, 31 Jul 2017 09:57:25 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2017 00:57:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,441,1496127600"; d="scan'208";a="117582325" Received: from dpdk15.sh.intel.com ([10.67.111.77]) by orsmga002.jf.intel.com with ESMTP; 31 Jul 2017 00:55:17 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: yliu@fridaylinux.org, jianfeng.tan@intel.com, lei.a.yao@intel.com, Jiayu Hu , stable@dpdk.org Date: Mon, 31 Jul 2017 15:56:44 +0800 Message-Id: <1501487804-50970-1-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500434303-12975-1-git-send-email-jiayu.hu@intel.com> References: <1500434303-12975-1-git-send-email-jiayu.hu@intel.com> Subject: [dpdk-stable] [PATCH v2] net/virtio: fix fail to configure rxq interrupt X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 07:57:27 -0000 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, -- 2.7.4