From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 9BC1FA00E6
	for <public@inbox.dpdk.org>; Tue, 14 May 2019 21:47:13 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id E8E785F20;
	Tue, 14 May 2019 21:46:27 +0200 (CEST)
Received: from mga18.intel.com (mga18.intel.com [134.134.136.126])
 by dpdk.org (Postfix) with ESMTP id B1EBC5F13
 for <dev@dpdk.org>; Tue, 14 May 2019 21:46:25 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 May 2019 12:46:24 -0700
X-ExtLoop1: 1
Received: from skx-5gnr-sd5.sc.intel.com ([172.25.69.194])
 by orsmga003.jf.intel.com with ESMTP; 14 May 2019 12:46:24 -0700
From: Nicolas Chautru <nicolas.chautru@intel.com>
To: 
Cc: dev@dpdk.org,
	Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 14 May 2019 12:45:43 -0700
Message-Id: <1557863143-174842-6-git-send-email-nicolas.chautru@intel.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1557863143-174842-1-git-send-email-nicolas.chautru@intel.com>
References: <1557533163-172544-1-git-send-email-nicolas.chautru@intel.com>
 <1557863143-174842-1-git-send-email-nicolas.chautru@intel.com>
Subject: [dpdk-dev] [PATCH v2 5/5] usertools: update to usertool for
	baseband device
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <20190514194543.X_t_qREpPbr3M8Ol9b2LwqKeJQmv7nqWRxdzwCYnDcw@z>

Allows binding of baseband devices

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 usertools/dpdk-devbind.py | 10 +++++++++-
 usertools/dpdk-setup.sh   |  6 +++---
 2 files changed, 12 insertions(+), 4 deletions(-)
 mode change 100755 => 100644 usertools/dpdk-devbind.py
 mode change 100755 => 100644 usertools/dpdk-setup.sh

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
old mode 100755
new mode 100644
index 9e79f0d..a6ee8f9
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -18,6 +18,8 @@
                    'SVendor': None, 'SDevice': None}
 intel_processor_class = {'Class': '0b', 'Vendor': '8086', 'Device': None,
                    'SVendor': None, 'SDevice': None}
+acceleration_class = {'Class': '12', 'Vendor': None, 'Device': None,
+               'SVendor': None, 'SDevice': None}
 cavium_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a04b,a04d',
               'SVendor': None, 'SDevice': None}
 cavium_fpa = {'Class': '08', 'Vendor': '177d', 'Device': 'a053',
@@ -40,6 +42,7 @@
 crypto_devices = [encryption_class, intel_processor_class]
 eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso]
 mempool_devices = [cavium_fpa, octeontx2_npa]
+baseband_devices = [acceleration_class]
 compress_devices = [cavium_zip]
 
 # global dict ethernet devices present. Dictionary indexed by PCI address.
@@ -89,7 +92,7 @@ def usage():
 
     --status-dev:
         Print the status of given device group. Supported device groups are:
-        "net", "crypto", "event", "mempool" and "compress"
+        "net", "crypto", "baseband", "event", "mempool" and "compress"
 
     -b driver, --bind=driver:
         Select the driver to use or \"none\" to unbind the device
@@ -586,6 +589,9 @@ def show_status():
     if status_dev == "crypto" or status_dev == "all":
         show_device_status(crypto_devices, "Crypto")
 
+    if status_dev == "baseband" or status_dev == "all":
+        show_device_status(baseband_devices, "Baseband")
+
     if status_dev == "event" or status_dev == "all":
         show_device_status(eventdev_devices, "Eventdev")
 
@@ -667,6 +673,7 @@ def do_arg_actions():
             # refresh if we have changed anything
             get_device_details(network_devices)
             get_device_details(crypto_devices)
+            get_device_details(baseband_devices)
             get_device_details(eventdev_devices)
             get_device_details(mempool_devices)
             get_device_details(compress_devices)
@@ -688,6 +695,7 @@ def main():
     get_device_details(network_devices)
     get_device_details(crypto_devices)
     get_device_details(eventdev_devices)
+    get_device_details(baseband_devices)
     get_device_details(mempool_devices)
     get_device_details(compress_devices)
     do_arg_actions()
diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
old mode 100755
new mode 100644
index d008074..15f91b8
--- 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/Crypto/Baseband device settings"
 	FUNC[6]="show_devices"
 
-	TEXT[7]="Bind Ethernet/Crypto device to IGB UIO module"
+	TEXT[7]="Bind Ethernet/Crypto/Baseband 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/Crypto/Baseband device to VFIO module"
 	FUNC[8]="bind_devices_to_vfio"
 
 	TEXT[9]="Setup VFIO permissions"
-- 
1.8.3.1