From 07488e29140aed5dffed50b58dd24f926bde96c8 Mon Sep 17 00:00:00 2001 From: Nicolas Chautru Date: Mon, 10 Jun 2019 17:33:03 -0700 Subject: [PATCH] usertools: add baseband device binding Allows binding of baseband devices Signed-off-by: Nicolas Chautru Acked-by: Amr Mokhtar --- usertools/dpdk-devbind.py | 10 +++++++++- usertools/dpdk-setup.sh | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 4791e5f48d..7f02948d7a 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -12,6 +12,8 @@ from os.path import exists, abspath, dirname, basename # The PCI base class for all devices network_class = {'Class': '02', 'Vendor': None, 'Device': None, 'SVendor': None, 'SDevice': None} +acceleration_class = {'Class': '12', 'Vendor': None, 'Device': None, + 'SVendor': None, 'SDevice': None} ifpga_class = {'Class': '12', 'Vendor': '8086', 'Device': '0b30', 'SVendor': None, 'SDevice': None} encryption_class = {'Class': '10', 'Vendor': None, 'Device': None, @@ -42,6 +44,7 @@ intel_ioat_skx = {'Class': '08', 'Vendor': '8086', 'Device': '2021', 'SVendor': None, 'SDevice': None} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] +baseband_devices = [acceleration_class] crypto_devices = [encryption_class, intel_processor_class] eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] @@ -95,7 +98,7 @@ Options: --status-dev: Print the status of given device group. Supported device groups are: - "net", "crypto", "event", "mempool" and "compress" + "net", "baseband", "crypto", "event", "mempool" and "compress" -b driver, --bind=driver: Select the driver to use or \"none\" to unbind the device @@ -590,6 +593,9 @@ def show_status(): if status_dev == "net" or status_dev == "all": show_device_status(network_devices, "Network") + if status_dev == "baseband" or status_dev == "all": + show_device_status(baseband_devices, "Baseband") + if status_dev == "crypto" or status_dev == "all": show_device_status(crypto_devices, "Crypto") @@ -675,6 +681,7 @@ def do_arg_actions(): clear_data() # refresh if we have changed anything get_device_details(network_devices) + get_device_details(baseband_devices) get_device_details(crypto_devices) get_device_details(eventdev_devices) get_device_details(mempool_devices) @@ -696,6 +703,7 @@ def main(): check_modules() clear_data() get_device_details(network_devices) + get_device_details(baseband_devices) get_device_details(crypto_devices) get_device_details(eventdev_devices) get_device_details(mempool_devices) diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh index d00807420f..e5bbe9feec 100755 --- a/usertools/dpdk-setup.sh +++ b/usertools/dpdk-setup.sh @@ -496,13 +496,13 @@ step2_func() TEXT[5]="Setup hugepage mappings for NUMA systems" FUNC[5]="set_numa_pages" - TEXT[6]="Display current Ethernet/Crypto device settings" + TEXT[6]="Display current Ethernet/Baseband/Crypto device settings" FUNC[6]="show_devices" - TEXT[7]="Bind Ethernet/Crypto device to IGB UIO module" + TEXT[7]="Bind Ethernet/Baseband/Crypto device to IGB UIO module" FUNC[7]="bind_devices_to_igb_uio" - TEXT[8]="Bind Ethernet/Crypto device to VFIO module" + TEXT[8]="Bind Ethernet/Baseband/Crypto device to VFIO module" FUNC[8]="bind_devices_to_vfio" TEXT[9]="Setup VFIO permissions" -- 2.20.1