[dpdk-dev] [PATCH v2 6/7] pci: Combine rte_eal_pci_scan and rte_eal_pci_probe

2016-11-23 Thread Ben Walker
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/librte_eal/bsdapp

[dpdk-dev] [PATCH v2 5/7] pci: Move driver registration above pci scan

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH v2 4/7] pci: rte_eal_pci_scan now handles removal of PCI devices

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH v2 3/7] pci: Pass rte_pci_addr to functions instead of separate args

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH v2 2/7] pci: Separate detaching ethernet ports from PCI devices

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH v2 1/7] pci: If a driver's probe function fails, unmap resources.

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH 7/7] pci: Clarify interfaces for dynamic attach/detach of drivers

2016-11-23 Thread Ben Walker
. 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

[dpdk-dev] [PATCH 6/7] pci: Combine rte_eal_pci_scan and rte_eal_pci_probe

2016-11-23 Thread Ben Walker
, 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

[dpdk-dev] [PATCH 5/7] pci: Move driver registration above pci scan

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH 4/7] pci: rte_eal_pci_scan now handles removal of PCI devices

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH 3/7] pci: Pass rte_pci_addr to functions instead of separate args

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH 2/7] pci: Separate detaching ethernet ports from PCI devices

2016-11-23 Thread Ben Walker
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

[dpdk-dev] Improved PCI hotplug support

2016-11-23 Thread Ben Walker
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

[dpdk-dev] [PATCH] pci: Don't call probe callback if driver already loaded.

2016-10-25 Thread Ben Walker
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 Walker

[dpdk-dev] [PATCH] Add rte_mempool_free

2016-05-16 Thread Ben Walker
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