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 AF90A2C38 for ; Mon, 23 Jan 2017 20:20:04 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 23 Jan 2017 11:20:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,275,1477983600"; d="scan'208";a="57275418" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga006.fm.intel.com with ESMTP; 23 Jan 2017 11:20:03 -0800 Received: from orsmsx109.amr.corp.intel.com ([169.254.11.220]) by ORSMSX101.amr.corp.intel.com ([169.254.8.118]) with mapi id 14.03.0248.002; Mon, 23 Jan 2017 11:20:02 -0800 From: "Su, David W" To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] igb_uio: use non-threaded ISR Thread-Index: AQHSc3IiRNCFFY74006DHm7lLodGIKFCj08AgAPQaXA= Date: Mon, 23 Jan 2017 19:20:02 +0000 Message-ID: <3875C02542CA2945BF761013C1F5B8E57F3DC9AD@ORSMSX109.amr.corp.intel.com> References: <1484953699-3156-1-git-send-email-david.w.su@intel.com> <20170120155058.5177efc4@xeon-e3> In-Reply-To: <20170120155058.5177efc4@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmExNTA3NzYtYmYxMy00OGI2LThmZGItYmU3MWQ2NzE1ODk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjhJOEhoMjJteWxPVnFnSnFSU090U09uM0xNSkVvVDRMZHVJUk5LWXgyODQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] igb_uio: use non-threaded ISR 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, 23 Jan 2017 19:20:05 -0000 If rte_eth_conf.intr_conf.rxq !=3D 0 and rte_eth_conf.intr_conf.lsc =3D 0 w= hen rte_eth_dev_configure() is called, rx queue interrupts can be enabled/d= isabled with rte_eth_dev_rx_intr_{enable|disable} and DPDK applications can= wait for rx queue interrupts with rte_epoll_wait(). This is the case for = both igb_uio and vfio-pci drivers. vfio-pci already uses non-threaded ISR, but currently we can only use igb_u= io when running DPDK applications in virtual machines. David =A0=20 -----Original Message----- From: Stephen Hemminger [mailto:stephen@networkplumber.org]=20 Sent: Friday, January 20, 2017 3:51 PM To: Su, David W Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] igb_uio: use non-threaded ISR On Fri, 20 Jan 2017 15:08:19 -0800 David Su wrote: > This eliminates the overhead of a task switch when an interrupt arrives. >=20 > Signed-off-by: David Su > --- > lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) >=20 > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/l= inuxapp/igb_uio/igb_uio.c > index df41e45..9338e14 100644 > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c > @@ -382,6 +382,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pc= i_device_id *id) > msix_entry.entry =3D 0; > if (pci_enable_msix(dev, &msix_entry, 1) =3D=3D 0) { > dev_dbg(&dev->dev, "using MSI-X"); > + udev->info.irq_flags =3D IRQF_NO_THREAD; > udev->info.irq =3D msix_entry.vector; > udev->mode =3D RTE_INTR_MODE_MSIX; > break; > @@ -390,7 +391,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pc= i_device_id *id) > case RTE_INTR_MODE_LEGACY: > if (pci_intx_mask_supported(dev)) { > dev_dbg(&dev->dev, "using INTX"); > - udev->info.irq_flags =3D IRQF_SHARED; > + udev->info.irq_flags =3D IRQF_SHARED | IRQF_NO_THREAD; > udev->info.irq =3D dev->irq; > udev->mode =3D RTE_INTR_MODE_LEGACY; > break; Since interrupts are only used for link state transistions with igb_uio, I can't see how the overhead of task switch would matter.