[dpdk-stable] patch 'bus/pci: remove unused scan by address' has been queued to stable release 19.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Oct 28 11:46:03 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. 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.
Thanks.
Luca Boccassi
---
>From edd51184ee9d3971e676f1095ec0642803d442fb Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 14 Oct 2020 22:18:13 +0200
Subject: [PATCH] bus/pci: remove unused scan by address
[ upstream commit 59440fbabfbcfae350e0efa6f47201b5cf0bd625 ]
The function pci_update_device was used to scan a device
for probing by PCI address.
This private function (and implementations) are unused
since such probing is removed.
Fixes: f3bac43b60da ("bus/pci: remove unused function to probe by address")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: David Marchand <david.marchand at redhat.com>
---
drivers/bus/pci/bsd/pci.c | 49 -------------------------------------
drivers/bus/pci/linux/pci.c | 12 ---------
drivers/bus/pci/private.h | 13 ----------
3 files changed, 74 deletions(-)
diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
index ebbfeb13a8..081c62ab06 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -392,55 +392,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
return RTE_IOVA_PA;
}
-int
-pci_update_device(const struct rte_pci_addr *addr)
-{
- int fd;
- struct pci_conf matches[2];
- struct pci_match_conf match = {
- .pc_sel = {
- .pc_domain = addr->domain,
- .pc_bus = addr->bus,
- .pc_dev = addr->devid,
- .pc_func = addr->function,
- },
- };
- struct pci_conf_io conf_io = {
- .pat_buf_len = 0,
- .num_patterns = 1,
- .patterns = &match,
- .match_buf_len = sizeof(matches),
- .matches = &matches[0],
- };
-
- fd = open("/dev/pci", O_RDONLY);
- if (fd < 0) {
- RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
- goto error;
- }
-
- if (ioctl(fd, PCIOCGETCONF, &conf_io) < 0) {
- RTE_LOG(ERR, EAL, "%s(): error with ioctl on /dev/pci: %s\n",
- __func__, strerror(errno));
- goto error;
- }
-
- if (conf_io.num_matches != 1)
- goto error;
-
- if (pci_scan_one(fd, &matches[0]) < 0)
- goto error;
-
- close(fd);
-
- return 0;
-
-error:
- if (fd >= 0)
- close(fd);
- return -1;
-}
-
/* Read PCI config space. */
int rte_pci_read_config(const struct rte_pci_device *dev,
void *buf, size_t len, off_t offset)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 71b0a3053d..dba87f1275 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -394,18 +394,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
return 0;
}
-int
-pci_update_device(const struct rte_pci_addr *addr)
-{
- char filename[PATH_MAX];
-
- snprintf(filename, sizeof(filename), "%s/" PCI_PRI_FMT,
- rte_pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid,
- addr->function);
-
- return pci_scan_one(filename, addr);
-}
-
/*
* split up a pci address into its constituent parts.
*/
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 9d14769a7e..81735e4c0a 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -55,19 +55,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
struct rte_pci_device *new_pci_dev);
-/**
- * Update a pci device object by asking the kernel for the latest information.
- *
- * This function is private to EAL.
- *
- * @param addr
- * The PCI Bus-Device-Function address to look for
- * @return
- * - 0 on success.
- * - negative on error.
- */
-int pci_update_device(const struct rte_pci_addr *addr);
-
/**
* Map the PCI resource of a PCI device in virtual memory
*
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-10-28 10:35:18.003825377 +0000
+++ 0204-bus-pci-remove-unused-scan-by-address.patch 2020-10-28 10:35:11.812834558 +0000
@@ -1,30 +1,30 @@
-From 59440fbabfbcfae350e0efa6f47201b5cf0bd625 Mon Sep 17 00:00:00 2001
+From edd51184ee9d3971e676f1095ec0642803d442fb Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 14 Oct 2020 22:18:13 +0200
Subject: [PATCH] bus/pci: remove unused scan by address
+[ upstream commit 59440fbabfbcfae350e0efa6f47201b5cf0bd625 ]
+
The function pci_update_device was used to scan a device
for probing by PCI address.
This private function (and implementations) are unused
since such probing is removed.
Fixes: f3bac43b60da ("bus/pci: remove unused function to probe by address")
-Cc: stable at dpdk.org
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: David Marchand <david.marchand at redhat.com>
---
- drivers/bus/pci/bsd/pci.c | 49 -----------------------------------
- drivers/bus/pci/linux/pci.c | 12 ---------
- drivers/bus/pci/private.h | 13 ----------
- drivers/bus/pci/windows/pci.c | 11 --------
- 4 files changed, 85 deletions(-)
+ drivers/bus/pci/bsd/pci.c | 49 -------------------------------------
+ drivers/bus/pci/linux/pci.c | 12 ---------
+ drivers/bus/pci/private.h | 13 ----------
+ 3 files changed, 74 deletions(-)
diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
-index 97c611737a..4b8a208781 100644
+index ebbfeb13a8..081c62ab06 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
-@@ -401,55 +401,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
+@@ -392,55 +392,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
return RTE_IOVA_PA;
}
@@ -81,10 +81,10 @@
int rte_pci_read_config(const struct rte_pci_device *dev,
void *buf, size_t len, off_t offset)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
-index 619d209ad2..2e1808b902 100644
+index 71b0a3053d..dba87f1275 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
-@@ -397,18 +397,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -394,18 +394,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
return 0;
}
@@ -104,10 +104,10 @@
* split up a pci address into its constituent parts.
*/
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
-index 16f997c701..f566943f5e 100644
+index 9d14769a7e..81735e4c0a 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
-@@ -66,19 +66,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
+@@ -55,19 +55,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
struct rte_pci_device *new_pci_dev);
@@ -125,30 +125,8 @@
-int pci_update_device(const struct rte_pci_addr *addr);
-
/**
- * A structure describing a PCI mapping.
- */
-diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
-index 10bb0e9cf1..b450346bdc 100644
---- a/drivers/bus/pci/windows/pci.c
-+++ b/drivers/bus/pci/windows/pci.c
-@@ -49,17 +49,6 @@ rte_pci_unmap_device(struct rte_pci_device *dev __rte_unused)
- */
- }
-
--int
--pci_update_device(const struct rte_pci_addr *addr __rte_unused)
--{
-- /* 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.
-- */
-- return 0;
--}
--
- /* Read PCI config space. */
- int
- rte_pci_read_config(const struct rte_pci_device *dev __rte_unused,
+ * Map the PCI resource of a PCI device in virtual memory
+ *
--
2.20.1
More information about the stable
mailing list