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 16FD3A054F; Wed, 10 Feb 2021 07:00:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C386240693; Wed, 10 Feb 2021 07:00:52 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mails.dpdk.org (Postfix) with ESMTP id 7B6F340147 for ; Wed, 10 Feb 2021 07:00:51 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 09 Feb 2021 22:00:50 -0800 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 09 Feb 2021 22:00:50 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 09 Feb 2021 22:00:50 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 06:00:42 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 10 Feb 2021 06:00:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D/hpp+FvudmeA88Ow29ChNXp5SZYDutjWkI1kbwb2G9elyCBqxQX3ayNx2EDrb/7BXFfcq0BKZ84NkRo21PGtH9cdsm9gnjR7AFtci+H5/ug8QlibALb/ONNDCrPL4dNoy7LLG0pImAASi7eibghIE5Z3/qcOnQ4w7nkxJ1QkL0LwPusvwevo4GUrXCI+Qr8HCxQ6ppxs64p3SYR0kMsiua2eaMAdTj7gAx0jMa/KNcC97crx4f96z0dXmUWLk3/g2IxVefZYUmlzcw5xPVaH/yzNH5WtxBTJMoE9Mt3kVd0d7/Afc9ubsfgw8Ng0c0kZna09TVE8TDvT3PlGCo7oQ== 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=+ZlcmnAtW9ETmPFAVSLimUeySvUEqMlgcqgA/pRBdAg=; b=Nn4VDrvoV60bq/BAq6fyrWA67eBl2UGcR+Hhd/APgYfJS2USW2mo5aiYN+OmrGxT58f/RVuyi5eP625SKUSwc+yD2/uKAd4UEO4gg+ycCm/dJkFplPG6vQDC6okraFQyJZmSZn0LYD/iNZ4DA53qcYbmPL9ti48JrOWSNuw4OKswD7Ta3UPHx78bD6bxaURd8v5Cmntt5Z2yiPwJM02cSEa5eaFswB0p7SmnQ4M/fWJ5si9hY7b+WkvGCADA4gZ6NhSKITHlNv9HBf8h3Qc7Rc0yeb47GUviZRX8z4MT9ZbHX+J30iAkbRjQrbG2vSuQ8Nc6yGrMC/z19rEIcE1ljA== 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 DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB3324.namprd12.prod.outlook.com (2603:10b6:5:11e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.23; Wed, 10 Feb 2021 06:00:40 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::d1dc:9fb2:4724:53df%7]) with mapi id 15.20.3825.030; Wed, 10 Feb 2021 06:00:40 +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] bus/pci: fix probing for non-netuio bound devices Thread-Index: AQHW/074NMwiwUZndEiLmvWmB6+iH6pQ4v0Q Date: Wed, 10 Feb 2021 06:00:40 +0000 Message-ID: References: <20210210014008.11112-1-pallavi.kadam@intel.com> In-Reply-To: <20210210014008.11112-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: f1450eb5-fa1c-4825-b3e8-08d8cd8931df x-ms-traffictypediagnostic: DM6PR12MB3324: 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: WPi8v8Ij5wQRqp4rWC4MajMbJ0PKyZakr5SRSvZdej28L2UqTMV8lz/6wLY50uPinM61GiZz+ieIk7vaUJLRlvgeqmDl2LBgeVNHrUgEPFQcbIIAEUsIB0X5EwaD7c5G1cY/8vkXhKmJbkVBiE1z3oPmqWeMnoSSr44V3pYLqe6pK+HwepakDrrfrdJGxHY2reronvvH/Npt/JGCrKW/+ja4t/64M8Izq5GxarWTPsxJADWV72gYo3Cjo9AKKGX4vYozIWLREZwQU85pHRFGn7/67h6BU5Kp4DiN4iFkPz5uEjT0dnCsDHRIGguS5MKO2wuDDh6mwqKHbd35LN8/wuGKdGl9CHH+FTR6xHz+1bQkBC4iF/bPkdkyCLSJNdm3w2tg68hkLzg4SgU5arlSpp4x5aLHIeI+LXppgfCKdP9bRYEfV42ze+sDH7JCi8DfVeS3niPhNtFPxCQKoxORuRJjMFF5jHCU/OwxpRncW5WQV4Mw8FwKQDK23hAVxCzubo3LaR/BrmI8uuk8jRvuVg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3945.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(71200400001)(4326008)(8676002)(2906002)(54906003)(66476007)(66556008)(64756008)(76116006)(110136005)(66446008)(52536014)(6506007)(33656002)(83380400001)(86362001)(478600001)(7696005)(5660300002)(26005)(8936002)(9686003)(316002)(55016002)(66946007)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?B/F3KF8DfHoFPH7u07341LBidmewACsIXlNR8fmWWmW0opuQhhhEQO6/wET5?= =?us-ascii?Q?elBwLrsCm4OuH7scCqQfgYgdMkSHQ09EYOYx/IP23Noc8KYVYgclZXXdd333?= =?us-ascii?Q?IKtdfWgMaggOf1r7JApJYPHGfSFWE0xWOAVMR84+/LwE3xKiAQuW5MP0hBnV?= =?us-ascii?Q?S+CLOn1VLPufWmXn8rsT+O+ibMpFCq6SQfhXt/a2s760TG823o1agHNqAPte?= =?us-ascii?Q?oMU9upk+SBF/IEIsfmjKPKXEhJ6k2M/OTCCbAHKzCgo9NKch7jg7u8LvEGzT?= =?us-ascii?Q?Xk39gpZ8r2ECc4bC1MWFPkk3qZST8+wKxq2qjBSamHz2IqgvNtNHAeFdnzdu?= =?us-ascii?Q?CpoNJcaWuDZqj5UmnT80PDl7oMKUk2doduKnacoFCMEBoDP51U+MgOqYtxSN?= =?us-ascii?Q?QimZqWo7lEwA/lh9QalHjkL2933bd6QrjN+TY3Si9xKyifNrrgXufRBUQmzd?= =?us-ascii?Q?K8fxhic3Lz240SzR1dcYvDkpMRtnVqro27YRh4Cls4mIms/x6EPSDtEWo1R9?= =?us-ascii?Q?IpAOYHp9HeuFpJNeoL+sbiFuLwAIc14sfB7R3DYFnMX4VxGJX1oI/Imx8AKT?= =?us-ascii?Q?HFVZ24yn/EHcnATcW/0m4WqpjPgEXbGwnt/Y8QQXwG2DjNEue5iI7WUFGW6J?= =?us-ascii?Q?Drlcy1quyd743wYG2kDlMuU0b7foIQ5RLkPC+Ll1YCI4JzKs+Tcl6sZrhSEh?= =?us-ascii?Q?Ud/DpYxytUhGY/g0oeAEGTlT6GhOSjiJN74uWfO+wj3Fhp2PsLhX9GRaj+lc?= =?us-ascii?Q?+THrvpChIyyGAt7qLRjuSef8WHyDwnyVLM5SO7AFPhfjurKBWE1+8fsHVS8b?= =?us-ascii?Q?iAZmlqy9e7unrhKnm7iDpkghQhSzpPURjomxa/AWCpg+v0KS0oRSuKNw2j3n?= =?us-ascii?Q?fhNBQEm+NxGqKhHlUwyQVstbiGgSG2A4j3Ff9I5NSoSmOq38a8k4jMC0Ygt/?= =?us-ascii?Q?73e2TwgrQ6nq2nFLT02yhOXYZniUjOsyxgkUM7YcumVxJ0lJwv3b+/Tq3JJ+?= =?us-ascii?Q?SHZxZbAridsXkOoG1A6DIOzMqd/vtiA/6cO6ZFbBivFOck6dPoj3cwF9H1Gb?= =?us-ascii?Q?37pNF/ba9346JAfsLPn7bGTyWzfnFlf/S9myPr3wIFGgJpBgTE9wZOYdFwH5?= =?us-ascii?Q?josriulmo9p9VqRTjjl+TsvHF53pS5xPvRZaAAXViDQ8uKZ2A//nP6+idXGu?= =?us-ascii?Q?thg3kfJJZwEpyoWw99PBM/3Wzq+Zmy/WloC7zLaMYEgQxhHUBAHzhDCkF30S?= =?us-ascii?Q?dB2UWbkCK6Z083dSK3UcB3M9/dDCN0ynU0nGR2Pbmp3XSOhcIrLzS46d4eAG?= =?us-ascii?Q?u3QGH12iD7wJe3a0IP4D3FsZ?= 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: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1450eb5-fa1c-4825-b3e8-08d8cd8931df X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2021 06:00:40.2423 (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: e8CUez5IoE8vvtz8VW/E5HrFYz0A05MzKNWOXoexupizjxKGILZDKMHUg7qzm737eDSeLzRD5lRZ+mxv9+sszA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3324 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612936850; bh=+ZlcmnAtW9ETmPFAVSLimUeySvUEqMlgcqgA/pRBdAg=; 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=kEK0qhbLvTH6Wvd3IPQxfbRrOW0s3tt1o8evnxn8C/HoVQWSsvWbsc/OwYOMCsfup 0mo4e2muMbX4BeZpOz73CnSGOLDslFgoLAB5TFn0DTsNV4eah6FB9Vc9YqogBheNjr XQ/tm2mDdT/Rq9XfqPTkCpVnzJLpYmZGEj+Y4HzIoGxClOngVMALkPiMCG1Ef7Iv01 PTJsv3iaffgulf0PgnL0U+HY1U87xX2LB19Z3XJhJbQSILIvvZqrRCS7U8fVMoU9Q/ OLUrOtxZobxTj+MZw1dvcCsw5MfAemFJVvA43B3bpi6d4lk0zZh0y4ZTdgQ2c9heGG 6++gXdVSduGcA== Subject: Re: [dpdk-dev] [PATCH] 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] 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 > Suggested-by: Dmitry Kozlyuk > Signed-off-by: Pallavi Kadam > Reviewed-by: Ranjit Menon > --- > drivers/bus/pci/windows/pci.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.= c > index f66258452..16edaa769 100644 > --- a/drivers/bus/pci/windows/pci.c > +++ b/drivers/bus/pci/windows/pci.c > @@ -23,20 +23,19 @@ > 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. > - */ > - return 0; > + /* Only return success for devices bound to netuio */ Maybe extend this comment to mention where the mapping is actually done? > + if (dev->kdrv =3D=3D RTE_PCI_KDRV_NIC_UIO) > + return 0; > + else > + return -EINVAL;=09 The function should return -1 here to match the behavior with other OS impl= ementations. > } >=20 > /* Unmap pci device */ > -- > 2.18.0.windows.1