From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 31AEE1D7; Thu, 28 Dec 2017 10:38:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2017 01:37:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,470,1508828400"; d="scan'208";a="190514437" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 28 Dec 2017 01:37:58 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Dec 2017 01:37:57 -0800 Received: from bgsmsx151.gar.corp.intel.com (10.224.48.42) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Dec 2017 01:37:57 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.245]) by BGSMSX151.gar.corp.intel.com ([169.254.3.14]) with mapi id 14.03.0319.002; Thu, 28 Dec 2017 15:07:54 +0530 From: "Yang, Zhiyong" To: Thomas Monjalon CC: "dev@dpdk.org" , "Yigit, Ferruh" , "stable@dpdk.org" Thread-Topic: [PATCH] bus/pci: fix wrong intr_handle.type with uio_pci_generic Thread-Index: AQHTf6LcTBVp1cGaDEm3rgSInrYCoqNYGm8AgABfkYA= Date: Thu, 28 Dec 2017 09:37:54 +0000 Message-ID: References: <20171228061210.64767-1-zhiyong.yang@intel.com> <3562024.UbNHMEjv39@xps> In-Reply-To: <3562024.UbNHMEjv39@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix wrong intr_handle.type with uio_pci_generic 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: Thu, 28 Dec 2017 09:38:04 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, December 28, 2017 5:05 PM > To: Yang, Zhiyong > Cc: dev@dpdk.org; Yigit, Ferruh ; stable@dpdk.org > Subject: Re: [PATCH] bus/pci: fix wrong intr_handle.type with uio_pci_gen= eric >=20 > 28/12/2017 07:12, Zhiyong Yang: > > In the function rte_pci_ioport_map, if uio_pci_generic is used on X86 > > platform, pci_ioport_map() is invoked, the operation > > ev->intr_handle.type =3D RTE_INTR_HANDLE_UNKNOWN; is execused directly, > > it causes the wrong assignment for uio_pci_generic, the patch fixes it. > [...] > > --- a/drivers/bus/pci/linux/pci.c > > +++ b/drivers/bus/pci/linux/pci.c > > @@ -723,7 +723,9 @@ pci_ioport_map(struct rte_pci_device *dev, int bar > __rte_unused, > > if (!found) > > return -1; > > > > - dev->intr_handle.type =3D RTE_INTR_HANDLE_UNKNOWN; > > + if (dev->kdrv =3D=3D RTE_KDRV_NONE) > > + dev->intr_handle.type =3D RTE_INTR_HANDLE_UNKNOWN; >=20 > I don't understand the logic. > NONE is different of UNKNOWN. >=20 > Your are talking about uio_pci_generic. In this case, it should be > RTE_KDRV_UIO_GENERIC. If we use uio_pci_generic, dev->intr_handle.type has already been assigned= to The right value RTE_INTR_HANDLE_UIO_INTX before it, but in the function pci= _ioport_map the wrong value is assigned to dev->intr_handle.type =3D RTE_INTR_HANDLE_UN= KNOWN; Two cases both call pci_ioport_map on x86 platform. one is RTE_KDRV_UIO_GENERIC the other is RTE_KDRV_NONE=20 if I understand right, for uio_generic, it should not be assigned to RTE_IN= TR_HANDLE_UNKNOWN; This case has already the right value, don't need to assign again.=20 The original code should be considered to handle RTE_KDRV_NONE case only. thanks Zhiyong