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 EF8011B01B for ; Wed, 10 Jan 2018 02:28:36 +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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2018 17:28:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,337,1511856000"; d="scan'208";a="193708694" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 09 Jan 2018 17:28:36 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Jan 2018 17:28:35 -0800 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Jan 2018 17:28:35 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.245]) by BGSMSX152.gar.corp.intel.com ([169.254.6.92]) with mapi id 14.03.0319.002; Wed, 10 Jan 2018 06:58:32 +0530 From: "Yang, Zhiyong" To: Thomas Monjalon CC: "dev@dpdk.org" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH v2] bus/pci: fix wrong intr_handle.type with uio_pci_generic Thread-Index: AQHTgHpsBXdhyAxWxkCsI7O9d0f53KNZzS0AgAexitCACeK1gIABAdiQ Date: Wed, 10 Jan 2018 01:28:32 +0000 Message-ID: References: <20171228061210.64767-1-zhiyong.yang@intel.com> <2110508.9oViqIghhz@xps> <2439576.5uxvrGeh2E@xps> In-Reply-To: <2439576.5uxvrGeh2E@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 v2] 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: Wed, 10 Jan 2018 01:28:37 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Tuesday, January 9, 2018 11:34 PM > To: Yang, Zhiyong > Cc: dev@dpdk.org; Yigit, Ferruh > Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: fix wrong intr_handle.type wi= th > uio_pci_generic >=20 > 03/01/2018 04:29, Yang, Zhiyong: > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > 29/12/2017 08:55, Zhiyong Yang: > > > > --- a/drivers/bus/pci/linux/pci.c > > > > +++ b/drivers/bus/pci/linux/pci.c > > > > @@ -723,7 +723,6 @@ 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; > > > > > > There is the same assignment in pci_vfio_map_resource_primary(), > > > pci_vfio_map_resource_secondary() and pci_uio_map_resource(). > > > > > > Please could you check why there is such assignments? > > > > In general, the operation in the three functions intends to initialize > > the "intr_handle.type", For example, For pci_uio_map_resource(), it > > wants to get "unknown" status once the code returns abnormally after > initializing. > > If the code goes smoothly, dev->intr_handle.type must be assigned to > > "RTE_INTR_HANDLE_UIO" for bsd environment, Or must be assigned to > > "RTE_INTR_HANDLE_UIO" or " RTE_INTR_HANDLE_UIO_INTX" for linux > environment In consideration of the "memset" in pci_scan_one, it can be > removed to has no harm to the existing logic. >=20 > So what do you think of doing a v3 which removes it everywhere? > It would remove inconsistencies and avoid future questions. >=20 It's reasonable and I will do that in V3. Thanks Zhiyong