usertools: add baseband device binding
authorNicolas Chautru <nicolas.chautru@intel.com>
Tue, 11 Jun 2019 00:33:03 +0000 (17:33 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Jul 2019 21:44:58 +0000 (23:44 +0200)
Allows binding of baseband devices

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
usertools/dpdk-devbind.py
usertools/dpdk-setup.sh

index 4791e5f..7f02948 100755 (executable)
@@ -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)
index d008074..e5bbe9f 100755 (executable)
@@ -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"