From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C113129C8; Wed, 19 Jul 2017 18:03:53 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2017 09:03:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,381,1496127600"; d="scan'208";a="994774901" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.24.12.60]) ([10.24.12.60]) by orsmga003.jf.intel.com with ESMTP; 19 Jul 2017 09:03:52 -0700 To: Yuanhan Liu , Jiayu Hu References: <1500434303-12975-1-git-send-email-jiayu.hu@intel.com> <20170719110845.GX11626@yliu-home> Cc: dev@dpdk.org, lei.a.yao@intel.com, stable@dpdk.org From: "Tan, Jianfeng" Message-ID: Date: Wed, 19 Jul 2017 09:03:52 -0700 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: <20170719110845.GX11626@yliu-home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: , X-List-Received-Date: Wed, 19 Jul 2017 16:03:54 -0000 On 7/19/2017 4:08 AM, Yuanhan Liu wrote: > On Wed, Jul 19, 2017 at 11:18:23AM +0800, Jiayu Hu wrote: >> 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. > Hmm, how was this supposed to work in the begining when this feature > was introduced? Jianfeng? In the v17.05, virtio_configure_intr() will be called by virtio_dev_configure() if the request feature is changed. That's not correct. > > --yliu > > >> Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts") >> Cc: stable@dpdk.org >> >> Signed-off-by: Jiayu Hu >> --- >> 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; >> + } >> + } >> + Hi Jiayu, I would expect this will not work for virtio pci devices (QEMU might crash). Could you double check that? Thanks, Jianfeng >> 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) == >> -- >> 2.7.4