From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17A2FA0547; Thu, 11 Feb 2021 20:31:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9252222A247; Thu, 11 Feb 2021 20:31:05 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id A956140147 for ; Thu, 11 Feb 2021 20:31:03 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 11 Feb 2021 11:31:02 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 11 Feb 2021 11:31:02 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 11 Feb 2021 11:31:02 -0800 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Feb 2021 19:31:01 +0000 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Feb 2021 19:30:53 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 11 Feb 2021 19:30:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZyMNBozWeqK1tf+3pE3k3e9CPcrOfHa1QKTONf8gXbLvvEby6nUVgyENF8vIbT+u3pZiN7j+zdmtIiSjT7l+AIAUONrGvj5Sc6DBT/31p8fMecI3oUwwio0ToTw4IxchHJ1ClYm0g3c1Vczrz3QDJJ+q3+/GEvsrrUKztbwx1s/CAyNJFX6m8lf4ccgIMqHqtbIUdY0US5c2M7UyIgwMgcFp71LKWS1NuvX8hLA/SNaskmBRPo1RwrY9PWVmhrMTEo2u2Exv821MUTAmPm1n18h9YLEkCZ5OzV4t1iZVC4nxoZC6+17mvtbgIgfjbhC1iR6LCeS3EpyPcZGS9hBxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lzbjH320bJVoPM1LmMxVkVW8QiqYCOnKn1DExc2m324=; b=Vdy3h7dhZLBQN3CSaQFCOsEEJL33pFwYo5QDo6n3zbQ3y/U2sPU/6PdmbcKKdPMziP1g9X2ZWPO9OQAvGlJ0APwz8AIHR6injntiayaenuNS9lcKNlYlf1SNqHKLGPrqVwD9SpkD43CavQsKFJK+lsbdcprS3PvO0fuM6d+aJqFUpCU0NlvPJAfqkTH/H0AB82IeeelfssFuJhffetEZe9uHz/tIcBDWONWgWODIpB0v1Tfffl5OlpTto75mbsDWJpXa06njLv7caTdiRL4PV24ftikaqV9+QYTP47uIJ87h0LPYNAGAmi/YunP7tNv+LpRBEWNqWmL14WNzW3bx1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BY5PR12MB3938.namprd12.prod.outlook.com (2603:10b6:a03:1af::31) by BY5PR12MB4210.namprd12.prod.outlook.com (2603:10b6:a03:203::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.29; Thu, 11 Feb 2021 19:30:51 +0000 Received: from BY5PR12MB3938.namprd12.prod.outlook.com ([fe80::f0b1:e271:56a6:79f2]) by BY5PR12MB3938.namprd12.prod.outlook.com ([fe80::f0b1:e271:56a6:79f2%7]) with mapi id 15.20.3825.030; Thu, 11 Feb 2021 19:30:50 +0000 From: Tal Shnaiderman To: Pallavi Kadam , "dev@dpdk.org" , NBU-Contact-Thomas Monjalon CC: "ranjit.menon@intel.com" , "dmitry.kozliuk@gmail.com" , "Narcisa.Vasile@microsoft.com" Thread-Topic: [PATCH v2] bus/pci: fix probing for non-netuio bound devices Thread-Index: AQHW/+2n3kC6eFbw80alcaBpbWw7JqpTWJwg Date: Thu, 11 Feb 2021 19:30:50 +0000 Message-ID: References: <20210210014008.11112-1-pallavi.kadam@intel.com> <20210210203654.10132-1-pallavi.kadam@intel.com> In-Reply-To: <20210210203654.10132-1-pallavi.kadam@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.141.17] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bb5ea181-2d93-4cfb-8d13-08d8cec38a72 x-ms-traffictypediagnostic: BY5PR12MB4210: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bc7Xe0MTfeWNZh8rIZCBgHmcJcDJOXBVGWh3OmpWQSupFsqiqTifsiKcfAFOA+9HisKK/tcJXvRl7Ubp3TZXL856K0SnpesCdTy+iMi3J3VnHGuMGV/x1ZsDIHaUn2LQjl4Ss+/irhbAP6XIzDaM8rsKRkVsftASHZV9ri1YpAsYvrZ4wvrzzeUZhmIvcqJ0J0IaatSaplRmgEpgm4WNgf4K8lz2rDB25sCZAkKdTRzr9foUdzpHXq3kKNg1xTt53eZgl6MPHJ0mvfWiVBVLxHakXshFY+72kTYDZaKeQG4jn2xrCHz9ujs0rDKi8h01NuW94NTg5qZRa8R5run5ZOIL/5+Woo05c+yG7ijQAFKZpWINa5pqDngFfAyB1IQOXx61T7udSI8GIa3FFic1yRdvpGyT49qc0Ytq4hjProPurklcasAaAysOEc/mCZCb2+TZBizQHJOEVLJQ0JHZYMs41fAKlsmEvIC6/+y+9X+MdgDCjTM6Xcr9gJta8kp7f+pNhN3lBA72F4taVDbGUg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB3938.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(39860400002)(136003)(366004)(346002)(71200400001)(110136005)(33656002)(76116006)(86362001)(54906003)(66476007)(64756008)(5660300002)(66556008)(8676002)(66946007)(316002)(478600001)(186003)(4326008)(83380400001)(9686003)(6506007)(2906002)(26005)(55016002)(52536014)(7696005)(66446008)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?YenRqT3eUX2bu6ipFxx3QMaW7gxo0FFGCna30m1EpxItogoQTNxoKi0ZoN0+?= =?us-ascii?Q?HPXg0Hj0rW0QcW3zzrxFjkxNsXXzz3YdGyHjq0A1H+RLQ/e6zTiLHDF+BZ6S?= =?us-ascii?Q?Mil38eF/V48EbLYm0bI5eVBJXVEn3+dBjNyL3aCU+qggedaj4aYDbUc9hgmt?= =?us-ascii?Q?f3sG+cuG9HQnFr2sLfI69MrwLNj70g/5bGuLAp5DU+xMQm7HIH/EjJKcc+Yh?= =?us-ascii?Q?CipmEZCOk9L6wFm9BmfpEM1c17RlPtoK7jifOBFGAnWh8/oRe3DNtbBTYPMj?= =?us-ascii?Q?zvRVCw5Yhy8oeWTmDiihoXCJq3HbSEVSiHNPWlT2/jHWX9iHviCV997v3K0e?= =?us-ascii?Q?pnUY9sVVMVVPRqZWScbmniuUrXyDfVee5k2SKVu2D3+5LeirmBuzPFwdxD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MCGUwEKSlmdJyyw1iBImWjQXb5PdKQLpIb9?= =?us-ascii?Q?RFdhB0MSIuj0wTBYD+QxG6UM?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3938.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb5ea181-2d93-4cfb-8d13-08d8cec38a72 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2021 19:30:50.8273 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: V8TJ+Sxq6u66vI+/T/OBQkOC7soU3kwRMz6JnuFwGJo3bvkjL5VQAtdNtIcSj2jOHZkFLPeKqIBfwlnDJkpLMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4210 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1613071862; bh=lzbjH320bJVoPM1LmMxVkVW8QiqYCOnKn1DExc2m324=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-header:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=RCLqwuk4HNxEVZ3NbCiILrd2HKxC7qWON1eAfJqfvfgPfuq/F3XGVq6VYhmadT8YB 8tRotsX01JsWS0wDj8iADenv1iXl81Enq02Y+v4iwxdHCiGs7OUqjJsamf0i7fF2Jt iMEpHemGxnooT9qLyQLGmxDSUjCf2IKAe8gDeAm3O35IKCgcBIw0k3YPGJY4DFqGS0 7RR8fCO4YYmhk90afjZWS9l58R0qCSw470mCZi2yfGnv0F5FOlDqWWRbDJAl0jJG1z TXZLkLTrjsVFO+nbr9IlkxOLVc+Bs3UUajhYa5DpTjXR6culT5A2kBPEpltG79d46q BAYWwI4pzDyJA== Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: fix probing for non-netuio bound devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Subject: [PATCH v2] bus/pci: fix probing for non-netuio bound devices >=20 > External email: Use caution opening links or attachments >=20 >=20 > Implement rte_pci_map_device() to distinguish between the devices bound > to netuio and NDIS devices. > Only return success for the netuio devices. >=20 > v2 changes: > - Extended the comment to mention about mapping > - replaced the return errno value with -1 >=20 > Suggested-by: Dmitry Kozlyuk > Signed-off-by: Pallavi Kadam > Reviewed-by: Ranjit Menon > --- > drivers/bus/pci/windows/pci.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.= c > index f66258452..00e7849b0 100644 > --- a/drivers/bus/pci/windows/pci.c > +++ b/drivers/bus/pci/windows/pci.c > @@ -23,20 +23,22 @@ > DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, > 0x45bc, > * the registry hive for PCI devices. > */ >=20 > -/* The functions below are not implemented on Windows, > +/* Some of the functions below are not implemented on Windows, > * but need to be defined for compilation purposes > */ >=20 > /* Map pci device */ > int > -rte_pci_map_device(struct rte_pci_device *dev __rte_unused) > +rte_pci_map_device(struct rte_pci_device *dev) > { > - /* This function is not implemented on Windows. > - * We really should short-circuit the call to these functions by > - * clearing the RTE_PCI_DRV_NEED_MAPPING flag > - * in the rte_pci_driver flags. > + /* Only return success for devices bound to netuio. > + * Devices that are bound to netuio are mapped at > + * the bus probing stage. > */ > - return 0; > + if (dev->kdrv =3D=3D RTE_PCI_KDRV_NIC_UIO) > + return 0; > + else > + return -1; > } >=20 > /* Unmap pci device */ > -- > 2.18.0.windows.1 Acked-by: Tal Shnaiderman