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 F2D363B5 for ; Tue, 28 Mar 2017 03:33:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490664815; x=1522200815; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uCqkWoTE5HC7lqbh+Rp3iO2Kt8TUb9kcaY2AtERh/dk=; b=fjh+q0Xw3OO35XdnV+ms9+cyhaaPz0GsAfFuFRvMpVmAlkjIRRk6dD4g Qr64PUsafrf7HJdC78ypGb/PGDJyDw==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2017 18:33:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,234,1486454400"; d="scan'208";a="1112772948" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 27 Mar 2017 18:33:33 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 27 Mar 2017 18:33:33 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.224]) with mapi id 14.03.0248.002; Tue, 28 Mar 2017 09:33:31 +0800 From: "Tan, Jianfeng" To: Yuanhan Liu CC: "dev@dpdk.org" , "david.marchand@6wind.com" Thread-Topic: [PATCH 2/5] net/virtio-user: add rxq interrupt mode support Thread-Index: AQHSlEd1mMQ+hwtMj06Q05fAraH5BqGYJieAgBBOBpA= Date: Tue, 28 Mar 2017 01:33:31 +0000 Message-ID: References: <1488563803-87754-1-git-send-email-jianfeng.tan@intel.com> <1488563803-87754-3-git-send-email-jianfeng.tan@intel.com> <20170317064757.GG18844@yliu-dev.sh.intel.com> In-Reply-To: <20170317064757.GG18844@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/5] net/virtio-user: add rxq interrupt mode support 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: Tue, 28 Mar 2017 01:33:35 -0000 > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Friday, March 17, 2017 2:48 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org; david.marchand@6wind.com > Subject: Re: [PATCH 2/5] net/virtio-user: add rxq interrupt mode support >=20 > On Fri, Mar 03, 2017 at 05:56:40PM +0000, Jianfeng Tan wrote: > > Signed-off-by: Jianfeng Tan >=20 > I don't see a single word to explain how this patch works :/ Sorry, will add that in next version. >=20 > > --- > > drivers/net/virtio/virtio_ethdev.c | 17 ++++++++++++++-- > > drivers/net/virtio/virtio_user/virtio_user_dev.c | 25 > +++++++++++++++++++++++- > > drivers/net/virtio/virtio_user/virtio_user_dev.h | 2 +- > > drivers/net/virtio/virtio_user_ethdev.c | 12 +++++++++++- > > 4 files changed, 51 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > > index 4dc03b9..5d80d1a 100644 > > --- a/drivers/net/virtio/virtio_ethdev.c > > +++ b/drivers/net/virtio/virtio_ethdev.c > > @@ -1264,6 +1264,10 @@ virtio_configure_intr(struct rte_eth_dev *dev) > > { > > struct virtio_hw *hw =3D dev->data->dev_private; > > > > + > > +#ifdef RTE_VIRTIO_USER > > + if (!hw->virtio_user_dev) { > > +#endif >=20 > No need to put the #ifdef block here. virtio_user_dev is defined even > when RTE_VIRTIO_USER is not configured. Correct. I'll remove that. >=20 > ... >=20 > > + vtpci_reinit_complete(hw); > > + > > if (eth_dev->data->dev_conf.intr_conf.rxq) { > > if (virtio_configure_intr(eth_dev) < 0) { > > PMD_INIT_LOG(ERR, "failed to configure interrupt"); > > @@ -1416,8 +1431,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, > uint64_t req_features) > > } > > } > > > > - vtpci_reinit_complete(hw); >=20 >=20 > Hmm, why ...? Such stealthy change definitely need an explanation. > And it's more likely it needs a single patch. I should have described it more. The reason of above change is to make sure= intr_handle is filled in virtio_user_start_device(). But reconsidering thi= s, this could have effect on virtio pci device as it requires interrupts ar= e set up before setting DRIVER_OK. So how about: 1. configure intr for PCI devices; 2. vtpci_reinit_complete(); 3. configure intr for vdev; Thanks, Jianfeng