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 CCA1AA0A0E for ; Mon, 10 May 2021 18:08:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4FB1406A3; Mon, 10 May 2021 18:08:00 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2046.outbound.protection.outlook.com [40.107.237.46]) by mails.dpdk.org (Postfix) with ESMTP id EB0594003E for ; Mon, 10 May 2021 18:07:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KHEC4GWP/3rrQSL68RCPsow/6v17veKspSvNb/a/l/07rZnaZey/5oaEBtfWoR/rYV7lKGinwHjHnXU5vAK/kPOinf7qvVywnlpxlM3fA9lYVwhOZYoUM8X55w9KC5JalDI82YlOSXRTo1odLGDmVEagNkdnJAl7PYJJUAHH20fHQqu6suCYL7QxOobbce8HXPZC1jMXXU4qwaQrnPjP1ithGOJCVZVSivK/3duTScJANu6SUlQExD2JHPVT9hqieKGy9zoApb1rFCudbj37Ap63EWV+BsdoxBmyZ+Hx1EV9q4ya0lrLn2u5sCEjaHuiis3a6YOd164WkNVG52oYdQ== 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=zPSrZ30EbD5MRfyU9ltmcGEDc8BbQcdjv7W4exXsJKc=; b=SRE+7PRg3MtFhW6xpIl+Fq+Yv1xYMl6crwZAQNd0IyCgJ2vW1nraGzp/sC31HUUa8Hv8oXhtqYGwN6RquA5EGleoMck/T3tEC3cUIExVfpJnCGUdAtaISFFfdeaxZklU3pTDlKpY2NQxiRhx1fIUFdXOO9/rEPQaxHmYuTJOTbcmXqXLhGdahG8LjVOHMKYZ4RNcqH7ghY61hVDXFLWKf8AG826r+kAKe9b0yUyav864rxU+OGG7A63dJzxUYX350Dlb9DntmYaD7OOi9Oc5LiQ6PUR+Ov9Gk88Xh/EPjnaghEaWFBMTYIffBbvY3Oshfc9rfX1oMvMEOI4n4pxN0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=zPSrZ30EbD5MRfyU9ltmcGEDc8BbQcdjv7W4exXsJKc=; b=tyZizktKDLyJ/rDQLmYGTtEajj9ohf7bfiRDb7TfvrPiLcoJg1TvghveX53nXYKST+9XQaEKfgSF2NkcYRQyqe++6bjo1JyLaZkQd1Rf8pgHzfzv+c3wfHtiYnx0Af+6Uff0kF7ctNFiPREieZF5Dhe3PQed+W1RFjGLH+ryXPaLdIiTv9JOX8pNhFs6FpDyy2mbEZaA9P4XTSLElwJRWQvRzoCu/u/+QqVibTGP1gEO6SYw/vCHyCOUi4SHm6Jby1RTiEuStYEn4Sll4S4LhXPDAExvsml1KY6HdDb4iPf4W80VDpMcakA4EMqOOe/wPfuBEWj7gLrVQNc+unmQOg== Received: from BN9PR03CA0794.namprd03.prod.outlook.com (2603:10b6:408:13f::19) by MN2PR12MB4605.namprd12.prod.outlook.com (2603:10b6:208:3d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:07:57 +0000 Received: from BN8NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::e4) by BN9PR03CA0794.outlook.office365.com (2603:10b6:408:13f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:07:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT050.mail.protection.outlook.com (10.13.177.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:07:56 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:07:53 +0000 From: Xueming Li To: Thomas Monjalon CC: Luca Boccassi , Dmitry Kozlyuk , Tal Shnaiderman , Ranjit Menon , dpdk stable Date: Mon, 10 May 2021 23:59:57 +0800 Message-ID: <20210510160258.30982-48-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23f4d446-2ca1-4fca-a42f-08d913cdc67c X-MS-TrafficTypeDiagnostic: MN2PR12MB4605: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Exm62Of/PQSkv8bejvkUNKAt0gWpfhg0hK9SeFqEBF4QWMpsIQuqJoQneNMQqoPmVyjYpa205msDxx9q0CtE8guvuBiEVhCFXOAc5Zv9TBa6ZJqkaosE3JIaN9HLqrZBFghy3sDGRGc7QEJWGlhM47qlFmwHMqsMS2us4NRwidtfr9H2guRsfhf6kBxf9fOeJg++FecFsVlfFzvRsmFqrtuWhrTzeaKOWTEhvUsVGjr6i3s/yaOzomx3D/VHylRGAbuGQo0facoYHFDwNazWTUb/FNMXJ5mD39N4TnPU/qWHuPh2CdoLcT2H0ccsUAlLZtjkVeR1cGMOT9GV2iQdeTef8CELV9O3IvfFu+qT2/JUJ7ldJTTW78QjnLmhkpBTskOyo6QLRSuvDbWgYjVhnnx/60yf8fYOP1KUJt1hKa3TDAed2Uo5Lif/TEyA3SKviHD9ter3y660O8Vd1U3ogWt5J5sc+lnssQaku2mVzTr3ekNVTn730UtnUlGKrvvhYlCJguoZ9x8DsBj1DWLlyQcHsQPjWiFuuOXxodoYJPiGBDkqHuAnFyGGSmyW6/nAW5ltvj1bg5UVOSwL+xP18ESlHL98clYSwZCSpQkIys4XY6MBPybttmUd5K5xfCVuP4NBBaVqLYWNI9H/9T1rVa2/bkgOKmxKcwFedVSOtLEiTenlNFnRu0AZA4nL3J0yBfa9cQ7yn7dCYiF2XQrtRUN2etOyoS+2DZ4p12wSUzZoqcrYisHDjvvnndEWH96mP7UVMuY45l4X/gs2Fy1jew== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(8936002)(26005)(7636003)(36756003)(8676002)(356005)(36906005)(5660300002)(966005)(498600001)(2906002)(70586007)(4326008)(70206006)(7696005)(1076003)(36860700001)(55016002)(186003)(16526019)(47076005)(83380400001)(82310400003)(2616005)(426003)(336012)(6916009)(86362001)(54906003)(6286002)(53546011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:07:56.7167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23f4d446-2ca1-4fca-a42f-08d913cdc67c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4605 Subject: [dpdk-stable] patch 'bus/pci: fix Windows kernel driver categories' has been queued to stable release 20.11.2 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, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/a7e79f5d2c09aa51a4826d583e908db3f8340eb6 Thanks. Xueming Li --- >From a7e79f5d2c09aa51a4826d583e908db3f8340eb6 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 16 Mar 2021 23:09:38 +0100 Subject: [PATCH] bus/pci: fix Windows kernel driver categories Cc: Luca Boccassi [ upstream commit 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 ] 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, offering a bifurcated mode to the userspace driver. When the kernel driver is listed as unknown, there is no special treatment in DPDK probing, contrary to UIO modes. 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. Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers") Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows") Signed-off-by: Thomas Monjalon Acked-by: Dmitry Kozlyuk Acked-by: Tal Shnaiderman Acked-by: Ranjit Menon --- drivers/bus/pci/rte_bus_pci.h | 13 +++++++------ drivers/bus/pci/windows/pci.c | 14 +++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) 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; enum rte_pci_kernel_driver { - RTE_PCI_KDRV_UNKNOWN = 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 = 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 */ }; /** diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index 00e7849b05..ad9d65efd8 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -35,7 +35,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 == RTE_PCI_KDRV_NIC_UIO) + if (dev->kdrv == RTE_PCI_KDRV_NET_UIO) return 0; else return -1; @@ -204,14 +204,14 @@ get_device_resource_info(HDEVINFO dev_info, int ret; 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 = 0; dev->mem_resource[0].len = 0; dev->mem_resource[0].addr = 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 = get_netuio_device_info(dev_info, dev_info_data, dev); if (ret != 0) { RTE_LOG(DEBUG, EAL, @@ -302,9 +302,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 = RTE_PCI_KDRV_NIC_UIO; + dev->kdrv = RTE_PCI_KDRV_NET_UIO; else - dev->kdrv = RTE_PCI_KDRV_NONE; + dev->kdrv = RTE_PCI_KDRV_UNKNOWN; } static int -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.919961300 +0800 +++ 0049-bus-pci-fix-Windows-kernel-driver-categories.patch 2021-05-10 23:59:26.390000000 +0800 @@ -1 +1 @@ -From 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 Mon Sep 17 00:00:00 2001 +From a7e79f5d2c09aa51a4826d583e908db3f8340eb6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -57 +59 @@ -index 8f906097f4..d39a7748b8 100644 +index 00e7849b05..ad9d65efd8 100644 @@ -60 +62 @@ -@@ -38,7 +38,7 @@ rte_pci_map_device(struct rte_pci_device *dev) +@@ -35,7 +35,7 @@ rte_pci_map_device(struct rte_pci_device *dev) @@ -69 +71 @@ -@@ -207,14 +207,14 @@ get_device_resource_info(HDEVINFO dev_info, +@@ -204,14 +204,14 @@ get_device_resource_info(HDEVINFO dev_info, @@ -88 +90 @@ -@@ -323,9 +323,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA device_info_data, +@@ -302,9 +302,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA device_info_data,