From patchwork Wed Jul 19 03:18:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hu, Jiayu" X-Patchwork-Id: 27043 X-Patchwork-Delegate: yuanhan.liu@linux.intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 937093977; Wed, 19 Jul 2017 05:16:44 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9BA113253; Wed, 19 Jul 2017 05:16:42 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2017 20:16:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,379,1496127600"; d="scan'208";a="126746626" Received: from dpdk15.sh.intel.com ([10.67.111.77]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2017 20:16:40 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: jianfeng.tan@intel.com, yliu@fridaylinux.org, lei.a.yao@intel.com, Jiayu Hu , stable@dpdk.org Date: Wed, 19 Jul 2017 11:18:23 +0800 Message-Id: <1500434303-12975-1-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When use rte_eth_dev_configure() to enable rx queue interrupt for virtio devices, virtio_configure_intr() 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 Reviewed-by: Zhiyong Yang --- 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..66656ed 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1688,6 +1688,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) return -ENOTSUP; } + if (dev->data->dev_conf.intr_conf.rxq) { + if (virtio_configure_intr(dev) < 0) { + PMD_DRV_LOG(ERR, "failed to configure interrupt"); + return -ENOTSUP; + } + } + if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) /* Enable vector (0) for Link State Intrerrupt */ if (VTPCI_OPS(hw)->set_config_irq(hw, 0) ==