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 C24B3A0561 for ; Thu, 18 Mar 2021 09:36:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EC2B40698; Thu, 18 Mar 2021 09:36:38 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2057.outbound.protection.outlook.com [40.107.94.57]) by mails.dpdk.org (Postfix) with ESMTP id C115640698; Thu, 18 Mar 2021 09:36:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=od6qT8mbR2dRWCjPdsjQXgGKFwkkodX2HI3Yl9nOnIGp9taVT8y0uwtVMNXkrGl2fBSABERO3OlVoQCZB3lOo3Ru1WSeXmy5MOyc0h28smVqH5Ica9PJ0fpLpOClrl4xEYiqxZGnrCENAX89/O09tReNSARctYJAIe8mfgMsMS26IJhMAczM0BjqB42sVLzDVTinr6OmMBUuVRoJK6/6vJn1hTXTLYmCQ47BPPEtWVDCA1Mzv/R88FbMeiWyoHJGx8X0/24BQhV/Aaa0aMKvOz/0e29ij3QzpobWYf35Bk9/dSKQA7441+AD8weEWJ+1hIyvCXY7QdJwAZuHtt7HxA== 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=JbHDSlkEdBiQTZzM+lcy0WsCd+liI1lD4Tctb7wg3Qk=; b=lcTZ0oIR2qUcvcqA+26JqxMudVxA6H4c+UwEqug+X763tdflSRHNSSsG+sjYg/3eczqRw3De+Gi8IVlPuQa6ArT9Ynl4nws7ydz5Kcf35V+mQgjJ5N/lc4FP1EBa/GEedDc55UQB4yDDA8lZU4Fqq7waLSkOoYomhtBcrjYi7SziTlRLiX5nRPUj6FW4AzpG2kGOYamT24ScgNwUic6sPTuCzcJRFyRgDGmLhvFWWWjAMBg++UYRijXerlnn3iCZKQz3wvMZXAk+NEvS2S/8b7t6A5b7CVzw7baqTIiQQTTyTQFNQdLf5lfGA1sjigtL21xjuaZJip43B6w72n7wtQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JbHDSlkEdBiQTZzM+lcy0WsCd+liI1lD4Tctb7wg3Qk=; b=T7A0WfMLJsgcv8a37cjNqZ0G5GZ9nGRHTk4arBfACjGNGf/DbyXoNq7eGqeLDQt8z8z+wZ3L0O3kPkYf3k2qAClLPHxoxaRcqiYWq7ql7A2jWS8Q2A3eIJc1BpCkBu+sTs5iya31qTURN6y8/288o4oTdD7WnfDFodVypdLv4mb8ByUfrZDx3yePHI4/Y033ILDnJ+BtbpsF1yH0zpPoM4Df6OhzuY/vr2fhO9q64tPIEi/GjV9TJa1Zq9+g9Py2ds6bOqRAJoPyDIcuqRgKflOzXeEsFjA/KeiZBEzcjJjo6JMytZeAv4CKHnnDWAiLcXc/v2rExQJRREsDml5/Vg== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB5023.namprd12.prod.outlook.com (2603:10b6:5:1b6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Thu, 18 Mar 2021 08:36:35 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258%6]) with mapi id 15.20.3933.032; Thu, 18 Mar 2021 08:36:35 +0000 From: Slava Ovsiienko To: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" CC: "dmitry.kozliuk@gmail.com" , "stable@dpdk.org" , Tal Shnaiderman , Narcisa Vasile , Ranjit Menon , John Alexander , Pallavi Kadam Thread-Topic: [dpdk-dev] [PATCH] bus/pci: fix Windows kernel driver categories Thread-Index: AQHXGrnygIkvEJX/Kk+f0XRA8Tbp8aqJbUAA Date: Thu, 18 Mar 2021 08:36:35 +0000 Message-ID: References: <20210316231153.724029-1-thomas@monjalon.net> In-Reply-To: <20210316231153.724029-1-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ac0e6bbc-0731-47c7-895f-08d8e9e8f0fa x-ms-traffictypediagnostic: DM6PR12MB5023: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PxscmXgdHWPgEDKl0opqwGkNt0DME+rApVEFbljF5TlYUT6miPQ52yG1ck1fI/Fg041ePWBV2kFW28up8Cu8dJFxacNhjLpXxvIfJwLw6CKZ75eIRKAGPxOuHQv8L2E7/9Yz05kUkXJ6FdvcLagdzujY346S/xiYZc+u1N9ObOhhUf47Rpwnl77kAaShn1kldhH4pkot48dggGXJ6lw9+LlCGCS7iQtqu+kd5TVw0OkrGBbUtaRFreTVA630hjRRDKjnedbkQO0n47dnBbbvoKo1zImgEF+DbudJZmx8Tsl1cu7l/Sep5vZ75IfeiJKwjyXw9ov3IRT0d7/+tiHjJu1DDknxDCaUE4Olirska4ZCMpbPc6dl3t52/oYnCuJDBu1E5BilGPNTJ32kksk+dn2H1Sn1jQPOQ7JpoRvIg4h4u4+X4H9lRKzIJUltM350+89QPiNLwj18bZZP21G4dl/eSs9TZJwauFeIZdMtBIHjPidf0tJDajKqN41edH8sU+45i4G0wqbk+rurDlIXOIBBs1wW87+bOFsaWpQqAU6gUk2D8xMyg4jbiw7+FolR1QPPDX5rVzmNnt5X/urepbRkU+pIY9EbSuiRebxTFCOpgM5G3zK5C3bUltazlAse x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(478600001)(8676002)(71200400001)(66476007)(64756008)(66446008)(8936002)(83380400001)(110136005)(186003)(66556008)(66946007)(7696005)(38100700001)(76116006)(316002)(52536014)(86362001)(26005)(2906002)(6506007)(53546011)(5660300002)(9686003)(54906003)(4326008)(33656002)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?tZKoBMWKSZFJAMyhxQfN9eNydf2StJYNkIl7vIppZSOB6B6aCUzplr+BQ2oy?= =?us-ascii?Q?Nb4gU/TjgcLX8qb9VRUNA656v0sVrSM0qn4WwMbqR0E7U7d6brYZVMLLEaHh?= =?us-ascii?Q?/oLfnWw2iFaPKQBvEJigz58leXD0xCCrVa/duWZ+JjjI8VuVb98Wx27C/N9n?= =?us-ascii?Q?rLLVwp3NHo8NyMB4QuQa9PlaLeUjpSE8+Qeaq+Vdx8ga8aUEDFzxw2keZvWG?= =?us-ascii?Q?Z9QObFvNDKN2A4U+HRQgGhmsTB4s06ecJTqc5aWrq80Ri09+4uw/HX4Fk/9V?= =?us-ascii?Q?gbO27QvJhbNizpUF11dDb78MzjqKlgJbHc743dILOMDN5VcPoYoHOULOi+rx?= =?us-ascii?Q?/qe/mnZ68PiGV9dqZ5ZOtcZOXIqGNg7lz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Z/khVmOatfkajR5HnSIJzbMSq9PqT77PZvB2BYMqqOOxby79Krmt0WC?= =?us-ascii?Q?ZeL3f0JTEJkUqiJnO20AVmZG?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac0e6bbc-0731-47c7-895f-08d8e9e8f0fa X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2021 08:36:35.5921 (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: HK3ODA3jYO4FYz0FaKV/AaObesljCkCBLrcwbW10eW8nXtQXlEoZkSWaec3brWqvY9c46+pnrAd85RqY5dNEVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5023 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix Windows kernel driver categories X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, Thomas > -----Original Message----- > From: dev On Behalf Of Thomas Monjalon > Sent: Wednesday, March 17, 2021 1:12 > To: dev@dpdk.org > Cc: dmitry.kozliuk@gmail.com; stable@dpdk.org; Tal Shnaiderman > ; Narcisa Vasile ; Ranji= t > Menon ; John Alexander > ; Pallavi Kadam > > Subject: [dpdk-dev] [PATCH] bus/pci: fix Windows kernel driver categories >=20 > In Windows probing, the value RTE_PCI_KDRV_NONE was used instead of > RTE_PCI_KDRV_UNKNOWN (mlx case), and RTE_PCI_KDRV_NIC_UIO > (FreeBSD) was re-used instead of having a new RTE_PCI_KDRV_NET_UIO for > Windows NetUIO. As far as I understand - under Windows there is always some kernel driver backing the device, hence, RTE_PCI_KDRV_NONE is not an option and RTE_PCI_KDRV_UNKNOWN is more appropriate. I would add this extra explanation in commit message. With best regards, Slava >=20 > While adding the new value RTE_PCI_KDRV_NET_UIO, the enum of kernel > driver categories is annotated. >=20 > Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers") > Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows") > Cc: stable@dpdk.org >=20 > Signed-off-by: Thomas Monjalon > --- > drivers/bus/pci/rte_bus_pci.h | 13 +++++++------ > drivers/bus/pci/windows/pci.c | 14 +++++++------- > 2 files changed, 14 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.= h > index fdda046515..3d009cc74b 100644 > --- a/drivers/bus/pci/rte_bus_pci.h > +++ b/drivers/bus/pci/rte_bus_pci.h > @@ -52,12 +52,13 @@ TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver); > struct rte_devargs; >=20 > enum rte_pci_kernel_driver { > - RTE_PCI_KDRV_UNKNOWN =3D 0, > - RTE_PCI_KDRV_IGB_UIO, > - RTE_PCI_KDRV_VFIO, > - RTE_PCI_KDRV_UIO_GENERIC, > - RTE_PCI_KDRV_NIC_UIO, > - RTE_PCI_KDRV_NONE, > + RTE_PCI_KDRV_UNKNOWN =3D 0, /* not listed - may be a bifurcated > driver */ > + RTE_PCI_KDRV_IGB_UIO, /* igb_uio for Linux */ > + RTE_PCI_KDRV_VFIO, /* VFIO for Linux */ > + RTE_PCI_KDRV_UIO_GENERIC, /* uio_generic for Linux */ > + RTE_PCI_KDRV_NIC_UIO, /* nic_uio for FreeBSD */ > + RTE_PCI_KDRV_NONE, /* error */ > + RTE_PCI_KDRV_NET_UIO, /* NetUIO for Windows */ > }; >=20 > /** > diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.= c > index 8f906097f4..3f0ce1fb83 100644 > --- a/drivers/bus/pci/windows/pci.c > +++ b/drivers/bus/pci/windows/pci.c > @@ -38,7 +38,7 @@ rte_pci_map_device(struct rte_pci_device *dev) > * Devices that are bound to netuio are mapped at > * the bus probing stage. > */ > - if (dev->kdrv =3D=3D RTE_PCI_KDRV_NIC_UIO) > + if (dev->kdrv =3D=3D RTE_PCI_KDRV_NET_UIO) > return 0; > else > return -1; > @@ -207,14 +207,14 @@ get_device_resource_info(HDEVINFO dev_info, > int ret; >=20 > switch (dev->kdrv) { > - case RTE_PCI_KDRV_NONE: > - /* mem_resource - Unneeded for RTE_PCI_KDRV_NONE */ > + case RTE_PCI_KDRV_UNKNOWN: > + /* mem_resource is unneeded */ > dev->mem_resource[0].phys_addr =3D 0; > dev->mem_resource[0].len =3D 0; > dev->mem_resource[0].addr =3D NULL; > break; > - case RTE_PCI_KDRV_NIC_UIO: > - /* get device info from netuio kernel driver */ > + case RTE_PCI_KDRV_NET_UIO: > + /* get device info from NetUIO kernel driver */ > ret =3D get_netuio_device_info(dev_info, dev_info_data, > dev); > if (ret !=3D 0) { > RTE_LOG(DEBUG, EAL, > @@ -323,9 +323,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA > device_info_data, { > /* set kernel driver type based on device class */ > if (IsEqualGUID(&(device_info_data->ClassGuid), > &GUID_DEVCLASS_NETUIO)) > - dev->kdrv =3D RTE_PCI_KDRV_NIC_UIO; > + dev->kdrv =3D RTE_PCI_KDRV_NET_UIO; > else > - dev->kdrv =3D RTE_PCI_KDRV_NONE; > + dev->kdrv =3D RTE_PCI_KDRV_UNKNOWN; > } >=20 > static int > -- > 2.30.1