[dpdk-stable] patch 'bus/pci: skip probing some Windows NDIS devices' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 17:59:56 CEST 2021


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/75c0d71c9f47c541375815b9b02d9185e32b10e1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 75c0d71c9f47c541375815b9b02d9185e32b10e1 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam at intel.com>
Date: Wed, 10 Feb 2021 12:36:54 -0800
Subject: [PATCH] bus/pci: skip probing some Windows NDIS devices
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit de04405b336ed01e234db39fc211b4592b79c2b3 ]

Implement rte_pci_map_device() to distinguish between the devices bound
to netuio and NDIS devices.
Only return success for the netuio devices.

Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows")

Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam at intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon at intel.com>
Acked-by: Tal Shnaiderman <talshn at nvidia.com>
Acked-by: Narcisa Vasile <navasile at linux.microsoft.com>
Tested-by: Narcisa Vasile <navasile at linux.microsoft.com>
---
 drivers/bus/pci/windows/pci.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index f662584528..00e7849b05 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -23,20 +23,22 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc,
  * the registry hive for PCI devices.
  */
 
-/* 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
  */
 
 /* 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.
+	/* Only return success for devices bound to netuio.
+	 * Devices that are bound to netuio are mapped at
+	 * the bus probing stage.
 	 */
-	return 0;
+	if (dev->kdrv == RTE_PCI_KDRV_NIC_UIO)
+		return 0;
+	else
+		return -1;
 }
 
 /* Unmap pci device */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.897172400 +0800
+++ 0048-bus-pci-skip-probing-some-Windows-NDIS-devices.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From de04405b336ed01e234db39fc211b4592b79c2b3 Mon Sep 17 00:00:00 2001
+From 75c0d71c9f47c541375815b9b02d9185e32b10e1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit de04405b336ed01e234db39fc211b4592b79c2b3 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list