From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBA8EA0350; Sun, 28 Jun 2020 14:10:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8E741C1F3; Sun, 28 Jun 2020 14:10:09 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00059.outbound.protection.outlook.com [40.107.0.59]) by dpdk.org (Postfix) with ESMTP id A9B391C1F2 for ; Sun, 28 Jun 2020 14:10:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jge+PjLxFpOLvw1Q8Fz/59SgCg3lqa/hJo7lzlVHvYZCRmVB/jNIvI5m7bc8or2R2oeTCnBPf2ZtVPfr2v1OaUJieNQ5uPU9WRK6jTEmgmjgqn7Lsn3Oa9JAqyqClIpfT5Bs/OWzOvT1t8pT9++wPAzmjOcMTvVwYJdKkbbSSeHRyo+bBqHtaRDcF08djh09+NmZPVtslU0/QPGLAaODl2e+K2FT7RBV0/0Db4e6Ue/BKYI7M7r98rewUrXa+V3k96wv+31bYwgfqmx0rFxr9ilT5zxtHPONXvRR+MI9H/MgrG5qoqFFPzUdpBS++jgrEIraDzJSjOVUFmvoZXSRrw== 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=4thfwaqntDaYIV8/z3NnQN9K1eIWUZ+4ibtRVfnS46c=; b=daFWip3IFfb2d4TK+dx3cS6CTRa/EGsZvpZ9Sm3XzIqB9koH8h0glOjswb4qN0HoGdyyZaINZJpRA2OoAALbfWtV1UBrSR1DY/ww4RTL17iUBco+CWU6PumVZWIVOK+fyC1sgf4+L7FpI47aZHrkrgTUrPvvCqjBq0gt+LaLma55bdJQC98/ovYAx+ainiFLE/vIr0T0kIqHXtSupTEInOKf7M2NLECQTA6sSgESGn6pBFDvv+iXLHXL6z9QaXY9WZtw8Y1p0Drc+J0VK012f4AsaDT8Wjt9slA1IY2Qrk6B2++hZRjKLYtHQ5ftPK3gw/c6+0nIizuluzDjBEu1UQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4thfwaqntDaYIV8/z3NnQN9K1eIWUZ+4ibtRVfnS46c=; b=GV2rWqunzzhFhiRTv5oaqLeCW7j3nzODaIcz5ZOzbWaOFLVpwbDN/W/iG6m7+cpaMH6Cct1zm5R+jIoJ8t/BUs1nQtE2E9d3w/Xw+G0pbs/IH+9TC2Ewl6OEkwogpmrzhTaRVJtmGEtoV3nrq4rWLvW8D+SFBvcg1lgeCxJnhlA= Received: from AM0PR05MB5313.eurprd05.prod.outlook.com (2603:10a6:208:f2::28) by AM0PR0502MB3892.eurprd05.prod.outlook.com (2603:10a6:208:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Sun, 28 Jun 2020 12:10:07 +0000 Received: from AM0PR05MB5313.eurprd05.prod.outlook.com ([fe80::9da9:e159:add2:64ee]) by AM0PR05MB5313.eurprd05.prod.outlook.com ([fe80::9da9:e159:add2:64ee%3]) with mapi id 15.20.3131.026; Sun, 28 Jun 2020 12:10:07 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile CC: "dev@dpdk.org" , Thomas Monjalon , "pallavi.kadam@intel.com" , "dmitry.kozliuk@gmail.com" , "david.marchand@redhat.com" , "grive@u256.net" , "ranjit.menon@intel.com" , "harini.ramakrishnan@microsoft.com" , "ocardona@microsoft.com" , "anatoly.burakov@intel.com" , Fady Bader , "bruce.richardson@intel.com" Thread-Topic: [PATCH v9 09/10] bus/pci: support Windows with bifurcated drivers Thread-Index: AQHWSgG5tCp/o76m9UKLNg3hnaFOsajrtaaAgAI/tNA= Date: Sun, 28 Jun 2020 12:10:07 +0000 Message-ID: References: <20200622075529.24180-2-talshn@mellanox.com> <20200624082847.21344-1-talshn@mellanox.com> <20200624082847.21344-10-talshn@mellanox.com> <20200627014653.GA10439@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20200627014653.GA10439@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [37.142.1.17] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f17c1225-6abb-4089-2f21-08d81b5c329f x-ms-traffictypediagnostic: AM0PR0502MB3892: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0448A97BF2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jNcVFeVIqhXqt4mC2Aibg4udVCKAEjqwAAKWj13Wv6HmGN7ncxNtV/pWGQsk6lq4jaK7FrohrgY5y88oDcZ6tgFfKGRD7KGkLe8Vx51jUxtiGt7fBibmZHdw3/ur+pfayU+s6ZPAqy3473QPlAMivCoy66hzFIG2u3PW22wz9IkX1BAvauWFZhq7qLluztSEgwrv0aUytohprBHuNu+GuyzhmeJJ31mqMbHMC9j1ckTCVVeop4IYBE96r/0I9CBSfjkATl3b896k60693fqd0rSrhSrPHV5o+MBgdsvxhbNf6LjMy38lCXWYkh6ClWWWK+BOBdXIkqxMov9P6v6/og== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5313.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(376002)(396003)(136003)(346002)(26005)(6916009)(4326008)(66946007)(33656002)(64756008)(66556008)(66476007)(66446008)(71200400001)(86362001)(52536014)(9686003)(55016002)(7416002)(6506007)(8676002)(478600001)(54906003)(316002)(8936002)(83380400001)(76116006)(7696005)(2906002)(186003)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 0jcRq3ZoIOdtb84LhqOcvGBSHmCbE4yFavdbh8Bedtus7GqsS3q2Df+a7QWgrxrFUqSWTqWSGIs0l9HejpPGaVtsOw4CmHhf7AWD9RrmWGrCv8+e6Tr0IKjt8ehUEX2kJWU+0Cs0WTIX+2q5M4ZSo/3EQMpejWX/QtReB1zsevbsbtYLxH5eVbOL/T0TD2RDQM9rdsz3nMZArwi5AcXX4iQKgripR9ltVTf1DYq5BHsVBgfXBXsuohq3krhxHM4u/TDvz4spVxyzSs4HGvMeipZFaXIjuFyJsNH+KXXLK36fUKk0QFfsUtj4RJpUgEm4wk2zDZbboS6WJXebdpjCoGKivEDfk8sxZgzLtQvkWu22iKbtyJvVEp9PZe7FFTTKfdgrW8uIVfTIDiaUbXGxM4P5HZMtOEHm++TAXOANIcJFnDy5mnxd6m/T+qtgjTlKZadwSMcPcqfqC9OOK6ZPvosfgvENqsm6WAGCJPLvuP8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB5313.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f17c1225-6abb-4089-2f21-08d81b5c329f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2020 12:10:07.1360 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ENcOTNDstMlLxf19NWL2ED6p0SkAxhcmJu6rsbKKaBaKLr7bPcSP+zjYxd4U5FzdzlGbaurpRzjek/XJfFQf8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3892 Subject: Re: [dpdk-dev] [PATCH v9 09/10] bus/pci: support Windows with bifurcated drivers 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > From: Narcisa Ana Maria Vasile > On Wed, Jun 24, 2020 at 11:28:46AM +0300, talshn@mellanox.com wrote: > > From: Tal Shnaiderman > > > > Uses SetupAPI.h functions to scan PCI tree. > > Uses DEVPKEY_Device_Numa_Node to get the PCI NUMA node. > > Uses SPDRP_BUSNUMBER and SPDRP_BUSNUMBER to get the BDF. > > scanning currently supports types RTE_KDRV_NONE. > > > > Signed-off-by: Tal Shnaiderman > > --- > > drivers/bus/pci/windows/pci.c | 263 > ++++++++++++++++++++++++++- > > lib/librte_eal/rte_eal_exports.def | 1 + > > lib/librte_eal/windows/include/rte_windows.h | 1 + > > 3 files changed, 261 insertions(+), 4 deletions(-) > > > > int > > rte_pci_scan(void) > > { > > - return 0; > > + int ret =3D -1; > > + DWORD device_index =3D 0, found_device =3D 0; > > + HDEVINFO dev_info; > > + SP_DEVINFO_DATA device_info_data; > > + > > + /* for debug purposes, PCI can be disabled */ > > + if (!rte_eal_has_pci()) > > + return 0; > > + > > + dev_info =3D SetupDiGetClassDevs(&GUID_DEVCLASS_NET, > TEXT("PCI"), NULL, > > + DIGCF_PRESENT); >=20 > Should we search for PCI devices by all classes to account for future sup= port > of drivers that are not part of the the Net class (e.g. netuio driver)? E= .g.: > SetupDiGetClassDevs(NULL, TEXT("PCI"), NULL, DIGCF_PRESENT | > DIGCF_ALLCLASSES); >=20 > Alternatively, since this patchset supports only RTE_KDRV_NONE, we can > change it when introducing support for other types. >=20 I'd go with adding it when needed, since the netuio driver addition to bus/= pci is being worked on. > > + if (dev_info =3D=3D INVALID_HANDLE_VALUE) { > > + RTE_LOG_WIN32_ERR("SetupDiGetClassDevs(pci_scan)"); > > + RTE_LOG(ERR, EAL, "Unable to enumerate PCI devices.\n"); > > + goto end; > > +