If resources were mapped prior to probe, unmap them
if probe fails.
This does not handle the case where the kernel driver was
forcibly unbound prior to probe.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_common_pci.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
Instead of passing domain, bus, devid, func, just pass
an rte_pci_addr.
Signed-off-by: Ben Walker
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 32 +---
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c
b/lib
Attaching and detaching ethernet ports from an application
is not the same thing as physically removing a PCI device,
so clarify the flags indicating support. All PCI devices
are assumed to be physically removable, so no flag is
necessary in the PCI layer.
Signed-off-by: Ben Walker
---
doc
For Linux kernel 4.0 and newer, the ability to obtain
physical page frame numbers for unprivileged users from
/proc/self/pagemap was removed. Instead, when an IOMMU
is present, simply choose our own DMA addresses instead.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_private.h
For Linux kernel 4.0 and newer, the ability to obtain
physical page frame numbers for unprivileged users from
/proc/self/pagemap was removed. Instead, when an IOMMU
is present, simply choose our own DMA addresses instead.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_private.h
.
Signed-off-by: Ben Walker
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/e1000/em_ethdev.c| 2 +-
drivers/net/e1000/igb_ethdev.c | 4 ++--
drivers/net/fm10k/fm10k_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/i40e_ethdev_vf.c| 2
rte_eal_pci_scan can be called repeatedly to re-scan the PCI
bus. If a device was removed from the system, the associated
driver will automatically be unloaded.
Signed-off-by: Ben Walker
---
Only code style changes compared to last submission. It is also rebased
onto the latest from master
The user needs to register drivers before scanning, so
it makes the most sense to put the registration
functions above the scan function in the header file.
Signed-off-by: Ben Walker
---
Only rebased onto latest master with the rest of this series.
No changes.
lib/librte_eal/common/include
.
Signed-off-by: Ben Walker
---
This patch was previously the fourth in the series, behind
another more controversial change. That change has been
removed and this patch was reordered to be independent
of those changes.
lib/librte_eal/common/eal_common_dev.c | 4 +-
lib/librte_eal/common
For Linux kernel 4.0 and newer, the ability to obtain
physical page frame numbers for unprivileged users from
/proc/self/pagemap was removed. Instead, when an IOMMU
is present, simply choose our own DMA addresses instead.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_private.h
For Linux kernel 4.0 and newer, the ability to obtain
physical page frame numbers for unprivileged users from
/proc/self/pagemap was removed. Instead, when an IOMMU
is present, simply choose our own DMA addresses instead.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_private.h
The FreeBSD implementation wasn't registering new devices
with the device framework on start up. However, common
code attempts to unregister them on shutdown which causes
a SEGFAULT. This fix makes the FreeBSD code do the same
thing as the Linux code for registration.
Signed-off-by: Ben W
If the user asks to probe multiple times, the probe
callback should only be called on devices that don't have
a driver already loaded.
This is useful if a driver is registered after the
execution of a program has started and the list of devices
needs to be re-scanned.
Signed-off-by: Ben W
In SPDK, not all drivers are registered with DPDK at start up time.
Previously, that meant DPDK always chose to set itself up in IOVA_PA
mode. Instead, when the correct iova choice is unclear based on the
devices and drivers known to DPDK at start up time, use other heuristics
(such as whether /pro
This is in preparation for future simplifications. The
functions are simply inlined for now.
Signed-off-by: Ben Walker
Change-Id: I129992c9b44f4575a28cc05b78297e15b6be4249
---
drivers/bus/pci/linux/pci.c | 176 +++-
1 file changed, 71 insertions(+), 105 deletions
This performs a check for whether the device should be ignored
due to whitelist or blacklist. This check eventually needs
to apply to all of the other checks in rte_pci_get_iommu_class.
Signed-off-by: Ben Walker
Change-Id: I8e63e4c2e4199f34561ea1d911e13d6d74a47322
---
drivers/bus/pci/linux
It's simpler to reverse the if statement here, especially
with an upcoming simplification.
Signed-off-by: Ben Walker
Change-Id: I6cff80231032304f3f865fdf38157554fad7fd07
---
drivers/bus/pci/linux/pci.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bu
In the case where no drivers are registered with the system,
rte_pci_get_iommu_class should return RTE_IOVA_DC.
Signed-off-by: Ben Walker
Change-Id: Ia5b0cae100cfcfe46a9e4996328f9746ce33cfd3
---
drivers/bus/pci/linux/pci.c | 79 ++---
1 file changed, 38
Make all of the loops first iterate over devices, then
drivers. This is in preparation for combining them
into a single loop.
Signed-off-by: Ben Walker
Change-Id: Ifb2bfcc60570a5d5a13481be3da0fc74bf00ef1f
---
drivers/bus/pci/linux/pci.c | 12 ++--
1 file changed, 6 insertions(+), 6
This function only returned the correct answer after
a call to initialize the memory subsystem. Make it work
prior to that.
Signed-off-by: Ben Walker
Change-Id: I8f3c5128fbf5da884a956bbcc72c5a13564825d5
---
lib/librte_eal/linux/eal/eal_memory.c | 63 ---
1 file changed
All of the checks should respect the white and black lists.
Signed-off-by: Ben Walker
Change-Id: Ie66176bea49987d1fc0a03dbee2638d9dd6efbc5
---
drivers/bus/pci/linux/pci.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci
Take several independent if statements and convert to a
switch statement.
Signed-off-by: Ben Walker
Change-Id: Ia77c88ea484b529e8b0c9e09e8ef22cf3210e669
---
drivers/bus/pci/linux/pci.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/pci
Two of these loops easily collapse into a single loop.
This sets the stage for future simplifications.
Signed-off-by: Ben Walker
Change-Id: I3353f2e3585808cebff3f11805f96e4a1cc7fb3a
---
drivers/bus/pci/linux/pci.c | 31 ++-
1 file changed, 10 insertions(+), 21
If the bus can't determine a preference for IOVA_PA vs.
IOVA_VA by looking at the devices and drivers, as a
last resort test if physical addresses are even accessible
in /proc/self/pagemap. If they are, use IOVA_PA. If they
are not, use IOVA_VA.
Change-Id: If1eeb723283b80b24bd973987054fdad62f59cbd
If a device is found that is bound to the UIO driver,
only force IOVA_PA if there is a driver registered to use it.
Signed-off-by: Ben Walker
Change-Id: I8015f11a33ab1b7662bf374d6944eff8d7a74a07
---
drivers/bus/pci/linux/pci.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
The three loops can now be easily combined into one.
This is slightly less efficient than before because it
doesn't break out early. But that can be addressed
later.
Signed-off-by: Ben Walker
Change-Id: Ic97155bb478dddbcbeaa6d51947684ffef219a52
---
drivers/bus/pci/linux/pci.c
This function only returned the correct answer after
a call to initialize the memory subsystem. Make it work
prior to that.
Signed-off-by: Ben Walker
---
lib/librte_eal/linux/eal/eal_memory.c | 63 ---
1 file changed, 28 insertions(+), 35 deletions(-)
diff --git a/lib
Make all of the loops first iterate over devices, then
drivers. This is in preparation for combining them
into a single loop.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b
Two of these loops easily collapse into a single loop.
This sets the stage for future simplifications.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 31 ++-
1 file changed, 10 insertions(+), 21 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b
This is in preparation for future simplifications. The
functions are simply inlined for now.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 176 +++-
1 file changed, 71 insertions(+), 105 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b
This performs a check for whether the device should be ignored
due to whitelist or blacklist. This check eventually needs
to apply to all of the other checks in rte_pci_get_iommu_class.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 44 +
1 file
The three loops can now be easily combined into one.
This is slightly less efficient than before because it
doesn't break out early. But that can be addressed
later.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 19 +++
1 file changed, 3 insertions(+
It's simpler to reverse the if statement here, especially
with an upcoming simplification.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
Take several independent if statements and convert to a
switch statement.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index
All of the checks should respect the white and black lists.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 6d311f4e0..d2464d2ae 100644
--- a
If a device is found that is bound to the UIO driver,
only force IOVA_PA if there is a driver registered to use it.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci
In the case where no drivers are registered with the system,
rte_pci_get_iommu_class should return RTE_IOVA_DC.
Signed-off-by: Ben Walker
---
drivers/bus/pci/linux/pci.c | 91 -
1 file changed, 50 insertions(+), 41 deletions(-)
diff --git a/drivers/bus/pci
If the bus can't determine a preference for IOVA_PA vs.
IOVA_VA by looking at the devices and drivers, as a
last resort test if physical addresses are even accessible
in /proc/self/pagemap. If they are, use IOVA_PA. If they
are not, use IOVA_VA.
Signed-off-by: Ben Walker
---
lib/librt
check for a clean shutdown
when used in conjunction with tools like AddressSanitizer. Further,
the call itself verifies that all elements have been returned to
the pool or it fails.
Signed-off-by: Ben Walker
---
lib/librte_mempool/rte_dom0_mempool.c | 22 +++
lib/librte_mempool
This series of patches adds support for PCI hot insert and remove.
Detection of new devices or removed devices is accomplished by
polling rte_eal_pci_probe, with the registered PCI drivers being
loaded or unloaded when a new device is found or previously known
device is removed.
There are some add
If resources were mapped prior to probe, unmap them
if probe fails.
This does not handle the case where the kernel driver was
forcibly unbound prior to probe.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_common_pci.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
Instead of passing domain, bus, devid, func, just pass
an rte_pci_addr.
Signed-off-by: Ben Walker
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 32 +---
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c
b/lib
Attaching and detaching ethernet ports from an application
is not the same thing as physically removing a PCI device,
so clarify the flags indicating support. All PCI devices
are assumed to be physically removable, so no flag is
necessary in the PCI layer.
Signed-off-by: Ben Walker
---
doc
rte_eal_pci_scan can be called repeatedly to re-scan the PCI
bus. If a device was removed from the system, the associated
driver will automatically be unloaded.
Signed-off-by: Ben Walker
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 58 +++
1 file changed, 58
The user needs to register drivers before scanning, so
it makes the most sense to put the registration
functions above the scan function in the header file.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/include/rte_pci.h | 56 -
1 file changed, 28
, so
simplify the api down to just rte_eal_pci_probe which can
be called repeatedly through the lifetime of the application
to scan for new or removed PCI devices and load or unload
drivers as required.
Signed-off-by: Ben Walker
---
app/test/test_pci.c | 2 +-
lib
.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_common_dev.c | 4 +-
lib/librte_eal/common/eal_common_pci.c | 111 +---
lib/librte_eal/common/include/rte_pci.h | 22 ---
3 files changed, 45 insertions(+), 92 deletions(-)
diff --git a/lib/librte_eal
If resources were mapped prior to probe, unmap them
if probe fails.
This does not handle the case where the kernel driver was
forcibly unbound prior to probe.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_common_pci.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
Instead of passing domain, bus, devid, func, just pass
an rte_pci_addr.
Signed-off-by: Ben Walker
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 32 +---
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c
b/lib
Attaching and detaching ethernet ports from an application
is not the same thing as physically removing a PCI device,
so clarify the flags indicating support. All PCI devices
are assumed to be physically removable, so no flag is
necessary in the PCI layer.
Signed-off-by: Ben Walker
---
doc
rte_eal_pci_scan can be called repeatedly to re-scan the PCI
bus. If a device was removed from the system, the associated
driver will automatically be unloaded.
Signed-off-by: Ben Walker
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 62 +++
1 file changed, 62
The user needs to register drivers before scanning, so
it makes the most sense to put the registration
functions above the scan function in the header file.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/include/rte_pci.h | 56 -
1 file changed, 28
api down to just rte_eal_pci_probe which can
be called repeatedly through the lifetime of the application
to scan for new or removed PCI devices and load or unload
drivers as required.
Signed-off-by: Ben Walker
---
app/test/test_pci.c | 2 +-
lib/librte_eal/bsdapp
.
Signed-off-by: Ben Walker
---
lib/librte_eal/common/eal_common_dev.c | 4 +-
lib/librte_eal/common/eal_common_pci.c | 109 +---
lib/librte_eal/common/include/rte_pci.h | 22 ---
3 files changed, 43 insertions(+), 92 deletions(-)
diff --git a/lib/librte_eal
54 matches
Mail list logo