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 28900A0562 for ; Thu, 18 Mar 2021 13:00:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 184ED140EA5; Thu, 18 Mar 2021 13:00:07 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2080.outbound.protection.outlook.com [40.107.243.80]) by mails.dpdk.org (Postfix) with ESMTP id 2DBE840698; Thu, 18 Mar 2021 13:00:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cm3++ZSzcFLid0GQdWksoTA0mj0q5IOpGRj7NUqV66dAwwC0o5NhkJSUCutG6HoN5T6YFcsn+S5grgxWYuVdzktXcddy0FrAfjNihCdfgjpHOhGzBv3lQ8lfH5qL5eMllF3/8dhhsR/k33lLNSjgDKOmu+7+XUEyRkbI/22l1Siuqj3E3EnKgNNi71BALvHrS0jlRMYdPZ94SJmfLTDhXeL41mQ4BQackT/lZbmKSH+RUZSKCmlLJ0v3r+lOC1AKTtuQUl3AWLtzn5PztgKV5VQnJWKGLFIYI/pz1zepENoKKePXlPxt38CFgMiffcWX1oMl0axgLuWOA16sCh74yA== 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=AmSvepeHY9x9bzDz6HDs1a1f5dijaUl0AIkpCsoa0UQ=; b=F0l9Xp+BzNSAEuGJJHIn7yiRfldKwxYOxbMv/Kk+pObtIMX8FAT40OCnX9f/Zi7PO/WhRBhOJfXVkZMEEvD4YO4BSO7lhR9RNhoF8ncmsHstNHD7ScjamvEIh2CxAhSgadi+xnmMRVi6ipB9P+OLa2CEM5N1DlBBKUVAHvHeDsYDrzGHGDI2i+4FqVMtctoNnmBbNR+8aKGgzNpStsZslpgbv+6ns2NylQpEqF0/slJHRn57Xrle45kyptOOe6PfanyX1EMqhWEgj7UNmDU1P0MAxFDT6onPE0djB9mZyWw9dwuNJyQJPuUj/3G7YVQRPJ605JihqA+NyJaIgpckUQ== 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=AmSvepeHY9x9bzDz6HDs1a1f5dijaUl0AIkpCsoa0UQ=; b=CExwt+mIBC5Wg86RcFDJIM+exl16+XO80EioC5POdwvJ/jYY4xfexXpXVKlTAlNou9ibLrXtwSZWzCuhSrZVHYvKGVWp9vTsJ8lvhhtVTKpObxV1I98CIX2IgbxV/yimY8N8lxYL+Wx0H/A7Ty6Zsy5PZHDDz82/+Bj50KWA3pdnCZm6ta0/fMJsd0gvB1hgvaZ5J8l1WtKcRrLEzswh4mUgtVNdG0ydQzGHFHVCFz4znp8ADGU6A73PpJwTELtjX/eMzrviYf3SBMs/bhMpim7AlreqLJtGuDaGVEZOq98W3iNNGC04D3UbcMZC0kFzCTV4wFLnvGmUx80unwJqag== Received: from DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB3227.namprd12.prod.outlook.com (2603:10b6:5:18d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Thu, 18 Mar 2021 12:00:02 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d%5]) with mapi id 15.20.3955.018; Thu, 18 Mar 2021 12:00:02 +0000 From: Tal Shnaiderman To: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" CC: "dmitry.kozliuk@gmail.com" , "stable@dpdk.org" , Ranjit Menon , Narcisa Vasile , Pallavi Kadam , John Alexander Thread-Topic: [PATCH v2] bus/pci: fix Windows kernel driver categories Thread-Index: AQHXG+Q2k/GaoG4jwUGowD5GExEiUqqJo9ew Date: Thu, 18 Mar 2021 12:00:02 +0000 Message-ID: References: <20210316231153.724029-1-thomas@monjalon.net> <20210318104807.1882334-1-thomas@monjalon.net> In-Reply-To: <20210318104807.1882334-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: [5.29.18.92] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cfe21cde-bf98-4f8c-6a33-08d8ea055ce9 x-ms-traffictypediagnostic: DM6PR12MB3227: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:2887; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JmeSDT8E+Sx142X+eEe5G7jzgeOvMIdQ3ZspQQdkFbT88U3sTZSonDyZku6cA/VtoWJ5OBUM9NlxC1HeJBESHug1qPRlgJUAVshQpCLPpKfAGpDBMHxh3wOCKiEhgNaDeZ6/qAYhobA8M0n5SMhfZjpvClhPPlwO8HGxehTmVtNTMI9V6riSkF5Kb/t94cuxEV8lu2XfxKu9v7j0FiF8wCy4xMwQPSxWtHvf6bdTo5GF0tIae3Ct1JOxze77v4p7oDefEJlIPiZDoZsn190TpMMIi+duLds/8z6LQfG/1Izh99oaO/bhCcsdPYr4gUU7pPXaAH7sDcFgJzjr2g2Z18JYybse7rW8RfrX7QhOv36fDqYjQMjMhM66fO51uJgAKOMYMCfvixXVq5tckDwZr+6D+Q9madJUEi2ZZ0IicrUli1ObcdnTk0JRhLLq38BujHKlUg8OmMDukSB31epGHT+fZtiXU/1zDjZm6aNToKQqlxgyKC4z73rEmgeUe/1YmFKSRNP2Ha5gLY6ID8v/cD2uqmo0tAB7AMPGVv/Sc9eCMNN3QQVfgrZNGbXWjuBuTalFLCsLp0tLvailMfkHJgPVpTtY3lQsXIy9kFpZnxBhh68z1rjpp14WJjU8tWjJ 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)(136003)(396003)(346002)(366004)(39860400002)(376002)(2906002)(52536014)(83380400001)(110136005)(4326008)(8676002)(86362001)(7696005)(38100700001)(33656002)(55016002)(76116006)(9686003)(8936002)(71200400001)(66946007)(66556008)(66476007)(6506007)(64756008)(54906003)(316002)(478600001)(66446008)(5660300002)(186003)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?mS+CFwxvPZkm1+gkiJRHNXIitfl6p7AONmsqoLcavdrhjcKVN3EriBbogdB4?= =?us-ascii?Q?3Xmt9B4bxa14A3m6uRPGVNlX3zel8sghzrIOCgBnkdw0/rNdH0SgkXrj8Auf?= =?us-ascii?Q?K31trB6TcUy4JuuNS8DUayu2YVhZ/qoDI34clWXCndFLhKHlmDNPmMxVIm2I?= =?us-ascii?Q?vmW65FHfWfyljWkaBPzz3etllyjRh7wzTOLPRmWke+27MoDZIyDWoxT8PiW1?= =?us-ascii?Q?k/b9T5vQEnAeF/RWHdJ0oM169RqXTt+PYEhoq7+MzgbzGWZWraChyguWfIvy?= =?us-ascii?Q?sYvW/85RhgQ2RB9Ieg0UOmG/7a7+P4v8FCSNkU+d4dlJfbw091seNgHpMjL+?= =?us-ascii?Q?2NbaZ9ckOQcvozhv+5v0BMeYfPzXiBOMlloP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wk9bod2+zWX5w4hb9j42xeT7T1sxPx93qJX+2z0g8kOLOGh5vyXWyb3q?= =?us-ascii?Q?YB0=3D?= 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: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfe21cde-bf98-4f8c-6a33-08d8ea055ce9 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2021 12:00:02.6102 (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: XFr3cYH77zSDHp+kVxZ4Crh7rvdqMhP6tuvVDELmDuOiXcWHXR+D1Gj7plEwPFWdfx01qcZOE3/aIgEQxK81pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3227 Subject: Re: [dpdk-stable] [PATCH v2] 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" > Subject: [PATCH v2] 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. > This value covers the mlx case where the kernel driver is in place, offer= ing a > bifurcated mode to the userspace driver. > When the kernel driver is listed as unknown, there is no special treatmen= t in > DPDK probing, contrary to UIO modes. >=20 > The value RTE_PCI_KDRV_NIC_UIO (FreeBSD) was re-used instead of having > a new RTE_PCI_KDRV_NET_UIO for Windows NetUIO. > While adding the new value RTE_PCI_KDRV_NET_UIO (at the end for ABI > compatibility), 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 > Acked-by: Dmitry Kozlyuk > --- > v2: improve comments and commit message > --- > 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..876abddefb 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, /* may be misc UIO or bifurcated > driver */ > + RTE_PCI_KDRV_IGB_UIO, /* igb_uio for Linux */ > + RTE_PCI_KDRV_VFIO, /* VFIO for Linux */ > + RTE_PCI_KDRV_UIO_GENERIC, /* uio_pci_generic for Linux */ > + RTE_PCI_KDRV_NIC_UIO, /* nic_uio for FreeBSD */ > + RTE_PCI_KDRV_NONE, /* no attached driver */ > + 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..d39a7748b8 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: > + /* bifurcated driver case - 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 Acked-by: Tal Shnaiderman