From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5964A04E7; Wed, 4 Nov 2020 08:04:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 864D6C804; Wed, 4 Nov 2020 08:04:00 +0100 (CET) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 9BB8BC7F2 for ; Wed, 4 Nov 2020 08:03:57 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id k7so556420plk.3 for ; Tue, 03 Nov 2020 23:03:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cqarFFgOJ7La2Qn6/42IDnxeSQzmzQv4ASLxcqQ21p4=; b=gSb0LQuVwmnkrGUMX7wbYU+os/CQ3zkJcO1QKcSolgfhK4xZN8l9TrqjhfhfWcJxN8 xGMmLf4WlUzHyTlE4Lm9zknZg8yKXsVT+CtJah6QS28+AKECxBc7wJ5nQHNAbzSxAW/R xg+jNNoqBPNUlz0Ec0GTWngWojEKz1DKAQQlfVJpWRcQR0J/V5xgf67vraFnsdjotMln lMJGH09XrLxZIY0HlNU2Igzj1XrP04oyI6l6S+MgyvWMpg/OjPZ//zdimwZmJ5C97nL/ i4ZE7gECpv3SRNyLzER8/3+YQx+RPgq3y3WPS9WcQH37X8a01ysPwhIw6SGFQ3lLY9ke wKUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cqarFFgOJ7La2Qn6/42IDnxeSQzmzQv4ASLxcqQ21p4=; b=IfHZF4Qrlsf6jIPOW6Diq/+ox4G39BN9MXgcvzf73Uk6B99yNAqiWrEoZQswXAoI12 dx1Z2nwCluG+UNoy4TS4TI9u9DYtBIFpy9I//6ESJn/3+rQ7TQUjaFu2r0ht8NxpOx5U bI4CF+vkaYamF/sEAVBuJ0QKgODKYGyWzZaCCjPP1/kMmf1pdxjSx5oc66y4Gm+WKym2 r7e43tOHC0MOyZnvvtlYgCoLhkVKBMAcbf/8F0kNXG4hNFoXclF2/O/dlFJK+6faVe4v jmq+YCKqD4kra+1rBIgTUMyDXsMs5Mm9ZBDh85altdM5gMOTFImSrtQmCL1P5+6uarXo OUhg== X-Gm-Message-State: AOAM5335n9w1ZS7z7qIllOxrQO0bcy2vLU/cnwn3M9Vr2TWgjBbyAsPS NNhxv3sqOSSASuRxEcWdG98OHxOW0/7oiNiT X-Google-Smtp-Source: ABdhPJxTtIO9wOs3Ed2qtAdn2EvvsAQqimR068OOVtp8U8e/QloPXRUyoFvkJXhtG/CeoNebBIE98w== X-Received: by 2002:a17:902:26a:b029:d6:caca:620a with SMTP id 97-20020a170902026ab02900d6caca620amr13342322plc.46.1604473435341; Tue, 03 Nov 2020 23:03:55 -0800 (PST) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z21sm1181177pfa.158.2020.11.03.23.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 23:03:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 3 Nov 2020 23:03:46 -0800 Message-Id: <20201104070350.28224-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104070350.28224-1-stephen@networkplumber.org> References: <20200906013133.26360-12-stephen@networkplumber.org> <20201104070350.28224-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/6] dpdk-devbind: fix indentation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Python lint complains about identation and missing spaces around commas in this script. Signed-off-by: Stephen Hemminger --- usertools/dpdk-devbind.py | 53 ++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index e0b74c5a3e41..3a27641d0e08 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -14,15 +14,15 @@ # The PCI base class for all devices network_class = {'Class': '02', 'Vendor': None, 'Device': None, - 'SVendor': None, 'SDevice': 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} + 'SVendor': None, 'SDevice': None} encryption_class = {'Class': '10', 'Vendor': None, 'Device': None, - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} intel_processor_class = {'Class': '0b', 'Vendor': '8086', 'Device': None, - 'SVendor': None, 'SDevice': 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', @@ -34,29 +34,30 @@ cavium_zip = {'Class': '12', 'Vendor': '177d', 'Device': 'a037', 'SVendor': None, 'SDevice': None} avp_vnic = {'Class': '05', 'Vendor': '1af4', 'Device': '1110', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} octeontx2_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f9,a0fa', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} octeontx2_dma = {'Class': '08', 'Vendor': '177d', 'Device': 'a081', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} octeontx2_ree = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f4', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} -intel_ioat_bdw = {'Class': '08', 'Vendor': '8086', 'Device': '6f20,6f21,6f22,6f23,6f24,6f25,6f26,6f27,6f2e,6f2f', - 'SVendor': None, 'SDevice': None} +intel_ioat_bdw = {'Class': '08', 'Vendor': '8086', + 'Device': '6f20,6f21,6f22,6f23,6f24,6f25,6f26,6f27,6f2e,6f2f', + 'SVendor': None, 'SDevice': None} intel_ioat_skx = {'Class': '08', 'Vendor': '8086', 'Device': '2021', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} intel_ioat_icx = {'Class': '08', 'Vendor': '8086', 'Device': '0b00', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} intel_idxd_spr = {'Class': '08', 'Vendor': '8086', 'Device': '0b25', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e', - 'SVendor': None, 'SDevice': None} + 'SVendor': None, 'SDevice': None} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class] @@ -206,7 +207,7 @@ def get_device_details(devices_type): route = subprocess.check_output(["ip", "-o", "route"]) # filter out all lines for 169.254 routes route = "\n".join(filter(lambda ln: not ln.startswith("169.254"), - route.decode().splitlines())) + route.decode().splitlines())) rt_info = route.split() for i in range(len(rt_info) - 1): if rt_info[i] == "dev": @@ -366,8 +367,8 @@ def bind_one(dev_id, driver, force): return try: # Convert Device and Vendor Id to int to write to new_id - f.write("%04x %04x" % (int(dev["Vendor"],16), - int(dev["Device"], 16))) + f.write("%04x %04x" % (int(dev["Vendor"], 16), + int(dev["Device"], 16))) f.close() except: print("Error: bind failed for %s - Cannot write new PCI ID to " @@ -409,13 +410,13 @@ def bind_one(dev_id, driver, force): f = open(filename, "w") except: sys.exit("Error: unbind failed for %s - Cannot open %s" - % (dev_id, filename)) + % (dev_id, filename)) try: f.write("\00") f.close() except: sys.exit("Error: unbind failed for %s - Cannot open %s" - % (dev_id, filename)) + % (dev_id, filename)) def unbind_all(dev_list, force=False): @@ -456,7 +457,7 @@ def bind_all(dev_list, driver, force=False): pass # check if we're attempting to bind to a driver that isn't loaded - if not module_is_loaded(driver.replace('-','_')): + if not module_is_loaded(driver.replace('-', '_')): sys.exit("Error: Driver '%s' is not loaded." % driver) try: @@ -501,9 +502,9 @@ def display_devices(title, dev_list, extra_params=None): for dev in dev_list: if extra_params is not None: strings.append("%s '%s %s' %s" % (dev["Slot"], - dev["Device_str"], - dev["Device"], - extra_params % dev)) + dev["Device_str"], + dev["Device"], + extra_params % dev)) else: strings.append("%s '%s'" % (dev["Slot"], dev["Device_str"])) # sort before printing, so that the entries appear in PCI order @@ -573,7 +574,7 @@ def show_status(): show_device_status(mempool_devices, "Mempool") if status_dev == "compress" or status_dev == "all": - show_device_status(compress_devices , "Compress") + show_device_status(compress_devices, "Compress") if status_dev == "misc" or status_dev == "all": show_device_status(misc_devices, "Misc (rawdev)") -- 2.27.0