[dpdk-dev] [PATCH v4 1/1] bus/pci: optimise scanning with whitelist/blacklist

Sunil Kumar Kori skori at marvell.com
Fri May 1 14:40:40 CEST 2020


Hello Gaeten,

I have validated hotplug functionality using multi process hotplug application.
Devices are being attached and detached at runtime properly.

Regards
Sunil Kumar Kori

>-----Original Message-----
>From: Sunil Kumar Kori <skori at marvell.com>
>Sent: Friday, May 1, 2020 5:09 PM
>To: stephen at networkplumber.org; david.marchand at redhat.com; Jerin Jacob
>Kollanukkaran <jerinj at marvell.com>; grive at u256.net
>Cc: dev at dpdk.org; Sunil Kumar Kori <skori at marvell.com>
>Subject: [PATCH v4 1/1] bus/pci: optimise scanning with whitelist/blacklist
>
>rte_bus_scan API scans all the available PCI devices irrespective of white
>or black listing parameters then further devices are probed based on white
>or black listing parameters. So unnecessary CPU cycles are wasted during
>rte_pci_scan.
>
>For Octeontx2 platform with core frequency 2.4 Ghz, rte_bus_scan consumes
>around 26ms to scan around 90 PCI devices but all may not be used by the
>application. So for the application which uses 2 NICs, rte_bus_scan
>consumes few microseconds and rest time is saved with this patch.
>
>Patch restricts devices to be scanned as per below mentioned conditions:
> - All devices will be scanned if no parameters are passed.
> - Only white listed devices will be scanned if white list is available.
> - All devices, except black listed, will be scanned if black list is
>   available.
>
>Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
>---
>v4:
> - Review comments incorporated (Gaeten and David).
> - Rebased on top of tree.
>v3:
> - Remove __rte_experimental from private function.
> - Remove entry from map file too.
>v2:
> - Added function to validate ignorance of device based on PCI address.
> - Marked device validation function as experimental.
>
> drivers/bus/pci/bsd/pci.c    | 12 +++++++++++-
> drivers/bus/pci/linux/pci.c  |  3 +++
> drivers/bus/pci/pci_common.c | 33 ++++++++++++---------------------
> drivers/bus/pci/private.h    | 11 +++++++++++
> 4 files changed, 37 insertions(+), 22 deletions(-)
>
[snip]



More information about the dev mailing list