DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/7] net/qede: reduce noise in debug logs
From: Ferruh Yigit @ 2016-12-08 16:44 UTC (permalink / raw)
  To: Harish Patil, dev; +Cc: Dept-EngDPDKDev, Rasesh Mody
In-Reply-To: <1480733039-13046-1-git-send-email-harish.patil@qlogic.com>

On 12/3/2016 2:43 AM, Harish Patil wrote:
> From: Rasesh Mody <Rasesh.Mody@cavium.com>
> 
> Replace CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER with
> CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL which is a 32-bit bitmapped value
> where each bit represent a particular submodule to debug. Also move
> notice messages under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.
> 
> Signed-off-by: Harish Patil <harish.patil@qlogic.com>
> Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com>
> ---
>  config/common_base             |  2 +-
>  doc/guides/nics/qede.rst       |  4 ++--
>  drivers/net/qede/qede_ethdev.c |  4 ++--
>  drivers/net/qede/qede_logs.h   | 21 +++++----------------
>  4 files changed, 10 insertions(+), 21 deletions(-)
> 
> diff --git a/config/common_base b/config/common_base
> index 4bff83a..2ffd557 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -320,7 +320,7 @@ CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
>  CONFIG_RTE_LIBRTE_QEDE_PMD=y
>  CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n
>  CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n
> -CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n
> +CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL=0
>  CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n
>  CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
>  #Provides abs path/name of the firmware file.
> diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
> index d22ecdd..ddf4248 100644
> --- a/doc/guides/nics/qede.rst
> +++ b/doc/guides/nics/qede.rst
> @@ -103,9 +103,9 @@ enabling debugging options may affect system performance.
>  
>    Toggle display of generic debugging messages.
>  
> -- ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER`` (default **n**)
> +- ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL`` (default **0**)

Does it make sense to document how DEBUG_VAL used?

Also commit log says bitmapped value to enable/disable a particular
submodule, you may want to document here which value enable/disable
which submodule.

>  
> -  Toggle display of ecore related messages.
> +  Control driver debug verbosity using 32-bit bitmap flags.
>  
>  - ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX`` (default **n**)
>  

<...>

> diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h
> index 45c4af0..08fdf04 100644
> --- a/drivers/net/qede/qede_logs.h
> +++ b/drivers/net/qede/qede_logs.h
> @@ -16,15 +16,18 @@
>  		(p_dev)->name ? (p_dev)->name : "", \
>  		##__VA_ARGS__)
>  
> +#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO

Is "_INFO" carries any meaning in this config option, why not just
RTE_LIBRTE_QEDE_DEBUG?

>  #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
>  	rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
>  		"[QEDE PMD: (%s)]%s:" fmt, \
>  		(p_dev)->name ? (p_dev)->name : "", \
>  		 __func__, \
>  		##__VA_ARGS__)
> +#else
> +#define DP_NOTICE(p_dev, fmt, ...) do { } while (0)
> +#endif
>  
>  #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
> -
>  #define DP_INFO(p_dev, fmt, ...) \
>  	rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
>  		"[%s:%d(%s)]" fmt, \
> @@ -33,10 +36,8 @@
>  		##__VA_ARGS__)
>  #else
>  #define DP_INFO(p_dev, fmt, ...) do { } while (0)
> -
>  #endif
>  
> -#ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER

Are you sure you want to enable DP_VERBOSE, I guess most verbose log
macro, by default? Perhaps may want to control it via
RTE_LIBRTE_QEDE_DEBUG_INFO?

>  #define DP_VERBOSE(p_dev, module, fmt, ...) \
>  do { \
>  	if ((p_dev)->dp_module & module) \
> @@ -46,9 +47,7 @@
>  		      (p_dev)->name ? (p_dev)->name : "", \
>  		      ##__VA_ARGS__); \
>  } while (0)
> -#else
> -#define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
> -#endif
> +
>  
<...>

^ permalink raw reply

* Re: [PATCH v2 3/4] app: give python apps a consistent shebang line
From: Thomas Monjalon @ 2016-12-08 16:20 UTC (permalink / raw)
  To: John McNamara; +Cc: dev, mkletzan
In-Reply-To: <1481213032-14935-3-git-send-email-john.mcnamara@intel.com>

2016-12-08 16:03, John McNamara:
> Add a consistent "env python" shebang line to the DPDK Python
> apps so that they can call the default system python.

The shebang is only useful for executable scripts.
Those included by other python scripts should not have this line.
Please could you remove the shebang for conf.py and data files?

^ permalink raw reply

* Re: [PATCH] net: introduce big and little endian types
From: Thomas Monjalon @ 2016-12-08 16:06 UTC (permalink / raw)
  To: Wiles, Keith
  Cc: dev, Nélio Laranjeiro, Ananyev, Konstantin,
	Richardson, Bruce, Morten Brørup, Neil Horman, Lu, Wenzhuo,
	Olivier Matz
In-Reply-To: <2772CCE2-A35D-449E-922F-6EEC1F03342C@intel.com>

2016-12-08 13:59, Wiles, Keith:
> 
> > On Dec 8, 2016, at 3:30 AM, Nélio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> > 
> > Hi all,
> > 
> > Following previous discussions, I would like to gather requirements for
> > v2, currently we have:
> > 
> > 1. Introduction of new typedefs.
> > 2. Modification of network headers.
> > 3. Modification of rte_*_to_*() functions.
> > 
> > Point 1. seems not to be an issue, everyone seems to agree on the fact
> > having those types could help to document some parts of the code.
> 
> I never stated these new types were useful in any way, I still believe documentation of the code is the better solution then forcing yet another restriction in submitting patches. 

It would not be a restriction, just a help for those wanting to document
some tricky parts by using these types.

I see 2 usages:

- in a struct:

rte_be32_t speed; /**< 0 for speed negotiation */
instead of
uint32_t speed; /**< [big endian] 0 for speed negotiation */

- in a function:

rte_be32_t decode_speed (void *);
[...]
speed = rte_be_to_cpu_32(decode_speed());

It is difficult to reject something which could help a bit.
Do you really think it would bring some confusion to have some code
using these endianed-types?

^ permalink raw reply

* [PATCH v2 4/4] doc: add required python versions to coding guidelines
From: John McNamara @ 2016-12-08 16:03 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Add a requirement to support both Python 2 and 3 to the
DPDK Python Coding Standards.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/contributing/coding_style.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 1eb67f3..4163960 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -690,6 +690,7 @@ Control Statements
 Python Code
 -----------
 
-All python code should be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
+All Python code should work with Python 2.7+ and 3.2+ and be compliant with
+`PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
 
 The ``pep8`` tool can be used for testing compliance with the guidelines.
-- 
2.7.4

^ permalink raw reply related

* [PATCH v2 3/4] app: give python apps a consistent shebang line
From: John McNamara @ 2016-12-08 16:03 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Add a consistent "env python" shebang line to the DPDK Python
apps so that they can call the default system python.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/test/autotest_test_funcs.py | 2 +-
 doc/guides/conf.py              | 2 ++
 tools/dpdk-devbind.py           | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index c482ea8..1fa8cf0 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 34c62de..97c5d0e 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #   BSD LICENSE
 #   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
 #   All rights reserved.
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index 4f51a4b..a5b2af5 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -1,4 +1,5 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+
 #
 #   BSD LICENSE
 #
-- 
2.7.4

^ permalink raw reply related

* [PATCH v2 2/4] app: make python apps python2/3 compliant
From: John McNamara @ 2016-12-08 16:03 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Make all the DPDK Python apps work with Python 2 or 3 to
allow them to work with whatever is the system default.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/cmdline_test/cmdline_test.py      | 26 ++++++++++++------------
 app/cmdline_test/cmdline_test_data.py |  2 +-
 app/test/autotest.py                  | 10 ++++-----
 app/test/autotest_runner.py           | 37 +++++++++++++++++-----------------
 tools/cpu_layout.py                   | 38 ++++++++++++++++++-----------------
 tools/dpdk-pmdinfo.py                 | 12 ++++++-----
 6 files changed, 64 insertions(+), 61 deletions(-)

diff --git a/app/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py
index 4729987..229f71f 100755
--- a/app/cmdline_test/cmdline_test.py
+++ b/app/cmdline_test/cmdline_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -32,7 +32,7 @@
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Script that runs cmdline_test app and feeds keystrokes into it.
-
+from __future__ import print_function
 import cmdline_test_data
 import os
 import pexpect
@@ -81,38 +81,38 @@ def runHistoryTest(child):
 
 # the path to cmdline_test executable is supplied via command-line.
 if len(sys.argv) < 2:
-    print "Error: please supply cmdline_test app path"
+    print("Error: please supply cmdline_test app path")
     sys.exit(1)
 
 test_app_path = sys.argv[1]
 
 if not os.path.exists(test_app_path):
-    print "Error: please supply cmdline_test app path"
+    print("Error: please supply cmdline_test app path")
     sys.exit(1)
 
 child = pexpect.spawn(test_app_path)
 
-print "Running command-line tests..."
+print("Running command-line tests...")
 for test in cmdline_test_data.tests:
-    print (test["Name"] + ":").ljust(30),
+    testname = (test["Name"] + ":").ljust(30)
     try:
         runTest(child, test)
-        print "PASS"
+        print(testname, "PASS")
     except:
-        print "FAIL"
-        print child
+        print(testname, "FAIL")
+        print(child)
         sys.exit(1)
 
 # since last test quits the app, run new instance
 child = pexpect.spawn(test_app_path)
 
-print ("History fill test:").ljust(30),
+testname = ("History fill test:").ljust(30)
 try:
     runHistoryTest(child)
-    print "PASS"
+    print(testname, "PASS")
 except:
-    print "FAIL"
-    print child
+    print(testname, "FAIL")
+    print(child)
     sys.exit(1)
 child.close()
 sys.exit(0)
diff --git a/app/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py
index 3ce6cbc..9cc966b 100644
--- a/app/cmdline_test/cmdline_test_data.py
+++ b/app/cmdline_test/cmdline_test_data.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
diff --git a/app/test/autotest.py b/app/test/autotest.py
index 3a00538..5c19a02 100644
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -32,15 +32,15 @@
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Script that uses either test app or qemu controlled by python-pexpect
-
+from __future__ import print_function
 import autotest_data
 import autotest_runner
 import sys
 
 
 def usage():
-    print"Usage: autotest.py [test app|test iso image]",
-    print "[target] [whitelist|-blacklist]"
+    print("Usage: autotest.py [test app|test iso image] ",
+          "[target] [whitelist|-blacklist]")
 
 if len(sys.argv) < 3:
     usage()
@@ -63,7 +63,7 @@ def usage():
 
 cmdline = "%s -c f -n 4" % (sys.argv[1])
 
-print cmdline
+print(cmdline)
 
 runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
                                         test_whitelist)
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index 55b63a8..7aeb0bd 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -271,15 +271,16 @@ def __process_results(self, results):
             total_time = int(cur_time - self.start)
 
             # print results, test run time and total time since start
-            print ("%s:" % test_name).ljust(30),
-            print result_str.ljust(29),
-            print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
+            result = ("%s:" % test_name).ljust(30)
+            result += result_str.ljust(29)
+            result += "[%02dm %02ds]" % (test_time / 60, test_time % 60)
 
             # don't print out total time every line, it's the same anyway
             if i == len(results) - 1:
-                print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
+                print(result,
+                      "[%02dm %02ds]" % (total_time / 60, total_time % 60))
             else:
-                print ""
+                print(result)
 
             # if test failed and it wasn't a "start" test
             if test_result < 0 and not i == 0:
@@ -294,7 +295,7 @@ def __process_results(self, results):
                     f = open("%s_%s_report.rst" %
                              (self.target, test_name), "w")
                 except IOError:
-                    print "Report for %s could not be created!" % test_name
+                    print("Report for %s could not be created!" % test_name)
                 else:
                     with f:
                         f.write(report)
@@ -360,12 +361,10 @@ def run_all_tests(self):
         try:
 
             # create table header
-            print ""
-            print "Test name".ljust(30),
-            print "Test result".ljust(29),
-            print "Test".center(9),
-            print "Total".center(9)
-            print "=" * 80
+            print("")
+            print("Test name".ljust(30), "Test result".ljust(29),
+                  "Test".center(9), "Total".center(9))
+            print("=" * 80)
 
             # make a note of tests start time
             self.start = time.time()
@@ -407,11 +406,11 @@ def run_all_tests(self):
             total_time = int(cur_time - self.start)
 
             # print out summary
-            print "=" * 80
-            print "Total run time: %02dm %02ds" % (total_time / 60,
-                                                   total_time % 60)
+            print("=" * 80)
+            print("Total run time: %02dm %02ds" % (total_time / 60,
+                                                   total_time % 60))
             if self.fails != 0:
-                print "Number of failed tests: %s" % str(self.fails)
+                print("Number of failed tests: %s" % str(self.fails))
 
             # write summary to logfile
             self.logfile.write("Summary\n")
@@ -420,8 +419,8 @@ def run_all_tests(self):
             self.logfile.write("Failed tests: ".ljust(
                 15) + "%i\n" % self.fails)
         except:
-            print "Exception occurred"
-            print sys.exc_info()
+            print("Exception occurred")
+            print(sys.exc_info())
             self.fails = 1
 
         # drop logs from all executions to a logfile
diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py
index ccc22ec..0e049a6 100755
--- a/tools/cpu_layout.py
+++ b/tools/cpu_layout.py
@@ -1,4 +1,5 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+
 #
 #   BSD LICENSE
 #
@@ -31,7 +32,7 @@
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-
+from __future__ import print_function
 import sys
 
 sockets = []
@@ -55,7 +56,7 @@
 for core in core_details:
     for field in ["processor", "core id", "physical id"]:
         if field not in core:
-            print "Error getting '%s' value from /proc/cpuinfo" % field
+            print("Error getting '%s' value from /proc/cpuinfo" % field)
             sys.exit(1)
         core[field] = int(core[field])
 
@@ -68,29 +69,30 @@
         core_map[key] = []
     core_map[key].append(core["processor"])
 
-print "============================================================"
-print "Core and Socket Information (as reported by '/proc/cpuinfo')"
-print "============================================================\n"
-print "cores = ", cores
-print "sockets = ", sockets
-print ""
+print("============================================================")
+print("Core and Socket Information (as reported by '/proc/cpuinfo')")
+print("============================================================\n")
+print("cores = ", cores)
+print("sockets = ", sockets)
+print("")
 
 max_processor_len = len(str(len(cores) * len(sockets) * 2 - 1))
 max_core_map_len = max_processor_len * 2 + len('[, ]') + len('Socket ')
 max_core_id_len = len(str(max(cores)))
 
-print " ".ljust(max_core_id_len + len('Core ')),
+output = " ".ljust(max_core_id_len + len('Core '))
 for s in sockets:
-    print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
-print ""
+    output += " Socket %s" % str(s).ljust(max_core_map_len - len('Socket '))
+print(output)
 
-print " ".ljust(max_core_id_len + len('Core ')),
+output = " ".ljust(max_core_id_len + len('Core '))
 for s in sockets:
-    print "--------".ljust(max_core_map_len),
-print ""
+    output += " --------".ljust(max_core_map_len)
+    output += " "
+print(output)
 
 for c in cores:
-    print "Core %s" % str(c).ljust(max_core_id_len),
+    output = "Core %s" % str(c).ljust(max_core_id_len)
     for s in sockets:
-        print str(core_map[(s, c)]).ljust(max_core_map_len),
-    print ""
+        output += " " + str(core_map[(s, c)]).ljust(max_core_map_len)
+    print(output)
diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py
index 3d3ad7d..097982e 100755
--- a/tools/dpdk-pmdinfo.py
+++ b/tools/dpdk-pmdinfo.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
+
 # -------------------------------------------------------------------------
 #
 # Utility to dump PMD_INFO_STRING support from an object file
 #
 # -------------------------------------------------------------------------
+from __future__ import print_function
 import json
 import os
 import platform
@@ -54,7 +56,7 @@ def addDevice(self, deviceStr):
             self.devices[devID] = Device(deviceStr)
 
     def report(self):
-        print self.ID, self.name
+        print(self.ID, self.name)
         for id, dev in self.devices.items():
             dev.report()
 
@@ -80,7 +82,7 @@ def __init__(self, deviceStr):
         self.subdevices = {}
 
     def report(self):
-        print "\t%s\t%s" % (self.ID, self.name)
+        print("\t%s\t%s" % (self.ID, self.name))
         for subID, subdev in self.subdevices.items():
             subdev.report()
 
@@ -126,7 +128,7 @@ def __init__(self, vendor, device, name):
         self.name = name
 
     def report(self):
-        print "\t\t%s\t%s\t%s" % (self.vendorID, self.deviceID, self.name)
+        print("\t\t%s\t%s\t%s" % (self.vendorID, self.deviceID, self.name))
 
 
 class PCIIds:
@@ -154,7 +156,7 @@ def reportVendors(self):
         """Reports the vendors
         """
         for vid, v in self.vendors.items():
-            print v.ID, v.name
+            print(v.ID, v.name)
 
     def report(self, vendor=None):
         """
@@ -185,7 +187,7 @@ def findDate(self, content):
 
     def parse(self):
         if len(self.contents) < 1:
-            print "data/%s-pci.ids not found" % self.date
+            print("data/%s-pci.ids not found" % self.date)
         else:
             vendorID = ""
             deviceID = ""
-- 
2.7.4

^ permalink raw reply related

* [PATCH v2 1/4] app: make python apps pep8 compliant
From: John McNamara @ 2016-12-08 16:03 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Make all DPDK python application compliant with the PEP8 standard
to allow for consistency checking of patches and to allow further
refactoring.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---

V2: Fixed file/patch order from sloppy rebase.

 app/cmdline_test/cmdline_test.py                   |  81 +-
 app/cmdline_test/cmdline_test_data.py              | 401 +++++-----
 app/test/autotest.py                               |  40 +-
 app/test/autotest_data.py                          | 831 +++++++++++----------
 app/test/autotest_runner.py                        | 739 +++++++++---------
 app/test/autotest_test_funcs.py                    | 479 ++++++------
 doc/guides/conf.py                                 |   9 +-
 examples/ip_pipeline/config/diagram-generator.py   |  13 +-
 .../ip_pipeline/config/pipeline-to-core-mapping.py |  11 +-
 tools/cpu_layout.py                                |  55 +-
 tools/dpdk-devbind.py                              |  23 +-
 tools/dpdk-pmdinfo.py                              |  61 +-
 12 files changed, 1376 insertions(+), 1367 deletions(-)

diff --git a/app/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py
index 8efc5ea..4729987 100755
--- a/app/cmdline_test/cmdline_test.py
+++ b/app/cmdline_test/cmdline_test.py
@@ -33,16 +33,21 @@
 
 # Script that runs cmdline_test app and feeds keystrokes into it.
 
-import sys, pexpect, string, os, cmdline_test_data
+import cmdline_test_data
+import os
+import pexpect
+import sys
+
 
 #
 # function to run test
 #
-def runTest(child,test):
-	child.send(test["Sequence"])
-	if test["Result"] == None:
-		return 0
-	child.expect(test["Result"],1)
+def runTest(child, test):
+    child.send(test["Sequence"])
+    if test["Result"] is None:
+        return 0
+    child.expect(test["Result"], 1)
+
 
 #
 # history test is a special case
@@ -57,57 +62,57 @@ def runTest(child,test):
 # This is a self-contained test, it needs only a pexpect child
 #
 def runHistoryTest(child):
-	# find out history size
-	child.sendline(cmdline_test_data.CMD_GET_BUFSIZE)
-	child.expect("History buffer size: \\d+", timeout=1)
-	history_size = int(child.after[len(cmdline_test_data.BUFSIZE_TEMPLATE):])
-	i = 0
+    # find out history size
+    child.sendline(cmdline_test_data.CMD_GET_BUFSIZE)
+    child.expect("History buffer size: \\d+", timeout=1)
+    history_size = int(child.after[len(cmdline_test_data.BUFSIZE_TEMPLATE):])
+    i = 0
 
-	# fill the history with numbers
-	while i < history_size / 10:
-		# add 1 to prevent from parsing as octals
-		child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER)
-		# the app will simply print out the number
-		child.expect(str(i + 100000000), timeout=1)
-		i += 1
-	# scroll back history
-	child.send(cmdline_test_data.UP * (i + 2) + cmdline_test_data.ENTER)
-	child.expect("100000000", timeout=1)
+    # fill the history with numbers
+    while i < history_size / 10:
+        # add 1 to prevent from parsing as octals
+        child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER)
+        # the app will simply print out the number
+        child.expect(str(i + 100000000), timeout=1)
+        i += 1
+    # scroll back history
+    child.send(cmdline_test_data.UP * (i + 2) + cmdline_test_data.ENTER)
+    child.expect("100000000", timeout=1)
 
 # the path to cmdline_test executable is supplied via command-line.
 if len(sys.argv) < 2:
-	print "Error: please supply cmdline_test app path"
-	sys.exit(1)
+    print "Error: please supply cmdline_test app path"
+    sys.exit(1)
 
 test_app_path = sys.argv[1]
 
 if not os.path.exists(test_app_path):
-	print "Error: please supply cmdline_test app path"
-	sys.exit(1)
+    print "Error: please supply cmdline_test app path"
+    sys.exit(1)
 
 child = pexpect.spawn(test_app_path)
 
 print "Running command-line tests..."
 for test in cmdline_test_data.tests:
-	print (test["Name"] + ":").ljust(30),
-	try:
-		runTest(child,test)
-		print "PASS"
-	except:
-		print "FAIL"
-		print child
-		sys.exit(1)
+    print (test["Name"] + ":").ljust(30),
+    try:
+        runTest(child, test)
+        print "PASS"
+    except:
+        print "FAIL"
+        print child
+        sys.exit(1)
 
 # since last test quits the app, run new instance
 child = pexpect.spawn(test_app_path)
 
 print ("History fill test:").ljust(30),
 try:
-	runHistoryTest(child)
-	print "PASS"
+    runHistoryTest(child)
+    print "PASS"
 except:
-	print "FAIL"
-	print child
-	sys.exit(1)
+    print "FAIL"
+    print child
+    sys.exit(1)
 child.close()
 sys.exit(0)
diff --git a/app/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py
index b1945a5..3ce6cbc 100644
--- a/app/cmdline_test/cmdline_test_data.py
+++ b/app/cmdline_test/cmdline_test_data.py
@@ -33,8 +33,6 @@
 
 # collection of static data
 
-import sys
-
 # keycode constants
 CTRL_A = chr(1)
 CTRL_B = chr(2)
@@ -95,217 +93,220 @@
 # and expected output (if any).
 
 tests = [
-# test basic commands
-	{"Name" : "command test 1",
-	 "Sequence" : "ambiguous first" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "command test 2",
-	 "Sequence" : "ambiguous second" + ENTER,
-	 "Result" : CMD2},
-	{"Name" : "command test 3",
-	 "Sequence" : "ambiguous ambiguous" + ENTER,
-	 "Result" : AMBIG},
-	{"Name" : "command test 4",
-	 "Sequence" : "ambiguous ambiguous2" + ENTER,
-	 "Result" : AMBIG},
+    # test basic commands
+    {"Name": "command test 1",
+     "Sequence": "ambiguous first" + ENTER,
+     "Result": CMD1},
+    {"Name": "command test 2",
+     "Sequence": "ambiguous second" + ENTER,
+     "Result": CMD2},
+    {"Name": "command test 3",
+     "Sequence": "ambiguous ambiguous" + ENTER,
+     "Result": AMBIG},
+    {"Name": "command test 4",
+     "Sequence": "ambiguous ambiguous2" + ENTER,
+     "Result": AMBIG},
 
-	{"Name" : "invalid command test 1",
-	 "Sequence" : "ambiguous invalid" + ENTER,
-	 "Result" : BAD_ARG},
-# test invalid commands
-	{"Name" : "invalid command test 2",
-	 "Sequence" : "invalid" + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "invalid command test 3",
-	 "Sequence" : "ambiguousinvalid" + ENTER2,
-	 "Result" : NOT_FOUND},
+    {"Name": "invalid command test 1",
+     "Sequence": "ambiguous invalid" + ENTER,
+     "Result": BAD_ARG},
+    # test invalid commands
+    {"Name": "invalid command test 2",
+     "Sequence": "invalid" + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "invalid command test 3",
+     "Sequence": "ambiguousinvalid" + ENTER2,
+     "Result": NOT_FOUND},
 
-# test arrows and deletes
-	{"Name" : "arrows & delete test 1",
-	 "Sequence" : "singlebad" + LEFT*2 + CTRL_B + DEL*3 + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "arrows & delete test 2",
-	 "Sequence" : "singlebad" + LEFT*5 + RIGHT + CTRL_F + DEL*3 + ENTER,
-	 "Result" : SINGLE},
+    # test arrows and deletes
+    {"Name": "arrows & delete test 1",
+     "Sequence": "singlebad" + LEFT*2 + CTRL_B + DEL*3 + ENTER,
+     "Result": SINGLE},
+    {"Name": "arrows & delete test 2",
+     "Sequence": "singlebad" + LEFT*5 + RIGHT + CTRL_F + DEL*3 + ENTER,
+     "Result": SINGLE},
 
-# test backspace
-	{"Name" : "backspace test",
-	 "Sequence" : "singlebad" + BKSPACE*3 + ENTER,
-	 "Result" : SINGLE},
+    # test backspace
+    {"Name": "backspace test",
+     "Sequence": "singlebad" + BKSPACE*3 + ENTER,
+     "Result": SINGLE},
 
-# test goto left and goto right
-	{"Name" : "goto left test",
-	 "Sequence" : "biguous first" + CTRL_A + "am" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "goto right test",
-	 "Sequence" : "biguous fir" + CTRL_A + "am" + CTRL_E + "st" + ENTER,
-	 "Result" : CMD1},
+    # test goto left and goto right
+    {"Name": "goto left test",
+     "Sequence": "biguous first" + CTRL_A + "am" + ENTER,
+     "Result": CMD1},
+    {"Name": "goto right test",
+     "Sequence": "biguous fir" + CTRL_A + "am" + CTRL_E + "st" + ENTER,
+     "Result": CMD1},
 
-# test goto words
-	{"Name" : "goto left word test",
-	 "Sequence" : "ambiguous st" + ALT_B + "fir" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "goto right word test",
-	 "Sequence" : "ambig first" + CTRL_A + ALT_F + "uous" + ENTER,
-	 "Result" : CMD1},
+    # test goto words
+    {"Name": "goto left word test",
+     "Sequence": "ambiguous st" + ALT_B + "fir" + ENTER,
+     "Result": CMD1},
+    {"Name": "goto right word test",
+     "Sequence": "ambig first" + CTRL_A + ALT_F + "uous" + ENTER,
+     "Result": CMD1},
 
-# test removing words
-	{"Name" : "remove left word 1",
-	 "Sequence" : "single invalid" + CTRL_W + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "remove left word 2",
-	 "Sequence" : "single invalid" + ALT_BKSPACE + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "remove right word",
-	 "Sequence" : "single invalid" + ALT_B + ALT_D + ENTER,
-	 "Result" : SINGLE},
+    # test removing words
+    {"Name": "remove left word 1",
+     "Sequence": "single invalid" + CTRL_W + ENTER,
+     "Result": SINGLE},
+    {"Name": "remove left word 2",
+     "Sequence": "single invalid" + ALT_BKSPACE + ENTER,
+     "Result": SINGLE},
+    {"Name": "remove right word",
+     "Sequence": "single invalid" + ALT_B + ALT_D + ENTER,
+     "Result": SINGLE},
 
-# test kill buffer (copy and paste)
-	{"Name" : "killbuffer test 1",
-	 "Sequence" : "ambiguous" + CTRL_A + CTRL_K + " first" + CTRL_A + CTRL_Y + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "killbuffer test 2",
-	 "Sequence" : "ambiguous" + CTRL_A + CTRL_K + CTRL_Y*26 + ENTER,
-	 "Result" : NOT_FOUND},
+    # test kill buffer (copy and paste)
+    {"Name": "killbuffer test 1",
+     "Sequence": "ambiguous" + CTRL_A + CTRL_K + " first" + CTRL_A +
+                 CTRL_Y + ENTER,
+     "Result": CMD1},
+    {"Name": "killbuffer test 2",
+     "Sequence": "ambiguous" + CTRL_A + CTRL_K + CTRL_Y*26 + ENTER,
+     "Result": NOT_FOUND},
 
-# test newline
-	{"Name" : "newline test",
-	 "Sequence" : "invalid" + CTRL_C + "single" + ENTER,
-	 "Result" : SINGLE},
+    # test newline
+    {"Name": "newline test",
+     "Sequence": "invalid" + CTRL_C + "single" + ENTER,
+     "Result": SINGLE},
 
-# test redisplay (nothing should really happen)
-	{"Name" : "redisplay test",
-	 "Sequence" : "single" + CTRL_L + ENTER,
-	 "Result" : SINGLE},
+    # test redisplay (nothing should really happen)
+    {"Name": "redisplay test",
+     "Sequence": "single" + CTRL_L + ENTER,
+     "Result": SINGLE},
 
-# test autocomplete
-	{"Name" : "autocomplete test 1",
-	 "Sequence" : "si" + TAB + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "autocomplete test 2",
-	 "Sequence" : "si" + TAB + "_" + TAB + ENTER,
-	 "Result" : SINGLE_LONG},
-	{"Name" : "autocomplete test 3",
-	 "Sequence" : "in" + TAB + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "autocomplete test 4",
-	 "Sequence" : "am" + TAB + ENTER,
-	 "Result" : BAD_ARG},
-	{"Name" : "autocomplete test 5",
-	 "Sequence" : "am" + TAB + "fir" + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 6",
-	 "Sequence" : "am" + TAB + "fir" + TAB + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 7",
-	 "Sequence" : "am" + TAB + "fir" + TAB + " " + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 8",
-	 "Sequence" : "am" + TAB + "     am" + TAB + "   " + ENTER,
-	 "Result" : AMBIG},
-	{"Name" : "autocomplete test 9",
-	 "Sequence" : "am" + TAB + "inv" + TAB + ENTER,
-	 "Result" : BAD_ARG},
-	{"Name" : "autocomplete test 10",
-	 "Sequence" : "au" + TAB + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "autocomplete test 11",
-	 "Sequence" : "au" + TAB + "1" + ENTER,
-	 "Result" : AUTO1},
-	{"Name" : "autocomplete test 12",
-	 "Sequence" : "au" + TAB + "2" + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 13",
-	 "Sequence" : "au" + TAB + "2" + TAB + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 14",
-	 "Sequence" : "au" + TAB + "2   " + TAB + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 15",
-	 "Sequence" : "24" + TAB + ENTER,
-	 "Result" : "24"},
+    # test autocomplete
+    {"Name": "autocomplete test 1",
+     "Sequence": "si" + TAB + ENTER,
+     "Result": SINGLE},
+    {"Name": "autocomplete test 2",
+     "Sequence": "si" + TAB + "_" + TAB + ENTER,
+     "Result": SINGLE_LONG},
+    {"Name": "autocomplete test 3",
+     "Sequence": "in" + TAB + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "autocomplete test 4",
+     "Sequence": "am" + TAB + ENTER,
+     "Result": BAD_ARG},
+    {"Name": "autocomplete test 5",
+     "Sequence": "am" + TAB + "fir" + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 6",
+     "Sequence": "am" + TAB + "fir" + TAB + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 7",
+     "Sequence": "am" + TAB + "fir" + TAB + " " + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 8",
+     "Sequence": "am" + TAB + "     am" + TAB + "   " + ENTER,
+     "Result": AMBIG},
+    {"Name": "autocomplete test 9",
+     "Sequence": "am" + TAB + "inv" + TAB + ENTER,
+     "Result": BAD_ARG},
+    {"Name": "autocomplete test 10",
+     "Sequence": "au" + TAB + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "autocomplete test 11",
+     "Sequence": "au" + TAB + "1" + ENTER,
+     "Result": AUTO1},
+    {"Name": "autocomplete test 12",
+     "Sequence": "au" + TAB + "2" + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 13",
+     "Sequence": "au" + TAB + "2" + TAB + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 14",
+     "Sequence": "au" + TAB + "2   " + TAB + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 15",
+     "Sequence": "24" + TAB + ENTER,
+     "Result": "24"},
 
-# test history
-	{"Name" : "history test 1",
-	 "Sequence" : "invalid" + ENTER + "single" + ENTER + "invalid" + ENTER + UP + CTRL_P + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "history test 2",
-	 "Sequence" : "invalid" + ENTER + "ambiguous first" + ENTER + "invalid" + ENTER + "single" + ENTER + UP * 3 + CTRL_N + DOWN + ENTER,
-	 "Result" : SINGLE},
+    # test history
+    {"Name": "history test 1",
+     "Sequence": "invalid" + ENTER + "single" + ENTER + "invalid" +
+                 ENTER + UP + CTRL_P + ENTER,
+     "Result": SINGLE},
+    {"Name": "history test 2",
+     "Sequence": "invalid" + ENTER + "ambiguous first" + ENTER + "invalid" +
+                 ENTER + "single" + ENTER + UP * 3 + CTRL_N + DOWN + ENTER,
+     "Result": SINGLE},
 
-#
-# tests that improve coverage
-#
+    #
+    # tests that improve coverage
+    #
 
-# empty space tests
-	{"Name" : "empty space test 1",
-	 "Sequence" : RIGHT + LEFT + CTRL_B + CTRL_F + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 2",
-	 "Sequence" : BKSPACE + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 3",
-	 "Sequence" : CTRL_E*2 + CTRL_A*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 4",
-	 "Sequence" : ALT_F*2 + ALT_B*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 5",
-	 "Sequence" : " " + CTRL_E*2 + CTRL_A*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 6",
-	 "Sequence" : " " + CTRL_A + ALT_F*2 + ALT_B*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 7",
-	 "Sequence" : "  " + CTRL_A + CTRL_D + CTRL_E + CTRL_D + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 8",
-	 "Sequence" : " space" + CTRL_W*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 9",
-	 "Sequence" : " space" + ALT_BKSPACE*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 10",
-	 "Sequence" : " space " + CTRL_A + ALT_D*3 + ENTER,
-	 "Result" : PROMPT},
+    # empty space tests
+    {"Name": "empty space test 1",
+     "Sequence": RIGHT + LEFT + CTRL_B + CTRL_F + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 2",
+     "Sequence": BKSPACE + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 3",
+     "Sequence": CTRL_E*2 + CTRL_A*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 4",
+     "Sequence": ALT_F*2 + ALT_B*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 5",
+     "Sequence": " " + CTRL_E*2 + CTRL_A*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 6",
+     "Sequence": " " + CTRL_A + ALT_F*2 + ALT_B*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 7",
+     "Sequence": "  " + CTRL_A + CTRL_D + CTRL_E + CTRL_D + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 8",
+     "Sequence": " space" + CTRL_W*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 9",
+     "Sequence": " space" + ALT_BKSPACE*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 10",
+     "Sequence": " space " + CTRL_A + ALT_D*3 + ENTER,
+     "Result": PROMPT},
 
-# non-printable char tests
-	{"Name" : "non-printable test 1",
-	 "Sequence" : chr(27) + chr(47) + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "non-printable test 2",
-	 "Sequence" : chr(27) + chr(128) + ENTER*7,
-	 "Result" : PROMPT},
-	{"Name" : "non-printable test 3",
-	 "Sequence" : chr(27) + chr(91) + chr(127) + ENTER*6,
-	 "Result" : PROMPT},
+    # non-printable char tests
+    {"Name": "non-printable test 1",
+     "Sequence": chr(27) + chr(47) + ENTER,
+     "Result": PROMPT},
+    {"Name": "non-printable test 2",
+     "Sequence": chr(27) + chr(128) + ENTER*7,
+     "Result": PROMPT},
+    {"Name": "non-printable test 3",
+     "Sequence": chr(27) + chr(91) + chr(127) + ENTER*6,
+     "Result": PROMPT},
 
-# miscellaneous tests
-	{"Name" : "misc test 1",
-	 "Sequence" : ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 2",
-	 "Sequence" : "single #comment" + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 3",
-	 "Sequence" : "#empty line" + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 4",
-	 "Sequence" : "   single  " + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 5",
-	 "Sequence" : "single#" + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 6",
-	 "Sequence" : 'a' * 257 + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "misc test 7",
-	 "Sequence" : "clear_history" + UP*5 + DOWN*5 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 8",
-	 "Sequence" : "a" + HELP + CTRL_C,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 9",
-	 "Sequence" : CTRL_D*3,
-	 "Result" : None},
+    # miscellaneous tests
+    {"Name": "misc test 1",
+     "Sequence": ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 2",
+     "Sequence": "single #comment" + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 3",
+     "Sequence": "#empty line" + ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 4",
+     "Sequence": "   single  " + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 5",
+     "Sequence": "single#" + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 6",
+     "Sequence": 'a' * 257 + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "misc test 7",
+     "Sequence": "clear_history" + UP*5 + DOWN*5 + ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 8",
+     "Sequence": "a" + HELP + CTRL_C,
+     "Result": PROMPT},
+    {"Name": "misc test 9",
+     "Sequence": CTRL_D*3,
+     "Result": None},
 ]
diff --git a/app/test/autotest.py b/app/test/autotest.py
index b9fd6b6..3a00538 100644
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -33,44 +33,46 @@
 
 # Script that uses either test app or qemu controlled by python-pexpect
 
-import sys, autotest_data, autotest_runner
-
+import autotest_data
+import autotest_runner
+import sys
 
 
 def usage():
-	print"Usage: autotest.py [test app|test iso image]",
-	print "[target] [whitelist|-blacklist]"
+    print"Usage: autotest.py [test app|test iso image]",
+    print "[target] [whitelist|-blacklist]"
 
 if len(sys.argv) < 3:
-	usage()
-	sys.exit(1)
+    usage()
+    sys.exit(1)
 
 target = sys.argv[2]
 
-test_whitelist=None
-test_blacklist=None
+test_whitelist = None
+test_blacklist = None
 
 # get blacklist/whitelist
 if len(sys.argv) > 3:
-	testlist = sys.argv[3].split(',')
-	testlist = [test.lower() for test in testlist]
-	if testlist[0].startswith('-'):
-		testlist[0] = testlist[0].lstrip('-')
-		test_blacklist = testlist
-	else:
-		test_whitelist = testlist
+    testlist = sys.argv[3].split(',')
+    testlist = [test.lower() for test in testlist]
+    if testlist[0].startswith('-'):
+        testlist[0] = testlist[0].lstrip('-')
+        test_blacklist = testlist
+    else:
+        test_whitelist = testlist
 
-cmdline  = "%s -c f -n 4"%(sys.argv[1])
+cmdline = "%s -c f -n 4" % (sys.argv[1])
 
 print cmdline
 
-runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist, test_whitelist)
+runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
+                                        test_whitelist)
 
 for test_group in autotest_data.parallel_test_group_list:
-	runner.add_parallel_test_group(test_group)
+    runner.add_parallel_test_group(test_group)
 
 for test_group in autotest_data.non_parallel_test_group_list:
-	runner.add_non_parallel_test_group(test_group)
+    runner.add_non_parallel_test_group(test_group)
 
 num_fails = runner.run_all_tests()
 
diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 9e8fd94..0cf4cfd 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -36,12 +36,14 @@
 from glob import glob
 from autotest_test_funcs import *
 
+
 # quick and dirty function to find out number of sockets
 def num_sockets():
-	result = len(glob("/sys/devices/system/node/node*"))
-	if result == 0:
-		return 1
-	return result
+    result = len(glob("/sys/devices/system/node/node*"))
+    if result == 0:
+        return 1
+    return result
+
 
 # Assign given number to each socket
 # e.g. 32 becomes 32,32 or 32,32,32,32
@@ -51,420 +53,419 @@ def per_sockets(num):
 # groups of tests that can be run in parallel
 # the grouping has been found largely empirically
 parallel_test_group_list = [
-
-{
-	"Prefix":	"group_1",
-	"Memory" :	per_sockets(8),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Cycles autotest",
-		 "Command" : 	"cycles_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Timer autotest",
-		 "Command" : 	"timer_autotest",
-		 "Func" :	timer_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Debug autotest",
-		 "Command" : 	"debug_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Errno autotest",
-		 "Command" : 	"errno_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Meter autotest",
-		 "Command" : 	"meter_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Common autotest",
-		 "Command" : 	"common_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Resource autotest",
-		 "Command" :	"resource_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_2",
-	"Memory" :	"16",
-	"Tests" :
-	[
-		{
-		 "Name" :	"Memory autotest",
-		 "Command" :	"memory_autotest",
-		 "Func" :	memory_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Read/write lock autotest",
-		 "Command" : 	"rwlock_autotest",
-		 "Func" :	rwlock_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Logs autotest",
-		 "Command" : 	"logs_autotest",
-		 "Func" :	logs_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"CPU flags autotest",
-		 "Command" : 	"cpuflags_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Version autotest",
-		 "Command" : 	"version_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"EAL filesystem autotest",
-		 "Command" : 	"eal_fs_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"EAL flags autotest",
-		 "Command" : 	"eal_flags_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Hash autotest",
-		 "Command" : 	"hash_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	],
-},
-{
-	"Prefix":	"group_3",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"LPM autotest",
-		 "Command" : 	"lpm_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-			"Name" :    "LPM6 autotest",
-			"Command" : "lpm6_autotest",
-			"Func" :    default_autotest,
-			"Report" :  None,
-		},
-		{
-		 "Name" :	"Memcpy autotest",
-		 "Command" : 	"memcpy_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Memzone autotest",
-		 "Command" : 	"memzone_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"String autotest",
-		 "Command" : 	"string_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Alarm autotest",
-		 "Command" :	"alarm_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_4",
-	"Memory" :	per_sockets(128),
-	"Tests" :
-	[
-		{
-		 "Name" :	"PCI autotest",
-		 "Command" :	"pci_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Malloc autotest",
-		 "Command" : 	"malloc_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Multi-process autotest",
-		 "Command" : 	"multiprocess_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Mbuf autotest",
-		 "Command" : 	"mbuf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Per-lcore autotest",
-		 "Command" : 	"per_lcore_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Ring autotest",
-		 "Command" : 	"ring_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_5",
-	"Memory" :	"32",
-	"Tests" :
-	[
-		{
-		 "Name" :	"Spinlock autotest",
-		 "Command" : 	"spinlock_autotest",
-		 "Func" :	spinlock_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Byte order autotest",
-		 "Command" : 	"byteorder_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"TAILQ autotest",
-		 "Command" : 	"tailq_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Command-line autotest",
-		 "Command" : 	"cmdline_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Interrupts autotest",
-		 "Command" : 	"interrupt_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_6",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Function reentrancy autotest",
-		 "Command" : 	"func_reentrancy_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Mempool autotest",
-		 "Command" : 	"mempool_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Atomics autotest",
-		 "Command" : 	"atomic_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Prefetch autotest",
-		 "Command" : 	"prefetch_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		 },
-		{
-		 "Name" :"Red autotest",
-		 "Command" : "red_autotest",
-		 "Func" :default_autotest,
-		 "Report" :None,
-		 },
-	]
-},
-{
-	"Prefix" :	"group_7",
-	"Memory" :	"64",
-	"Tests" :
-	[
-		{
-		 "Name" :	"PMD ring autotest",
-		 "Command" :	"ring_pmd_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Access list control autotest",
-		 "Command" : 	"acl_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		 {
-		 "Name" :"Sched autotest",
-		 "Command" : "sched_autotest",
-		 "Func" :default_autotest,
-		 "Report" :None,
-		 },
-	]
-},
+    {
+        "Prefix":    "group_1",
+        "Memory":    per_sockets(8),
+        "Tests":
+        [
+            {
+                "Name":    "Cycles autotest",
+                "Command": "cycles_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Timer autotest",
+                "Command": "timer_autotest",
+                "Func":    timer_autotest,
+                "Report":   None,
+            },
+            {
+                "Name":    "Debug autotest",
+                "Command": "debug_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Errno autotest",
+                "Command": "errno_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Meter autotest",
+                "Command": "meter_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Common autotest",
+                "Command": "common_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Resource autotest",
+                "Command": "resource_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_2",
+        "Memory":    "16",
+        "Tests":
+        [
+            {
+                "Name":    "Memory autotest",
+                "Command": "memory_autotest",
+                "Func":    memory_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Read/write lock autotest",
+                "Command": "rwlock_autotest",
+                "Func":    rwlock_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Logs autotest",
+                "Command": "logs_autotest",
+                "Func":    logs_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "CPU flags autotest",
+                "Command": "cpuflags_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Version autotest",
+                "Command": "version_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "EAL filesystem autotest",
+                "Command": "eal_fs_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "EAL flags autotest",
+                "Command": "eal_flags_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Hash autotest",
+                "Command": "hash_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ],
+    },
+    {
+        "Prefix":    "group_3",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "LPM autotest",
+                "Command": "lpm_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "LPM6 autotest",
+                "Command": "lpm6_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Memcpy autotest",
+                "Command": "memcpy_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Memzone autotest",
+                "Command": "memzone_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "String autotest",
+                "Command": "string_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Alarm autotest",
+                "Command": "alarm_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_4",
+        "Memory":    per_sockets(128),
+        "Tests":
+        [
+            {
+                "Name":    "PCI autotest",
+                "Command": "pci_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Malloc autotest",
+                "Command": "malloc_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Multi-process autotest",
+                "Command": "multiprocess_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Mbuf autotest",
+                "Command": "mbuf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Per-lcore autotest",
+                "Command": "per_lcore_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Ring autotest",
+                "Command": "ring_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_5",
+        "Memory":    "32",
+        "Tests":
+        [
+            {
+                "Name":    "Spinlock autotest",
+                "Command": "spinlock_autotest",
+                "Func":    spinlock_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Byte order autotest",
+                "Command": "byteorder_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "TAILQ autotest",
+                "Command": "tailq_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Command-line autotest",
+                "Command": "cmdline_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Interrupts autotest",
+                "Command": "interrupt_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_6",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Function reentrancy autotest",
+                "Command": "func_reentrancy_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Mempool autotest",
+                "Command": "mempool_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Atomics autotest",
+                "Command": "atomic_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Prefetch autotest",
+                "Command": "prefetch_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Red autotest",
+                "Command": "red_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_7",
+        "Memory":    "64",
+        "Tests":
+        [
+            {
+                "Name":    "PMD ring autotest",
+                "Command": "ring_pmd_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Access list control autotest",
+                "Command": "acl_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Sched autotest",
+                "Command": "sched_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
 ]
 
 # tests that should not be run when any other tests are running
 non_parallel_test_group_list = [
 
-{
-	"Prefix" :	"kni",
-	"Memory" :	"512",
-	"Tests" :
-	[
-		{
-		 "Name" :	"KNI autotest",
-		 "Command" :	"kni_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"mempool_perf",
-	"Memory" :	per_sockets(256),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Mempool performance autotest",
-		 "Command" : 	"mempool_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"memcpy_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Memcpy performance autotest",
-		 "Command" : 	"memcpy_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"hash_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Hash performance autotest",
-		 "Command" : 	"hash_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix" :      "power",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power autotest",
-		 "Command" :    "power_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix" :      "power_acpi_cpufreq",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power ACPI cpufreq autotest",
-		 "Command" :    "power_acpi_cpufreq_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix" :      "power_kvm_vm",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power KVM VM  autotest",
-		 "Command" :    "power_kvm_vm_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix":	"timer_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Timer performance autotest",
-		 "Command" : 	"timer_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
+    {
+        "Prefix":    "kni",
+        "Memory":    "512",
+        "Tests":
+        [
+            {
+                "Name":    "KNI autotest",
+                "Command": "kni_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "mempool_perf",
+        "Memory":    per_sockets(256),
+        "Tests":
+        [
+            {
+                "Name":    "Mempool performance autotest",
+                "Command": "mempool_perf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "memcpy_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Memcpy performance autotest",
+                "Command": "memcpy_perf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "hash_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Hash performance autotest",
+                "Command": "hash_perf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power autotest",
+                "Command":    "power_autotest",
+                "Func":       default_autotest,
+                "Report":      None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power_acpi_cpufreq",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power ACPI cpufreq autotest",
+                "Command":    "power_acpi_cpufreq_autotest",
+                "Func":       default_autotest,
+                "Report":     None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power_kvm_vm",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power KVM VM  autotest",
+                "Command":    "power_kvm_vm_autotest",
+                "Func":       default_autotest,
+                "Report":     None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "timer_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Timer performance autotest",
+                "Command": "timer_perf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
 
-#
-# Please always make sure that ring_perf is the last test!
-#
-{
-	"Prefix":	"ring_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Ring performance autotest",
-		 "Command" : 	"ring_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
+    #
+    # Please always make sure that ring_perf is the last test!
+    #
+    {
+        "Prefix":    "ring_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Ring performance autotest",
+                "Command": "ring_perf_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+        ]
+    },
 ]
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index 21d3be2..55b63a8 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -33,20 +33,29 @@
 
 # The main logic behind running autotests in parallel
 
-import multiprocessing, subprocess, sys, pexpect, re, time, os, StringIO, csv
+import StringIO
+import csv
+import multiprocessing
+import pexpect
+import re
+import subprocess
+import sys
+import time
 
 # wait for prompt
+
+
 def wait_prompt(child):
-	try:
-		child.sendline()
-		result = child.expect(["RTE>>", pexpect.TIMEOUT, pexpect.EOF],
-			timeout = 120)
-	except:
-		return False
-	if result == 0:
-		return True
-	else:
-		return False
+    try:
+        child.sendline()
+        result = child.expect(["RTE>>", pexpect.TIMEOUT, pexpect.EOF],
+                              timeout=120)
+    except:
+        return False
+    if result == 0:
+        return True
+    else:
+        return False
 
 # run a test group
 # each result tuple in results list consists of:
@@ -60,363 +69,363 @@ def wait_prompt(child):
 # this function needs to be outside AutotestRunner class
 # because otherwise Pool won't work (or rather it will require
 # quite a bit of effort to make it work).
-def run_test_group(cmdline, test_group):
-	results = []
-	child = None
-	start_time = time.time()
-	startuplog = None
-
-	# run test app
-	try:
-		# prepare logging of init
-		startuplog = StringIO.StringIO()
-
-		print >>startuplog, "\n%s %s\n" % ("="*20, test_group["Prefix"])
-		print >>startuplog, "\ncmdline=%s" % cmdline
-
-		child = pexpect.spawn(cmdline, logfile=startuplog)
-
-		# wait for target to boot
-		if not wait_prompt(child):
-			child.close()
-
-			results.append((-1, "Fail [No prompt]", "Start %s" % test_group["Prefix"],
-				time.time() - start_time, startuplog.getvalue(), None))
-
-			# mark all tests as failed
-			for test in test_group["Tests"]:
-				results.append((-1, "Fail [No prompt]", test["Name"],
-				time.time() - start_time, "", None))
-			# exit test
-			return results
-
-	except:
-		results.append((-1, "Fail [Can't run]", "Start %s" % test_group["Prefix"],
-				time.time() - start_time, startuplog.getvalue(), None))
-
-		# mark all tests as failed
-		for t in test_group["Tests"]:
-			results.append((-1, "Fail [Can't run]", t["Name"],
-				time.time() - start_time, "", None))
-		# exit test
-		return results
-
-	# startup was successful
-	results.append((0, "Success", "Start %s" % test_group["Prefix"],
-		time.time() - start_time, startuplog.getvalue(), None))
-
-	# parse the binary for available test commands
-	binary = cmdline.split()[0]
-	stripped = 'not stripped' not in subprocess.check_output(['file', binary])
-	if not stripped:
-		symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
-		avail_cmds = re.findall('test_register_(\w+)', symbols)
-
-	# run all tests in test group
-	for test in test_group["Tests"]:
-
-		# create log buffer for each test
-		# in multiprocessing environment, the logging would be
-		# interleaved and will create a mess, hence the buffering
-		logfile = StringIO.StringIO()
-		child.logfile = logfile
-
-		result = ()
-
-		# make a note when the test started
-		start_time = time.time()
-
-		try:
-			# print test name to log buffer
-			print >>logfile, "\n%s %s\n" % ("-"*20, test["Name"])
-
-			# run test function associated with the test
-			if stripped or test["Command"] in avail_cmds:
-				result = test["Func"](child, test["Command"])
-			else:
-				result = (0, "Skipped [Not Available]")
-
-			# make a note when the test was finished
-			end_time = time.time()
-
-			# append test data to the result tuple
-			result += (test["Name"], end_time - start_time,
-				logfile.getvalue())
-
-			# call report function, if any defined, and supply it with
-			# target and complete log for test run
-			if test["Report"]:
-				report = test["Report"](self.target, log)
-
-				# append report to results tuple
-				result += (report,)
-			else:
-				# report is None
-				result += (None,)
-		except:
-			# make a note when the test crashed
-			end_time = time.time()
-
-			# mark test as failed
-			result = (-1, "Fail [Crash]", test["Name"],
-				end_time - start_time, logfile.getvalue(), None)
-		finally:
-			# append the results to the results list
-			results.append(result)
-
-	# regardless of whether test has crashed, try quitting it
-	try:
-		child.sendline("quit")
-		child.close()
-	# if the test crashed, just do nothing instead
-	except:
-		# nop
-		pass
-
-	# return test results
-	return results
-
 
 
+def run_test_group(cmdline, test_group):
+    results = []
+    child = None
+    start_time = time.time()
+    startuplog = None
+
+    # run test app
+    try:
+        # prepare logging of init
+        startuplog = StringIO.StringIO()
+
+        print >>startuplog, "\n%s %s\n" % ("=" * 20, test_group["Prefix"])
+        print >>startuplog, "\ncmdline=%s" % cmdline
+
+        child = pexpect.spawn(cmdline, logfile=startuplog)
+
+        # wait for target to boot
+        if not wait_prompt(child):
+            child.close()
+
+            results.append((-1,
+                            "Fail [No prompt]",
+                            "Start %s" % test_group["Prefix"],
+                            time.time() - start_time,
+                            startuplog.getvalue(),
+                            None))
+
+            # mark all tests as failed
+            for test in test_group["Tests"]:
+                results.append((-1, "Fail [No prompt]", test["Name"],
+                                time.time() - start_time, "", None))
+            # exit test
+            return results
+
+    except:
+        results.append((-1,
+                        "Fail [Can't run]",
+                        "Start %s" % test_group["Prefix"],
+                        time.time() - start_time,
+                        startuplog.getvalue(),
+                        None))
+
+        # mark all tests as failed
+        for t in test_group["Tests"]:
+            results.append((-1, "Fail [Can't run]", t["Name"],
+                            time.time() - start_time, "", None))
+        # exit test
+        return results
+
+    # startup was successful
+    results.append((0, "Success", "Start %s" % test_group["Prefix"],
+                    time.time() - start_time, startuplog.getvalue(), None))
+
+    # parse the binary for available test commands
+    binary = cmdline.split()[0]
+    stripped = 'not stripped' not in subprocess.check_output(['file', binary])
+    if not stripped:
+        symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
+        avail_cmds = re.findall('test_register_(\w+)', symbols)
+
+    # run all tests in test group
+    for test in test_group["Tests"]:
+
+        # create log buffer for each test
+        # in multiprocessing environment, the logging would be
+        # interleaved and will create a mess, hence the buffering
+        logfile = StringIO.StringIO()
+        child.logfile = logfile
+
+        result = ()
+
+        # make a note when the test started
+        start_time = time.time()
+
+        try:
+            # print test name to log buffer
+            print >>logfile, "\n%s %s\n" % ("-" * 20, test["Name"])
+
+            # run test function associated with the test
+            if stripped or test["Command"] in avail_cmds:
+                result = test["Func"](child, test["Command"])
+            else:
+                result = (0, "Skipped [Not Available]")
+
+            # make a note when the test was finished
+            end_time = time.time()
+
+            # append test data to the result tuple
+            result += (test["Name"], end_time - start_time,
+                       logfile.getvalue())
+
+            # call report function, if any defined, and supply it with
+            # target and complete log for test run
+            if test["Report"]:
+                report = test["Report"](self.target, log)
+
+                # append report to results tuple
+                result += (report,)
+            else:
+                # report is None
+                result += (None,)
+        except:
+            # make a note when the test crashed
+            end_time = time.time()
+
+            # mark test as failed
+            result = (-1, "Fail [Crash]", test["Name"],
+                      end_time - start_time, logfile.getvalue(), None)
+        finally:
+            # append the results to the results list
+            results.append(result)
+
+    # regardless of whether test has crashed, try quitting it
+    try:
+        child.sendline("quit")
+        child.close()
+    # if the test crashed, just do nothing instead
+    except:
+        # nop
+        pass
+
+    # return test results
+    return results
 
 
 # class representing an instance of autotests run
 class AutotestRunner:
-	cmdline = ""
-	parallel_test_groups = []
-	non_parallel_test_groups = []
-	logfile = None
-	csvwriter = None
-	target = ""
-	start = None
-	n_tests = 0
-	fails = 0
-	log_buffers = []
-	blacklist = []
-	whitelist = []
-
-
-	def __init__(self, cmdline, target, blacklist, whitelist):
-		self.cmdline = cmdline
-		self.target = target
-		self.blacklist = blacklist
-		self.whitelist = whitelist
-
-		# log file filename
-		logfile = "%s.log" % target
-		csvfile = "%s.csv" % target
-
-		self.logfile = open(logfile, "w")
-		csvfile = open(csvfile, "w")
-		self.csvwriter = csv.writer(csvfile)
-
-		# prepare results table
-		self.csvwriter.writerow(["test_name","test_result","result_str"])
-
-
-
-	# set up cmdline string
-	def __get_cmdline(self, test):
-		cmdline = self.cmdline
-
-		# append memory limitations for each test
-		# otherwise tests won't run in parallel
-		if not "i686" in self.target:
-			cmdline += " --socket-mem=%s"% test["Memory"]
-		else:
-			# affinitize startup so that tests don't fail on i686
-			cmdline = "taskset 1 " + cmdline
-			cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
-
-		# set group prefix for autotest group
-		# otherwise they won't run in parallel
-		cmdline += " --file-prefix=%s"% test["Prefix"]
-
-		return cmdline
-
-
-
-	def add_parallel_test_group(self,test_group):
-		self.parallel_test_groups.append(test_group)
-
-	def add_non_parallel_test_group(self,test_group):
-		self.non_parallel_test_groups.append(test_group)
-
-
-	def __process_results(self, results):
-		# this iterates over individual test results
-		for i, result in enumerate(results):
-
-			# increase total number of tests that were run
-			# do not include "start" test
-			if i > 0:
-				self.n_tests += 1
-
-			# unpack result tuple
-			test_result, result_str, test_name, \
-				test_time, log, report = result
-
-			# get total run time
-			cur_time = time.time()
-			total_time = int(cur_time - self.start)
-
-			# print results, test run time and total time since start
-			print ("%s:" % test_name).ljust(30),
-			print result_str.ljust(29),
-			print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
-
-			# don't print out total time every line, it's the same anyway
-			if i == len(results) - 1:
-				print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
-			else:
-				print ""
-
-			# if test failed and it wasn't a "start" test
-			if test_result < 0 and not i == 0:
-				self.fails += 1
-
-			# collect logs
-			self.log_buffers.append(log)
-
-			# create report if it exists
-			if report:
-				try:
-					f = open("%s_%s_report.rst" % (self.target,test_name), "w")
-				except IOError:
-					print "Report for %s could not be created!" % test_name
-				else:
-					with f:
-						f.write(report)
-
-			# write test result to CSV file
-			if i != 0:
-				self.csvwriter.writerow([test_name, test_result, result_str])
-
-
-
-
-	# this function iterates over test groups and removes each
-	# test that is not in whitelist/blacklist
-	def __filter_groups(self, test_groups):
-		groups_to_remove = []
-
-		# filter out tests from parallel test groups
-		for i, test_group in enumerate(test_groups):
-
-			# iterate over a copy so that we could safely delete individual tests
-			for test in test_group["Tests"][:]:
-				test_id = test["Command"]
-
-				# dump tests are specified in full e.g. "Dump_mempool"
-				if "_autotest" in test_id:
-					test_id = test_id[:-len("_autotest")]
-
-				# filter out blacklisted/whitelisted tests
-				if self.blacklist and test_id in self.blacklist:
-					test_group["Tests"].remove(test)
-					continue
-				if self.whitelist and test_id not in self.whitelist:
-					test_group["Tests"].remove(test)
-					continue
-
-			# modify or remove original group
-			if len(test_group["Tests"]) > 0:
-				test_groups[i] = test_group
-			else:
-				# remember which groups should be deleted
-				# put the numbers backwards so that we start
-				# deleting from the end, not from the beginning
-				groups_to_remove.insert(0, i)
-
-		# remove test groups that need to be removed
-		for i in groups_to_remove:
-			del test_groups[i]
-
-		return test_groups
-
-
-
-	# iterate over test groups and run tests associated with them
-	def run_all_tests(self):
-		# filter groups
-		self.parallel_test_groups = \
-			self.__filter_groups(self.parallel_test_groups)
-		self.non_parallel_test_groups = \
-			self.__filter_groups(self.non_parallel_test_groups)
-
-		# create a pool of worker threads
-		pool = multiprocessing.Pool(processes=1)
-
-		results = []
-
-		# whatever happens, try to save as much logs as possible
-		try:
-
-			# create table header
-			print ""
-			print "Test name".ljust(30),
-			print "Test result".ljust(29),
-			print "Test".center(9),
-			print "Total".center(9)
-			print "=" * 80
-
-			# make a note of tests start time
-			self.start = time.time()
-
-			# assign worker threads to run test groups
-			for test_group in self.parallel_test_groups:
-				result = pool.apply_async(run_test_group,
-					[self.__get_cmdline(test_group), test_group])
-				results.append(result)
-
-			# iterate while we have group execution results to get
-			while len(results) > 0:
-
-				# iterate over a copy to be able to safely delete results
-				# this iterates over a list of group results
-				for group_result in results[:]:
-
-					# if the thread hasn't finished yet, continue
-					if not group_result.ready():
-						continue
-
-					res = group_result.get()
-
-					self.__process_results(res)
-
-					# remove result from results list once we're done with it
-					results.remove(group_result)
-
-			# run non_parallel tests. they are run one by one, synchronously
-			for test_group in self.non_parallel_test_groups:
-				group_result = run_test_group(self.__get_cmdline(test_group), test_group)
-
-				self.__process_results(group_result)
-
-			# get total run time
-			cur_time = time.time()
-			total_time = int(cur_time - self.start)
-
-			# print out summary
-			print "=" * 80
-			print "Total run time: %02dm %02ds" % (total_time / 60, total_time % 60)
-			if self.fails != 0:
-				print "Number of failed tests: %s" % str(self.fails)
-
-			# write summary to logfile
-			self.logfile.write("Summary\n")
-			self.logfile.write("Target: ".ljust(15) + "%s\n" % self.target)
-			self.logfile.write("Tests: ".ljust(15) + "%i\n" % self.n_tests)
-			self.logfile.write("Failed tests: ".ljust(15) + "%i\n" % self.fails)
-		except:
-			print "Exception occured"
-			print sys.exc_info()
-			self.fails = 1
-
-		# drop logs from all executions to a logfile
-		for buf in self.log_buffers:
-			self.logfile.write(buf.replace("\r",""))
-
-		log_buffers = []
-
-		return self.fails
+    cmdline = ""
+    parallel_test_groups = []
+    non_parallel_test_groups = []
+    logfile = None
+    csvwriter = None
+    target = ""
+    start = None
+    n_tests = 0
+    fails = 0
+    log_buffers = []
+    blacklist = []
+    whitelist = []
+
+    def __init__(self, cmdline, target, blacklist, whitelist):
+        self.cmdline = cmdline
+        self.target = target
+        self.blacklist = blacklist
+        self.whitelist = whitelist
+
+        # log file filename
+        logfile = "%s.log" % target
+        csvfile = "%s.csv" % target
+
+        self.logfile = open(logfile, "w")
+        csvfile = open(csvfile, "w")
+        self.csvwriter = csv.writer(csvfile)
+
+        # prepare results table
+        self.csvwriter.writerow(["test_name", "test_result", "result_str"])
+
+    # set up cmdline string
+    def __get_cmdline(self, test):
+        cmdline = self.cmdline
+
+        # append memory limitations for each test
+        # otherwise tests won't run in parallel
+        if "i686" not in self.target:
+            cmdline += " --socket-mem=%s" % test["Memory"]
+        else:
+            # affinitize startup so that tests don't fail on i686
+            cmdline = "taskset 1 " + cmdline
+            cmdline += " -m " + str(sum(map(int, test["Memory"].split(","))))
+
+        # set group prefix for autotest group
+        # otherwise they won't run in parallel
+        cmdline += " --file-prefix=%s" % test["Prefix"]
+
+        return cmdline
+
+    def add_parallel_test_group(self, test_group):
+        self.parallel_test_groups.append(test_group)
+
+    def add_non_parallel_test_group(self, test_group):
+        self.non_parallel_test_groups.append(test_group)
+
+    def __process_results(self, results):
+        # this iterates over individual test results
+        for i, result in enumerate(results):
+
+            # increase total number of tests that were run
+            # do not include "start" test
+            if i > 0:
+                self.n_tests += 1
+
+            # unpack result tuple
+            test_result, result_str, test_name, \
+                test_time, log, report = result
+
+            # get total run time
+            cur_time = time.time()
+            total_time = int(cur_time - self.start)
+
+            # print results, test run time and total time since start
+            print ("%s:" % test_name).ljust(30),
+            print result_str.ljust(29),
+            print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
+
+            # don't print out total time every line, it's the same anyway
+            if i == len(results) - 1:
+                print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
+            else:
+                print ""
+
+            # if test failed and it wasn't a "start" test
+            if test_result < 0 and not i == 0:
+                self.fails += 1
+
+            # collect logs
+            self.log_buffers.append(log)
+
+            # create report if it exists
+            if report:
+                try:
+                    f = open("%s_%s_report.rst" %
+                             (self.target, test_name), "w")
+                except IOError:
+                    print "Report for %s could not be created!" % test_name
+                else:
+                    with f:
+                        f.write(report)
+
+            # write test result to CSV file
+            if i != 0:
+                self.csvwriter.writerow([test_name, test_result, result_str])
+
+    # this function iterates over test groups and removes each
+    # test that is not in whitelist/blacklist
+    def __filter_groups(self, test_groups):
+        groups_to_remove = []
+
+        # filter out tests from parallel test groups
+        for i, test_group in enumerate(test_groups):
+
+            # iterate over a copy so that we could safely delete individual
+            # tests
+            for test in test_group["Tests"][:]:
+                test_id = test["Command"]
+
+                # dump tests are specified in full e.g. "Dump_mempool"
+                if "_autotest" in test_id:
+                    test_id = test_id[:-len("_autotest")]
+
+                # filter out blacklisted/whitelisted tests
+                if self.blacklist and test_id in self.blacklist:
+                    test_group["Tests"].remove(test)
+                    continue
+                if self.whitelist and test_id not in self.whitelist:
+                    test_group["Tests"].remove(test)
+                    continue
+
+            # modify or remove original group
+            if len(test_group["Tests"]) > 0:
+                test_groups[i] = test_group
+            else:
+                # remember which groups should be deleted
+                # put the numbers backwards so that we start
+                # deleting from the end, not from the beginning
+                groups_to_remove.insert(0, i)
+
+        # remove test groups that need to be removed
+        for i in groups_to_remove:
+            del test_groups[i]
+
+        return test_groups
+
+    # iterate over test groups and run tests associated with them
+    def run_all_tests(self):
+        # filter groups
+        self.parallel_test_groups = \
+            self.__filter_groups(self.parallel_test_groups)
+        self.non_parallel_test_groups = \
+            self.__filter_groups(self.non_parallel_test_groups)
+
+        # create a pool of worker threads
+        pool = multiprocessing.Pool(processes=1)
+
+        results = []
+
+        # whatever happens, try to save as much logs as possible
+        try:
+
+            # create table header
+            print ""
+            print "Test name".ljust(30),
+            print "Test result".ljust(29),
+            print "Test".center(9),
+            print "Total".center(9)
+            print "=" * 80
+
+            # make a note of tests start time
+            self.start = time.time()
+
+            # assign worker threads to run test groups
+            for test_group in self.parallel_test_groups:
+                result = pool.apply_async(run_test_group,
+                                          [self.__get_cmdline(test_group),
+                                           test_group])
+                results.append(result)
+
+            # iterate while we have group execution results to get
+            while len(results) > 0:
+
+                # iterate over a copy to be able to safely delete results
+                # this iterates over a list of group results
+                for group_result in results[:]:
+
+                    # if the thread hasn't finished yet, continue
+                    if not group_result.ready():
+                        continue
+
+                    res = group_result.get()
+
+                    self.__process_results(res)
+
+                    # remove result from results list once we're done with it
+                    results.remove(group_result)
+
+            # run non_parallel tests. they are run one by one, synchronously
+            for test_group in self.non_parallel_test_groups:
+                group_result = run_test_group(
+                    self.__get_cmdline(test_group), test_group)
+
+                self.__process_results(group_result)
+
+            # get total run time
+            cur_time = time.time()
+            total_time = int(cur_time - self.start)
+
+            # print out summary
+            print "=" * 80
+            print "Total run time: %02dm %02ds" % (total_time / 60,
+                                                   total_time % 60)
+            if self.fails != 0:
+                print "Number of failed tests: %s" % str(self.fails)
+
+            # write summary to logfile
+            self.logfile.write("Summary\n")
+            self.logfile.write("Target: ".ljust(15) + "%s\n" % self.target)
+            self.logfile.write("Tests: ".ljust(15) + "%i\n" % self.n_tests)
+            self.logfile.write("Failed tests: ".ljust(
+                15) + "%i\n" % self.fails)
+        except:
+            print "Exception occurred"
+            print sys.exc_info()
+            self.fails = 1
+
+        # drop logs from all executions to a logfile
+        for buf in self.log_buffers:
+            self.logfile.write(buf.replace("\r", ""))
+
+        return self.fails
diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 14cffd0..c482ea8 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -33,257 +33,272 @@
 
 # Test functions
 
-import sys, pexpect, time, os, re
+import pexpect
 
 # default autotest, used to run most tests
 # waits for "Test OK"
+
+
 def default_autotest(child, test_name):
-	child.sendline(test_name)
-	result = child.expect(["Test OK", "Test Failed",
-		"Command not found", pexpect.TIMEOUT], timeout = 900)
-	if result == 1:
-		return -1, "Fail"
-	elif result == 2:
-		return -1, "Fail [Not found]"
-	elif result == 3:
-		return -1, "Fail [Timeout]"
-	return 0, "Success"
+    child.sendline(test_name)
+    result = child.expect(["Test OK", "Test Failed",
+                           "Command not found", pexpect.TIMEOUT], timeout=900)
+    if result == 1:
+        return -1, "Fail"
+    elif result == 2:
+        return -1, "Fail [Not found]"
+    elif result == 3:
+        return -1, "Fail [Timeout]"
+    return 0, "Success"
 
 # autotest used to run dump commands
 # just fires the command
+
+
 def dump_autotest(child, test_name):
-	child.sendline(test_name)
-	return 0, "Success"
+    child.sendline(test_name)
+    return 0, "Success"
 
 # memory autotest
 # reads output and waits for Test OK
+
+
 def memory_autotest(child, test_name):
-	child.sendline(test_name)
-	regexp = "phys:0x[0-9a-f]*, len:([0-9]*), virt:0x[0-9a-f]*, socket_id:[0-9]*"
-	index = child.expect([regexp, pexpect.TIMEOUT], timeout = 180)
-	if index != 0:
-		return -1, "Fail [Timeout]"
-	size = int(child.match.groups()[0], 16)
-	if size <= 0:
-		return -1, "Fail [Bad size]"
-	index = child.expect(["Test OK", "Test Failed",
-		          pexpect.TIMEOUT], timeout = 10)
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-	return 0, "Success"
+    child.sendline(test_name)
+    regexp = "phys:0x[0-9a-f]*, len:([0-9]*), virt:0x[0-9a-f]*, " \
+             "socket_id:[0-9]*"
+    index = child.expect([regexp, pexpect.TIMEOUT], timeout=180)
+    if index != 0:
+        return -1, "Fail [Timeout]"
+    size = int(child.match.groups()[0], 16)
+    if size <= 0:
+        return -1, "Fail [Bad size]"
+    index = child.expect(["Test OK", "Test Failed",
+                          pexpect.TIMEOUT], timeout=10)
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+    return 0, "Success"
+
 
 def spinlock_autotest(child, test_name):
-	i = 0
-	ir = 0
-	child.sendline(test_name)
-	while True:
-		index = child.expect(["Test OK",
-			"Test Failed",
-			"Hello from core ([0-9]*) !",
-			"Hello from within recursive locks from ([0-9]*) !",
-		pexpect.TIMEOUT], timeout = 5)
-		# ok
-		if index == 0:
-			break
-
-		# message, check ordering
-		elif index == 2:
-			if int(child.match.groups()[0]) < i:
-				return -1, "Fail [Bad order]"
-			i = int(child.match.groups()[0])
-		elif index == 3:
-			if int(child.match.groups()[0]) < ir:
-				return -1, "Fail [Bad order]"
-			ir = int(child.match.groups()[0])
-
-		# fail
-		elif index == 4:
-			return -1, "Fail [Timeout]"
-		elif index == 1:
-			return -1, "Fail"
-
-	return 0, "Success"
+    i = 0
+    ir = 0
+    child.sendline(test_name)
+    while True:
+        index = child.expect(["Test OK",
+                              "Test Failed",
+                              "Hello from core ([0-9]*) !",
+                              "Hello from within recursive locks "
+                              "from ([0-9]*) !",
+                              pexpect.TIMEOUT], timeout=5)
+        # ok
+        if index == 0:
+            break
+
+        # message, check ordering
+        elif index == 2:
+            if int(child.match.groups()[0]) < i:
+                return -1, "Fail [Bad order]"
+            i = int(child.match.groups()[0])
+        elif index == 3:
+            if int(child.match.groups()[0]) < ir:
+                return -1, "Fail [Bad order]"
+            ir = int(child.match.groups()[0])
+
+        # fail
+        elif index == 4:
+            return -1, "Fail [Timeout]"
+        elif index == 1:
+            return -1, "Fail"
+
+    return 0, "Success"
+
 
 def rwlock_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-	while True:
-		index = child.expect(["Test OK",
-			"Test Failed",
-			"Hello from core ([0-9]*) !",
-			"Global write lock taken on master core ([0-9]*)",
-		pexpect.TIMEOUT], timeout = 10)
-		# ok
-		if index == 0:
-			if i != 0xffff:
-				return -1, "Fail [Message is missing]"
-			break
-
-		# message, check ordering
-		elif index == 2:
-			if int(child.match.groups()[0]) < i:
-				return -1, "Fail [Bad order]"
-			i = int(child.match.groups()[0])
-
-		# must be the last message, check ordering
-		elif index == 3:
-			i = 0xffff
-
-		elif index == 4:
-			return -1, "Fail [Timeout]"
-
-		# fail
-		else:
-			return -1, "Fail"
-
-	return 0, "Success"
+    i = 0
+    child.sendline(test_name)
+    while True:
+        index = child.expect(["Test OK",
+                              "Test Failed",
+                              "Hello from core ([0-9]*) !",
+                              "Global write lock taken on master "
+                              "core ([0-9]*)",
+                              pexpect.TIMEOUT], timeout=10)
+        # ok
+        if index == 0:
+            if i != 0xffff:
+                return -1, "Fail [Message is missing]"
+            break
+
+        # message, check ordering
+        elif index == 2:
+            if int(child.match.groups()[0]) < i:
+                return -1, "Fail [Bad order]"
+            i = int(child.match.groups()[0])
+
+        # must be the last message, check ordering
+        elif index == 3:
+            i = 0xffff
+
+        elif index == 4:
+            return -1, "Fail [Timeout]"
+
+        # fail
+        else:
+            return -1, "Fail"
+
+    return 0, "Success"
+
 
 def logs_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-
-	log_list = [
-		"TESTAPP1: error message",
-		"TESTAPP1: critical message",
-		"TESTAPP2: critical message",
-		"TESTAPP1: error message",
-	]
-
-	for log_msg in log_list:
-		index = child.expect([log_msg,
-				      "Test OK",
-				      "Test Failed",
-				      pexpect.TIMEOUT], timeout = 10)
-
-		if index == 3:
-			return -1, "Fail [Timeout]"
-		# not ok
-		elif index != 0:
-			return -1, "Fail"
-
-	index = child.expect(["Test OK",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 10)
-
-	return 0, "Success"
+    child.sendline(test_name)
+
+    log_list = [
+        "TESTAPP1: error message",
+        "TESTAPP1: critical message",
+        "TESTAPP2: critical message",
+        "TESTAPP1: error message",
+    ]
+
+    for log_msg in log_list:
+        index = child.expect([log_msg,
+                              "Test OK",
+                              "Test Failed",
+                              pexpect.TIMEOUT], timeout=10)
+
+        if index == 3:
+            return -1, "Fail [Timeout]"
+        # not ok
+        elif index != 0:
+            return -1, "Fail"
+
+    index = child.expect(["Test OK",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=10)
+
+    return 0, "Success"
+
 
 def timer_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-
-	index = child.expect(["Start timer stress tests",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	index = child.expect(["Start timer stress tests 2",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	index = child.expect(["Start timer basic tests",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	prev_lcore_timer1 = -1
-
-	lcore_tim0 = -1
-	lcore_tim1 = -1
-	lcore_tim2 = -1
-	lcore_tim3 = -1
-
-	while True:
-		index = child.expect(["TESTTIMER: ([0-9]*): callback id=([0-9]*) count=([0-9]*) on core ([0-9]*)",
-			"Test OK",
-			"Test Failed",
-			pexpect.TIMEOUT], timeout = 10)
-
-		if index == 1:
-			break
-
-		if index == 2:
-			return -1, "Fail"
-		elif index == 3:
-			return -1, "Fail [Timeout]"
-
-		try:
-			t = int(child.match.groups()[0])
-			id = int(child.match.groups()[1])
-			cnt = int(child.match.groups()[2])
-			lcore = int(child.match.groups()[3])
-		except:
-			return -1, "Fail [Cannot parse]"
-
-		# timer0 always expires on the same core when cnt < 20
-		if id == 0:
-			if lcore_tim0 == -1:
-				lcore_tim0 = lcore
-			elif lcore != lcore_tim0 and cnt < 20:
-				return -1, "Fail [lcore != lcore_tim0 (%d, %d)]"%(lcore, lcore_tim0)
-			if cnt > 21:
-				return -1, "Fail [tim0 cnt > 21]"
-
-		# timer1 each time expires on a different core
-		if id == 1:
-			if lcore == lcore_tim1:
-				return -1, "Fail [lcore == lcore_tim1 (%d, %d)]"%(lcore, lcore_tim1)
-			lcore_tim1 = lcore
-			if cnt > 10:
-				return -1, "Fail [tim1 cnt > 30]"
-
-		# timer0 always expires on the same core
-		if id == 2:
-			if lcore_tim2 == -1:
-				lcore_tim2 = lcore
-			elif lcore != lcore_tim2:
-				return -1, "Fail [lcore != lcore_tim2 (%d, %d)]"%(lcore, lcore_tim2)
-			if cnt > 30:
-				return -1, "Fail [tim2 cnt > 30]"
-
-		# timer0 always expires on the same core
-		if id == 3:
-			if lcore_tim3 == -1:
-				lcore_tim3 = lcore
-			elif lcore != lcore_tim3:
-				return -1, "Fail [lcore_tim3 changed (%d -> %d)]"%(lcore, lcore_tim3)
-			if cnt > 30:
-				return -1, "Fail [tim3 cnt > 30]"
-
-	# must be 2 different cores
-	if lcore_tim0 == lcore_tim3:
-		return -1, "Fail [lcore_tim0 (%d) == lcore_tim3 (%d)]"%(lcore_tim0, lcore_tim3)
-
-	return 0, "Success"
+    child.sendline(test_name)
+
+    index = child.expect(["Start timer stress tests",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    index = child.expect(["Start timer stress tests 2",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    index = child.expect(["Start timer basic tests",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    lcore_tim0 = -1
+    lcore_tim1 = -1
+    lcore_tim2 = -1
+    lcore_tim3 = -1
+
+    while True:
+        index = child.expect(["TESTTIMER: ([0-9]*): callback id=([0-9]*) "
+                              "count=([0-9]*) on core ([0-9]*)",
+                              "Test OK",
+                              "Test Failed",
+                              pexpect.TIMEOUT], timeout=10)
+
+        if index == 1:
+            break
+
+        if index == 2:
+            return -1, "Fail"
+        elif index == 3:
+            return -1, "Fail [Timeout]"
+
+        try:
+            id = int(child.match.groups()[1])
+            cnt = int(child.match.groups()[2])
+            lcore = int(child.match.groups()[3])
+        except:
+            return -1, "Fail [Cannot parse]"
+
+        # timer0 always expires on the same core when cnt < 20
+        if id == 0:
+            if lcore_tim0 == -1:
+                lcore_tim0 = lcore
+            elif lcore != lcore_tim0 and cnt < 20:
+                return -1, "Fail [lcore != lcore_tim0 (%d, %d)]" \
+                    % (lcore, lcore_tim0)
+            if cnt > 21:
+                return -1, "Fail [tim0 cnt > 21]"
+
+        # timer1 each time expires on a different core
+        if id == 1:
+            if lcore == lcore_tim1:
+                return -1, "Fail [lcore == lcore_tim1 (%d, %d)]" \
+                    % (lcore, lcore_tim1)
+            lcore_tim1 = lcore
+            if cnt > 10:
+                return -1, "Fail [tim1 cnt > 30]"
+
+        # timer0 always expires on the same core
+        if id == 2:
+            if lcore_tim2 == -1:
+                lcore_tim2 = lcore
+            elif lcore != lcore_tim2:
+                return -1, "Fail [lcore != lcore_tim2 (%d, %d)]" \
+                    % (lcore, lcore_tim2)
+            if cnt > 30:
+                return -1, "Fail [tim2 cnt > 30]"
+
+        # timer0 always expires on the same core
+        if id == 3:
+            if lcore_tim3 == -1:
+                lcore_tim3 = lcore
+            elif lcore != lcore_tim3:
+                return -1, "Fail [lcore_tim3 changed (%d -> %d)]" \
+                    % (lcore, lcore_tim3)
+            if cnt > 30:
+                return -1, "Fail [tim3 cnt > 30]"
+
+    # must be 2 different cores
+    if lcore_tim0 == lcore_tim3:
+        return -1, "Fail [lcore_tim0 (%d) == lcore_tim3 (%d)]" \
+            % (lcore_tim0, lcore_tim3)
+
+    return 0, "Success"
+
 
 def ring_autotest(child, test_name):
-	child.sendline(test_name)
-	index = child.expect(["Test OK", "Test Failed",
-		pexpect.TIMEOUT], timeout = 2)
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	child.sendline("set_watermark test 100")
-	child.sendline("dump_ring test")
-	index = child.expect(["  watermark=100",
-		pexpect.TIMEOUT], timeout = 1)
-	if index != 0:
-		return -1, "Fail [Bad watermark]"
-
-	return 0, "Success"
+    child.sendline(test_name)
+    index = child.expect(["Test OK", "Test Failed",
+                          pexpect.TIMEOUT], timeout=2)
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    child.sendline("set_watermark test 100")
+    child.sendline("dump_ring test")
+    index = child.expect(["  watermark=100",
+                          pexpect.TIMEOUT], timeout=1)
+    if index != 0:
+        return -1, "Fail [Bad watermark]"
+
+    return 0, "Success"
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 29e8efb..34c62de 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -58,7 +58,8 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion']).decode('utf-8').rstrip()
+version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
+version = version.decode('utf-8').rstrip()
 release = version
 
 master_doc = 'index'
@@ -94,6 +95,7 @@
     'preamble': latex_preamble
 }
 
+
 # Override the default Latex formatter in order to modify the
 # code/verbatim blocks.
 class CustomLatexFormatter(LatexFormatter):
@@ -117,12 +119,12 @@ def __init__(self, **options):
              ("tools/devbind", "dpdk-devbind",
               "check device status and bind/unbind them from drivers", "", 8)]
 
-######## :numref: fallback ########
+
+# ####### :numref: fallback ########
 # The following hook functions add some simple handling for the :numref:
 # directive for Sphinx versions prior to 1.3.1. The functions replace the
 # :numref: reference with a link to the target (for all Sphinx doc types).
 # It doesn't try to label figures/tables.
-
 def numref_role(reftype, rawtext, text, lineno, inliner):
     """
     Add a Sphinx role to handle numref references. Note, we can't convert
@@ -136,6 +138,7 @@ def numref_role(reftype, rawtext, text, lineno, inliner):
                               internal=True)
     return [newnode], []
 
+
 def process_numref(app, doctree, from_docname):
     """
     Process the numref nodes once the doctree has been built and prior to
diff --git a/examples/ip_pipeline/config/diagram-generator.py b/examples/ip_pipeline/config/diagram-generator.py
index 6b7170b..1748833 100755
--- a/examples/ip_pipeline/config/diagram-generator.py
+++ b/examples/ip_pipeline/config/diagram-generator.py
@@ -36,7 +36,8 @@
 # the DPDK ip_pipeline application.
 #
 # The input configuration file is translated to an output file in DOT syntax,
-# which is then used to create the image file using graphviz (www.graphviz.org).
+# which is then used to create the image file using graphviz
+# (www.graphviz.org).
 #
 
 from __future__ import print_function
@@ -94,6 +95,7 @@
 # SOURCEx | SOURCEx    | SOURCEx     | PIPELINEy     | SOURCEx
 # SINKx   | SINKx      | PIPELINEy   | SINKx         | SINKx
 
+
 #
 # Parse the input configuration file to detect the graph nodes and edges
 #
@@ -321,16 +323,17 @@ def process_config_file(cfgfile):
     #
     print('Creating image file "%s" ...' % imgfile)
     if os.system('which dot > /dev/null'):
-        print('Error: Unable to locate "dot" executable.' \
-            'Please install the "graphviz" package (www.graphviz.org).')
+        print('Error: Unable to locate "dot" executable.'
+              'Please install the "graphviz" package (www.graphviz.org).')
         return
 
     os.system(dot_cmd)
 
 
 if __name__ == '__main__':
-    parser = argparse.ArgumentParser(description=\
-        'Create diagram for IP pipeline configuration file.')
+    parser = argparse.ArgumentParser(description='Create diagram for IP '
+                                                 'pipeline configuration '
+                                                 'file.')
 
     parser.add_argument(
         '-f',
diff --git a/examples/ip_pipeline/config/pipeline-to-core-mapping.py b/examples/ip_pipeline/config/pipeline-to-core-mapping.py
index c2050b8..7a4eaa2 100755
--- a/examples/ip_pipeline/config/pipeline-to-core-mapping.py
+++ b/examples/ip_pipeline/config/pipeline-to-core-mapping.py
@@ -39,15 +39,14 @@
 #
 
 from __future__ import print_function
-import sys
-import errno
-import os
-import re
+from collections import namedtuple
+import argparse
 import array
+import errno
 import itertools
+import os
 import re
-import argparse
-from collections import namedtuple
+import sys
 
 # default values
 enable_stage0_traceout = 1
diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py
index d38d0b5..ccc22ec 100755
--- a/tools/cpu_layout.py
+++ b/tools/cpu_layout.py
@@ -38,40 +38,40 @@
 cores = []
 core_map = {}
 
-fd=open("/proc/cpuinfo")
+fd = open("/proc/cpuinfo")
 lines = fd.readlines()
 fd.close()
 
 core_details = []
 core_lines = {}
 for line in lines:
-	if len(line.strip()) != 0:
-		name, value = line.split(":", 1)
-		core_lines[name.strip()] = value.strip()
-	else:
-		core_details.append(core_lines)
-		core_lines = {}
+    if len(line.strip()) != 0:
+        name, value = line.split(":", 1)
+        core_lines[name.strip()] = value.strip()
+    else:
+        core_details.append(core_lines)
+        core_lines = {}
 
 for core in core_details:
-	for field in ["processor", "core id", "physical id"]:
-		if field not in core:
-			print "Error getting '%s' value from /proc/cpuinfo" % field
-			sys.exit(1)
-		core[field] = int(core[field])
+    for field in ["processor", "core id", "physical id"]:
+        if field not in core:
+            print "Error getting '%s' value from /proc/cpuinfo" % field
+            sys.exit(1)
+        core[field] = int(core[field])
 
-	if core["core id"] not in cores:
-		cores.append(core["core id"])
-	if core["physical id"] not in sockets:
-		sockets.append(core["physical id"])
-	key = (core["physical id"], core["core id"])
-	if key not in core_map:
-		core_map[key] = []
-	core_map[key].append(core["processor"])
+    if core["core id"] not in cores:
+        cores.append(core["core id"])
+    if core["physical id"] not in sockets:
+        sockets.append(core["physical id"])
+    key = (core["physical id"], core["core id"])
+    if key not in core_map:
+        core_map[key] = []
+    core_map[key].append(core["processor"])
 
 print "============================================================"
 print "Core and Socket Information (as reported by '/proc/cpuinfo')"
 print "============================================================\n"
-print "cores = ",cores
+print "cores = ", cores
 print "sockets = ", sockets
 print ""
 
@@ -81,15 +81,16 @@
 
 print " ".ljust(max_core_id_len + len('Core ')),
 for s in sockets:
-        print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
+    print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
 print ""
+
 print " ".ljust(max_core_id_len + len('Core ')),
 for s in sockets:
-        print "--------".ljust(max_core_map_len),
+    print "--------".ljust(max_core_map_len),
 print ""
 
 for c in cores:
-        print "Core %s" % str(c).ljust(max_core_id_len),
-        for s in sockets:
-                print str(core_map[(s,c)]).ljust(max_core_map_len),
-        print ""
+    print "Core %s" % str(c).ljust(max_core_id_len),
+    for s in sockets:
+        print str(core_map[(s, c)]).ljust(max_core_map_len),
+    print ""
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index f1d374d..4f51a4b 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -93,10 +93,10 @@ def usage():
         Unbind a device (Equivalent to \"-b none\")
 
     --force:
-        By default, network devices which are used by Linux - as indicated by having
-        routes in the routing table - cannot be modified. Using the --force
-        flag overrides this behavior, allowing active links to be forcibly
-        unbound.
+        By default, network devices which are used by Linux - as indicated by
+        having routes in the routing table - cannot be modified. Using the
+        --force flag overrides this behavior, allowing active links to be
+        forcibly unbound.
         WARNING: This can lead to loss of network connection and should be used
         with caution.
 
@@ -151,7 +151,7 @@ def find_module(mod):
 
     # check for a copy based off current path
     tools_dir = dirname(abspath(sys.argv[0]))
-    if (tools_dir.endswith("tools")):
+    if tools_dir.endswith("tools"):
         base_dir = dirname(tools_dir)
         find_out = check_output(["find", base_dir, "-name", mod + ".ko"])
         if len(find_out) > 0:  # something matched
@@ -249,7 +249,7 @@ def get_nic_details():
     dev = {}
     dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
     for dev_line in dev_lines:
-        if (len(dev_line) == 0):
+        if len(dev_line) == 0:
             if dev["Class"][0:2] == NETWORK_BASE_CLASS:
                 # convert device and vendor ids to numbers, then add to global
                 dev["Vendor"] = int(dev["Vendor"], 16)
@@ -315,8 +315,8 @@ def get_crypto_details():
     dev = {}
     dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
     for dev_line in dev_lines:
-        if (len(dev_line) == 0):
-            if (dev["Class"][0:2] == CRYPTO_BASE_CLASS):
+        if len(dev_line) == 0:
+            if dev["Class"][0:2] == CRYPTO_BASE_CLASS:
                 # convert device and vendor ids to numbers, then add to global
                 dev["Vendor"] = int(dev["Vendor"], 16)
                 dev["Device"] = int(dev["Device"], 16)
@@ -513,7 +513,8 @@ 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" % (dev["Slot"],
-                               dev["Device_str"], extra_params % dev))
+                                               dev["Device_str"],
+                                               extra_params % dev))
             else:
                 strings.append("%s '%s'" % (dev["Slot"], dev["Device_str"]))
     # sort before printing, so that the entries appear in PCI order
@@ -532,7 +533,7 @@ def show_status():
 
     # split our list of network devices into the three categories above
     for d in devices.keys():
-        if (NETWORK_BASE_CLASS in devices[d]["Class"]):
+        if NETWORK_BASE_CLASS in devices[d]["Class"]:
             if not has_driver(d):
                 no_drv.append(devices[d])
                 continue
@@ -555,7 +556,7 @@ def show_status():
     no_drv = []
 
     for d in devices.keys():
-        if (CRYPTO_BASE_CLASS in devices[d]["Class"]):
+        if CRYPTO_BASE_CLASS in devices[d]["Class"]:
             if not has_driver(d):
                 no_drv.append(devices[d])
                 continue
diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py
index 3db9819..3d3ad7d 100755
--- a/tools/dpdk-pmdinfo.py
+++ b/tools/dpdk-pmdinfo.py
@@ -4,52 +4,20 @@
 # Utility to dump PMD_INFO_STRING support from an object file
 #
 # -------------------------------------------------------------------------
+import json
 import os
+import platform
+import string
 import sys
+from elftools.common.exceptions import ELFError
+from elftools.common.py3compat import (byte2int, bytes2str, str2bytes)
+from elftools.elf.elffile import ELFFile
 from optparse import OptionParser
-import string
-import json
-import platform
 
 # For running from development directory. It should take precedence over the
 # installed pyelftools.
 sys.path.insert(0, '.')
 
-
-from elftools import __version__
-from elftools.common.exceptions import ELFError
-from elftools.common.py3compat import (
-    ifilter, byte2int, bytes2str, itervalues, str2bytes)
-from elftools.elf.elffile import ELFFile
-from elftools.elf.dynamic import DynamicSection, DynamicSegment
-from elftools.elf.enums import ENUM_D_TAG
-from elftools.elf.segments import InterpSegment
-from elftools.elf.sections import SymbolTableSection
-from elftools.elf.gnuversions import (
-    GNUVerSymSection, GNUVerDefSection,
-    GNUVerNeedSection,
-)
-from elftools.elf.relocation import RelocationSection
-from elftools.elf.descriptions import (
-    describe_ei_class, describe_ei_data, describe_ei_version,
-    describe_ei_osabi, describe_e_type, describe_e_machine,
-    describe_e_version_numeric, describe_p_type, describe_p_flags,
-    describe_sh_type, describe_sh_flags,
-    describe_symbol_type, describe_symbol_bind, describe_symbol_visibility,
-    describe_symbol_shndx, describe_reloc_type, describe_dyn_tag,
-    describe_ver_flags,
-)
-from elftools.elf.constants import E_FLAGS
-from elftools.dwarf.dwarfinfo import DWARFInfo
-from elftools.dwarf.descriptions import (
-    describe_reg_name, describe_attr_value, set_global_machine_arch,
-    describe_CFI_instructions, describe_CFI_register_rule,
-    describe_CFI_CFA_rule,
-)
-from elftools.dwarf.constants import (
-    DW_LNS_copy, DW_LNS_set_file, DW_LNE_define_file)
-from elftools.dwarf.callframe import CIE, FDE
-
 raw_output = False
 pcidb = None
 
@@ -326,7 +294,7 @@ def parse_pmd_info_string(self, mystring):
         for i in optional_pmd_info:
             try:
                 print("%s: %s" % (i['tag'], pmdinfo[i['id']]))
-            except KeyError as e:
+            except KeyError:
                 continue
 
         if (len(pmdinfo["pci_ids"]) != 0):
@@ -475,7 +443,7 @@ def process_dt_needed_entries(self):
                         with open(library, 'rb') as file:
                             try:
                                 libelf = ReadElf(file, sys.stdout)
-                            except ELFError as e:
+                            except ELFError:
                                 print("%s is no an ELF file" % library)
                                 continue
                             libelf.process_dt_needed_entries()
@@ -491,7 +459,7 @@ def scan_autoload_path(autoload_path):
 
     try:
         dirs = os.listdir(autoload_path)
-    except OSError as e:
+    except OSError:
         # Couldn't read the directory, give up
         return
 
@@ -503,10 +471,10 @@ def scan_autoload_path(autoload_path):
             try:
                 file = open(dpath, 'rb')
                 readelf = ReadElf(file, sys.stdout)
-            except ELFError as e:
+            except ELFError:
                 # this is likely not an elf file, skip it
                 continue
-            except IOError as e:
+            except IOError:
                 # No permission to read the file, skip it
                 continue
 
@@ -531,7 +499,7 @@ def scan_for_autoload_pmds(dpdk_path):
     file = open(dpdk_path, 'rb')
     try:
         readelf = ReadElf(file, sys.stdout)
-    except ElfError as e:
+    except ElfError:
         if raw_output is False:
             print("Unable to parse %s" % file)
         return
@@ -557,7 +525,7 @@ def main(stream=None):
     global raw_output
     global pcidb
 
-    pcifile_default = "./pci.ids" # for unknown OS's assume local file
+    pcifile_default = "./pci.ids"  # For unknown OS's assume local file
     if platform.system() == 'Linux':
         pcifile_default = "/usr/share/hwdata/pci.ids"
     elif platform.system() == 'FreeBSD':
@@ -577,7 +545,8 @@ def main(stream=None):
                               "to get vendor names from",
                          default=pcifile_default, metavar="FILE")
     optparser.add_option("-t", "--table", dest="tblout",
-                         help="output information on hw support as a hex table",
+                         help="output information on hw support as a "
+                              "hex table",
                          action='store_true')
     optparser.add_option("-p", "--plugindir", dest="pdir",
                          help="scan dpdk for autoload plugins",
-- 
2.7.4

^ permalink raw reply related

* [PATCH] rte_eal: clarify the argc and argv documentation
From: Aaron Conole @ 2016-12-08 15:56 UTC (permalink / raw)
  To: dev

It's been a source of confusion in the past, and even with this update
may continue to be a source of confusion.  However, the original
language seems to imply that the DPDK EAL will take ownership of the
array passed in.  Loosening the language up a bit might give a better
understanding for what is actually happening.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/common/include/rte_eal.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index d150b9d..03fee50 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -146,14 +146,19 @@ int rte_eal_iopl_init(void);
  * This behavior may change in the future.
  *
  * @param argc
- *   The argc argument that was given to the main() function.
+ *   A non-negative value.  If it is greater than 0, the array members
+ *   for argv[0] through argv[argc] (non-inclusive) shall contain pointers
+ *   to strings.
  * @param argv
- *   The argv argument that was given to the main() function.
+ *   An array of strings.  The contents of the array, as well as the strings
+ *   which are pointed to by the array, may be modified by this function.
  * @return
  *   - On success, the number of parsed arguments, which is greater or
  *     equal to zero. After the call to rte_eal_init(),
- *     all arguments argv[x] with x < ret may be modified and should
- *     not be accessed by the application.
+ *     all arguments argv[x] with x < ret may have been modified by this
+ *     function call and should not be further interpreted by the
+ *     application.  The EAL does not take any ownership of the memory used
+ *     for either the argv array, or its members.
  *   - On failure, a negative error value.
  */
 int rte_eal_init(int argc, char **argv);
-- 
2.7.4

^ permalink raw reply related

* [PATCH v1 4/4] doc: add required python versions to coding guidelines
From: John McNamara @ 2016-12-08 15:51 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Add a requirement to support both Python 2 and 3 to the
DPDK Python Coding Standards.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/test/autotest_data.py                | 188 +++++++++++++++----------------
 doc/guides/contributing/coding_style.rst |   3 +-
 2 files changed, 96 insertions(+), 95 deletions(-)

diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 7be345a..0cf4cfd 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -59,46 +59,46 @@ def per_sockets(num):
         "Tests":
         [
             {
-                "Name": "Cycles autotest",
+                "Name":    "Cycles autotest",
                 "Command": "cycles_autotest",
-                "Func": default_autotest,
-                "Report": None,
+                "Func":    default_autotest,
+                "Report":  None,
             },
             {
                 "Name":    "Timer autotest",
-                "Command":     "timer_autotest",
+                "Command": "timer_autotest",
                 "Func":    timer_autotest,
-                "Report":    None,
+                "Report":   None,
             },
             {
                 "Name":    "Debug autotest",
-                "Command":     "debug_autotest",
+                "Command": "debug_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Errno autotest",
-                "Command":     "errno_autotest",
+                "Command": "errno_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Meter autotest",
-                "Command":     "meter_autotest",
+                "Command": "meter_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Common autotest",
-                "Command":     "common_autotest",
+                "Command": "common_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Resource autotest",
-                "Command":    "resource_autotest",
+                "Command": "resource_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -109,51 +109,51 @@ def per_sockets(num):
         [
             {
                 "Name":    "Memory autotest",
-                "Command":    "memory_autotest",
+                "Command": "memory_autotest",
                 "Func":    memory_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Read/write lock autotest",
-                "Command":     "rwlock_autotest",
+                "Command": "rwlock_autotest",
                 "Func":    rwlock_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Logs autotest",
-                "Command":     "logs_autotest",
+                "Command": "logs_autotest",
                 "Func":    logs_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "CPU flags autotest",
-                "Command":     "cpuflags_autotest",
+                "Command": "cpuflags_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Version autotest",
-                "Command":     "version_autotest",
+                "Command": "version_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "EAL filesystem autotest",
-                "Command":     "eal_fs_autotest",
+                "Command": "eal_fs_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "EAL flags autotest",
-                "Command":     "eal_flags_autotest",
+                "Command": "eal_flags_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Hash autotest",
-                "Command":     "hash_autotest",
+                "Command": "hash_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ],
     },
@@ -164,9 +164,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "LPM autotest",
-                "Command":     "lpm_autotest",
+                "Command": "lpm_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "LPM6 autotest",
@@ -176,27 +176,27 @@ def per_sockets(num):
             },
             {
                 "Name":    "Memcpy autotest",
-                "Command":     "memcpy_autotest",
+                "Command": "memcpy_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Memzone autotest",
-                "Command":     "memzone_autotest",
+                "Command": "memzone_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "String autotest",
-                "Command":     "string_autotest",
+                "Command": "string_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Alarm autotest",
-                "Command":    "alarm_autotest",
+                "Command": "alarm_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -207,39 +207,39 @@ def per_sockets(num):
         [
             {
                 "Name":    "PCI autotest",
-                "Command":    "pci_autotest",
+                "Command": "pci_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Malloc autotest",
-                "Command":     "malloc_autotest",
+                "Command": "malloc_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Multi-process autotest",
-                "Command":     "multiprocess_autotest",
+                "Command": "multiprocess_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Mbuf autotest",
-                "Command":     "mbuf_autotest",
+                "Command": "mbuf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Per-lcore autotest",
-                "Command":     "per_lcore_autotest",
+                "Command": "per_lcore_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Ring autotest",
-                "Command":     "ring_autotest",
+                "Command": "ring_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -250,33 +250,33 @@ def per_sockets(num):
         [
             {
                 "Name":    "Spinlock autotest",
-                "Command":     "spinlock_autotest",
+                "Command": "spinlock_autotest",
                 "Func":    spinlock_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Byte order autotest",
-                "Command":     "byteorder_autotest",
+                "Command": "byteorder_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "TAILQ autotest",
-                "Command":     "tailq_autotest",
+                "Command": "tailq_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Command-line autotest",
-                "Command":     "cmdline_autotest",
+                "Command": "cmdline_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Interrupts autotest",
-                "Command":     "interrupt_autotest",
+                "Command": "interrupt_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -287,33 +287,33 @@ def per_sockets(num):
         [
             {
                 "Name":    "Function reentrancy autotest",
-                "Command":     "func_reentrancy_autotest",
+                "Command": "func_reentrancy_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Mempool autotest",
-                "Command":     "mempool_autotest",
+                "Command": "mempool_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Atomics autotest",
-                "Command":     "atomic_autotest",
+                "Command": "atomic_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Prefetch autotest",
-                "Command":     "prefetch_autotest",
+                "Command": "prefetch_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
-                "Name": "Red autotest",
+                "Name":    "Red autotest",
                 "Command": "red_autotest",
-                "Func": default_autotest,
-                "Report": None,
+                "Func":    default_autotest,
+                "Report":  None,
             },
         ]
     },
@@ -324,21 +324,21 @@ def per_sockets(num):
         [
             {
                 "Name":    "PMD ring autotest",
-                "Command":    "ring_pmd_autotest",
+                "Command": "ring_pmd_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
                 "Name":    "Access list control autotest",
-                "Command":     "acl_autotest",
+                "Command": "acl_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
             {
-                "Name": "Sched autotest",
+                "Name":    "Sched autotest",
                 "Command": "sched_autotest",
-                "Func": default_autotest,
-                "Report": None,
+                "Func":    default_autotest,
+                "Report":  None,
             },
         ]
     },
@@ -354,9 +354,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "KNI autotest",
-                "Command":    "kni_autotest",
+                "Command": "kni_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -367,9 +367,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "Mempool performance autotest",
-                "Command":     "mempool_perf_autotest",
+                "Command": "mempool_perf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -380,9 +380,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "Memcpy performance autotest",
-                "Command":     "memcpy_perf_autotest",
+                "Command": "memcpy_perf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -393,9 +393,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "Hash performance autotest",
-                "Command":     "hash_perf_autotest",
+                "Command": "hash_perf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -408,7 +408,7 @@ def per_sockets(num):
                 "Name":       "Power autotest",
                 "Command":    "power_autotest",
                 "Func":       default_autotest,
-                "Report":     None,
+                "Report":      None,
             },
         ]
     },
@@ -445,9 +445,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "Timer performance autotest",
-                "Command":     "timer_perf_autotest",
+                "Command": "timer_perf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
@@ -462,9 +462,9 @@ def per_sockets(num):
         [
             {
                 "Name":    "Ring performance autotest",
-                "Command":     "ring_perf_autotest",
+                "Command": "ring_perf_autotest",
                 "Func":    default_autotest,
-                "Report":    None,
+                "Report":  None,
             },
         ]
     },
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 1eb67f3..4163960 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -690,6 +690,7 @@ Control Statements
 Python Code
 -----------
 
-All python code should be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
+All Python code should work with Python 2.7+ and 3.2+ and be compliant with
+`PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
 
 The ``pep8`` tool can be used for testing compliance with the guidelines.
-- 
2.7.4

^ permalink raw reply related

* [PATCH v1 3/4] app: give python apps a consistent shebang line
From: John McNamara @ 2016-12-08 15:51 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Add a consistent "env python" shebang line to the DPDK Python
apps so that they can call the default system python.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/test/autotest_data.py       | 2 +-
 app/test/autotest_test_funcs.py | 2 +-
 doc/guides/conf.py              | 2 ++
 tools/dpdk-devbind.py           | 3 ++-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 5176064..7be345a 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index c482ea8..1fa8cf0 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 34c62de..97c5d0e 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #   BSD LICENSE
 #   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
 #   All rights reserved.
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index 4f51a4b..a5b2af5 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -1,4 +1,5 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+
 #
 #   BSD LICENSE
 #
-- 
2.7.4

^ permalink raw reply related

* [PATCH v1 2/4] app: make python apps python2/3 compliant
From: John McNamara @ 2016-12-08 15:51 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Make all the DPDK Python apps work with Python 2 or 3 to
allow them to work with whatever is the system default.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/cmdline_test/cmdline_test.py      | 26 ++++++++++++------------
 app/cmdline_test/cmdline_test_data.py |  2 +-
 app/test/autotest.py                  | 10 ++++-----
 app/test/autotest_runner.py           | 37 +++++++++++++++++-----------------
 tools/cpu_layout.py                   | 38 ++++++++++++++++++-----------------
 tools/dpdk-pmdinfo.py                 | 12 ++++++-----
 6 files changed, 64 insertions(+), 61 deletions(-)

diff --git a/app/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py
index 4729987..229f71f 100755
--- a/app/cmdline_test/cmdline_test.py
+++ b/app/cmdline_test/cmdline_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -32,7 +32,7 @@
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Script that runs cmdline_test app and feeds keystrokes into it.
-
+from __future__ import print_function
 import cmdline_test_data
 import os
 import pexpect
@@ -81,38 +81,38 @@ def runHistoryTest(child):
 
 # the path to cmdline_test executable is supplied via command-line.
 if len(sys.argv) < 2:
-    print "Error: please supply cmdline_test app path"
+    print("Error: please supply cmdline_test app path")
     sys.exit(1)
 
 test_app_path = sys.argv[1]
 
 if not os.path.exists(test_app_path):
-    print "Error: please supply cmdline_test app path"
+    print("Error: please supply cmdline_test app path")
     sys.exit(1)
 
 child = pexpect.spawn(test_app_path)
 
-print "Running command-line tests..."
+print("Running command-line tests...")
 for test in cmdline_test_data.tests:
-    print (test["Name"] + ":").ljust(30),
+    testname = (test["Name"] + ":").ljust(30)
     try:
         runTest(child, test)
-        print "PASS"
+        print(testname, "PASS")
     except:
-        print "FAIL"
-        print child
+        print(testname, "FAIL")
+        print(child)
         sys.exit(1)
 
 # since last test quits the app, run new instance
 child = pexpect.spawn(test_app_path)
 
-print ("History fill test:").ljust(30),
+testname = ("History fill test:").ljust(30)
 try:
     runHistoryTest(child)
-    print "PASS"
+    print(testname, "PASS")
 except:
-    print "FAIL"
-    print child
+    print(testname, "FAIL")
+    print(child)
     sys.exit(1)
 child.close()
 sys.exit(0)
diff --git a/app/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py
index 3ce6cbc..9cc966b 100644
--- a/app/cmdline_test/cmdline_test_data.py
+++ b/app/cmdline_test/cmdline_test_data.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
diff --git a/app/test/autotest.py b/app/test/autotest.py
index 3a00538..5c19a02 100644
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -32,15 +32,15 @@
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Script that uses either test app or qemu controlled by python-pexpect
-
+from __future__ import print_function
 import autotest_data
 import autotest_runner
 import sys
 
 
 def usage():
-    print"Usage: autotest.py [test app|test iso image]",
-    print "[target] [whitelist|-blacklist]"
+    print("Usage: autotest.py [test app|test iso image] ",
+          "[target] [whitelist|-blacklist]")
 
 if len(sys.argv) < 3:
     usage()
@@ -63,7 +63,7 @@ def usage():
 
 cmdline = "%s -c f -n 4" % (sys.argv[1])
 
-print cmdline
+print(cmdline)
 
 runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
                                         test_whitelist)
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index 55b63a8..7aeb0bd 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 #   BSD LICENSE
 #
@@ -271,15 +271,16 @@ def __process_results(self, results):
             total_time = int(cur_time - self.start)
 
             # print results, test run time and total time since start
-            print ("%s:" % test_name).ljust(30),
-            print result_str.ljust(29),
-            print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
+            result = ("%s:" % test_name).ljust(30)
+            result += result_str.ljust(29)
+            result += "[%02dm %02ds]" % (test_time / 60, test_time % 60)
 
             # don't print out total time every line, it's the same anyway
             if i == len(results) - 1:
-                print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
+                print(result,
+                      "[%02dm %02ds]" % (total_time / 60, total_time % 60))
             else:
-                print ""
+                print(result)
 
             # if test failed and it wasn't a "start" test
             if test_result < 0 and not i == 0:
@@ -294,7 +295,7 @@ def __process_results(self, results):
                     f = open("%s_%s_report.rst" %
                              (self.target, test_name), "w")
                 except IOError:
-                    print "Report for %s could not be created!" % test_name
+                    print("Report for %s could not be created!" % test_name)
                 else:
                     with f:
                         f.write(report)
@@ -360,12 +361,10 @@ def run_all_tests(self):
         try:
 
             # create table header
-            print ""
-            print "Test name".ljust(30),
-            print "Test result".ljust(29),
-            print "Test".center(9),
-            print "Total".center(9)
-            print "=" * 80
+            print("")
+            print("Test name".ljust(30), "Test result".ljust(29),
+                  "Test".center(9), "Total".center(9))
+            print("=" * 80)
 
             # make a note of tests start time
             self.start = time.time()
@@ -407,11 +406,11 @@ def run_all_tests(self):
             total_time = int(cur_time - self.start)
 
             # print out summary
-            print "=" * 80
-            print "Total run time: %02dm %02ds" % (total_time / 60,
-                                                   total_time % 60)
+            print("=" * 80)
+            print("Total run time: %02dm %02ds" % (total_time / 60,
+                                                   total_time % 60))
             if self.fails != 0:
-                print "Number of failed tests: %s" % str(self.fails)
+                print("Number of failed tests: %s" % str(self.fails))
 
             # write summary to logfile
             self.logfile.write("Summary\n")
@@ -420,8 +419,8 @@ def run_all_tests(self):
             self.logfile.write("Failed tests: ".ljust(
                 15) + "%i\n" % self.fails)
         except:
-            print "Exception occurred"
-            print sys.exc_info()
+            print("Exception occurred")
+            print(sys.exc_info())
             self.fails = 1
 
         # drop logs from all executions to a logfile
diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py
index ccc22ec..0e049a6 100755
--- a/tools/cpu_layout.py
+++ b/tools/cpu_layout.py
@@ -1,4 +1,5 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+
 #
 #   BSD LICENSE
 #
@@ -31,7 +32,7 @@
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-
+from __future__ import print_function
 import sys
 
 sockets = []
@@ -55,7 +56,7 @@
 for core in core_details:
     for field in ["processor", "core id", "physical id"]:
         if field not in core:
-            print "Error getting '%s' value from /proc/cpuinfo" % field
+            print("Error getting '%s' value from /proc/cpuinfo" % field)
             sys.exit(1)
         core[field] = int(core[field])
 
@@ -68,29 +69,30 @@
         core_map[key] = []
     core_map[key].append(core["processor"])
 
-print "============================================================"
-print "Core and Socket Information (as reported by '/proc/cpuinfo')"
-print "============================================================\n"
-print "cores = ", cores
-print "sockets = ", sockets
-print ""
+print("============================================================")
+print("Core and Socket Information (as reported by '/proc/cpuinfo')")
+print("============================================================\n")
+print("cores = ", cores)
+print("sockets = ", sockets)
+print("")
 
 max_processor_len = len(str(len(cores) * len(sockets) * 2 - 1))
 max_core_map_len = max_processor_len * 2 + len('[, ]') + len('Socket ')
 max_core_id_len = len(str(max(cores)))
 
-print " ".ljust(max_core_id_len + len('Core ')),
+output = " ".ljust(max_core_id_len + len('Core '))
 for s in sockets:
-    print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
-print ""
+    output += " Socket %s" % str(s).ljust(max_core_map_len - len('Socket '))
+print(output)
 
-print " ".ljust(max_core_id_len + len('Core ')),
+output = " ".ljust(max_core_id_len + len('Core '))
 for s in sockets:
-    print "--------".ljust(max_core_map_len),
-print ""
+    output += " --------".ljust(max_core_map_len)
+    output += " "
+print(output)
 
 for c in cores:
-    print "Core %s" % str(c).ljust(max_core_id_len),
+    output = "Core %s" % str(c).ljust(max_core_id_len)
     for s in sockets:
-        print str(core_map[(s, c)]).ljust(max_core_map_len),
-    print ""
+        output += " " + str(core_map[(s, c)]).ljust(max_core_map_len)
+    print(output)
diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py
index 3d3ad7d..097982e 100755
--- a/tools/dpdk-pmdinfo.py
+++ b/tools/dpdk-pmdinfo.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
+
 # -------------------------------------------------------------------------
 #
 # Utility to dump PMD_INFO_STRING support from an object file
 #
 # -------------------------------------------------------------------------
+from __future__ import print_function
 import json
 import os
 import platform
@@ -54,7 +56,7 @@ def addDevice(self, deviceStr):
             self.devices[devID] = Device(deviceStr)
 
     def report(self):
-        print self.ID, self.name
+        print(self.ID, self.name)
         for id, dev in self.devices.items():
             dev.report()
 
@@ -80,7 +82,7 @@ def __init__(self, deviceStr):
         self.subdevices = {}
 
     def report(self):
-        print "\t%s\t%s" % (self.ID, self.name)
+        print("\t%s\t%s" % (self.ID, self.name))
         for subID, subdev in self.subdevices.items():
             subdev.report()
 
@@ -126,7 +128,7 @@ def __init__(self, vendor, device, name):
         self.name = name
 
     def report(self):
-        print "\t\t%s\t%s\t%s" % (self.vendorID, self.deviceID, self.name)
+        print("\t\t%s\t%s\t%s" % (self.vendorID, self.deviceID, self.name))
 
 
 class PCIIds:
@@ -154,7 +156,7 @@ def reportVendors(self):
         """Reports the vendors
         """
         for vid, v in self.vendors.items():
-            print v.ID, v.name
+            print(v.ID, v.name)
 
     def report(self, vendor=None):
         """
@@ -185,7 +187,7 @@ def findDate(self, content):
 
     def parse(self):
         if len(self.contents) < 1:
-            print "data/%s-pci.ids not found" % self.date
+            print("data/%s-pci.ids not found" % self.date)
         else:
             vendorID = ""
             deviceID = ""
-- 
2.7.4

^ permalink raw reply related

* [PATCH v1 1/4] app: make python apps pep8 compliant
From: John McNamara @ 2016-12-08 15:51 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara
In-Reply-To: <1481212265-10229-1-git-send-email-john.mcnamara@intel.com>

Make all DPDK python application compliant with the PEP8 standard
to allow for consistency checking of patches and to allow further
refactoring.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 app/cmdline_test/cmdline_test.py                   |  81 +-
 app/cmdline_test/cmdline_test_data.py              | 401 +++++-----
 app/test/autotest.py                               |  40 +-
 app/test/autotest_data.py                          | 829 +++++++++++----------
 app/test/autotest_runner.py                        | 739 +++++++++---------
 app/test/autotest_test_funcs.py                    | 479 ++++++------
 doc/guides/conf.py                                 |   9 +-
 examples/ip_pipeline/config/diagram-generator.py   |  13 +-
 .../ip_pipeline/config/pipeline-to-core-mapping.py |  11 +-
 tools/cpu_layout.py                                |  55 +-
 tools/dpdk-devbind.py                              |  23 +-
 tools/dpdk-pmdinfo.py                              |  61 +-
 12 files changed, 1375 insertions(+), 1366 deletions(-)

diff --git a/app/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py
index 8efc5ea..4729987 100755
--- a/app/cmdline_test/cmdline_test.py
+++ b/app/cmdline_test/cmdline_test.py
@@ -33,16 +33,21 @@
 
 # Script that runs cmdline_test app and feeds keystrokes into it.
 
-import sys, pexpect, string, os, cmdline_test_data
+import cmdline_test_data
+import os
+import pexpect
+import sys
+
 
 #
 # function to run test
 #
-def runTest(child,test):
-	child.send(test["Sequence"])
-	if test["Result"] == None:
-		return 0
-	child.expect(test["Result"],1)
+def runTest(child, test):
+    child.send(test["Sequence"])
+    if test["Result"] is None:
+        return 0
+    child.expect(test["Result"], 1)
+
 
 #
 # history test is a special case
@@ -57,57 +62,57 @@ def runTest(child,test):
 # This is a self-contained test, it needs only a pexpect child
 #
 def runHistoryTest(child):
-	# find out history size
-	child.sendline(cmdline_test_data.CMD_GET_BUFSIZE)
-	child.expect("History buffer size: \\d+", timeout=1)
-	history_size = int(child.after[len(cmdline_test_data.BUFSIZE_TEMPLATE):])
-	i = 0
+    # find out history size
+    child.sendline(cmdline_test_data.CMD_GET_BUFSIZE)
+    child.expect("History buffer size: \\d+", timeout=1)
+    history_size = int(child.after[len(cmdline_test_data.BUFSIZE_TEMPLATE):])
+    i = 0
 
-	# fill the history with numbers
-	while i < history_size / 10:
-		# add 1 to prevent from parsing as octals
-		child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER)
-		# the app will simply print out the number
-		child.expect(str(i + 100000000), timeout=1)
-		i += 1
-	# scroll back history
-	child.send(cmdline_test_data.UP * (i + 2) + cmdline_test_data.ENTER)
-	child.expect("100000000", timeout=1)
+    # fill the history with numbers
+    while i < history_size / 10:
+        # add 1 to prevent from parsing as octals
+        child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER)
+        # the app will simply print out the number
+        child.expect(str(i + 100000000), timeout=1)
+        i += 1
+    # scroll back history
+    child.send(cmdline_test_data.UP * (i + 2) + cmdline_test_data.ENTER)
+    child.expect("100000000", timeout=1)
 
 # the path to cmdline_test executable is supplied via command-line.
 if len(sys.argv) < 2:
-	print "Error: please supply cmdline_test app path"
-	sys.exit(1)
+    print "Error: please supply cmdline_test app path"
+    sys.exit(1)
 
 test_app_path = sys.argv[1]
 
 if not os.path.exists(test_app_path):
-	print "Error: please supply cmdline_test app path"
-	sys.exit(1)
+    print "Error: please supply cmdline_test app path"
+    sys.exit(1)
 
 child = pexpect.spawn(test_app_path)
 
 print "Running command-line tests..."
 for test in cmdline_test_data.tests:
-	print (test["Name"] + ":").ljust(30),
-	try:
-		runTest(child,test)
-		print "PASS"
-	except:
-		print "FAIL"
-		print child
-		sys.exit(1)
+    print (test["Name"] + ":").ljust(30),
+    try:
+        runTest(child, test)
+        print "PASS"
+    except:
+        print "FAIL"
+        print child
+        sys.exit(1)
 
 # since last test quits the app, run new instance
 child = pexpect.spawn(test_app_path)
 
 print ("History fill test:").ljust(30),
 try:
-	runHistoryTest(child)
-	print "PASS"
+    runHistoryTest(child)
+    print "PASS"
 except:
-	print "FAIL"
-	print child
-	sys.exit(1)
+    print "FAIL"
+    print child
+    sys.exit(1)
 child.close()
 sys.exit(0)
diff --git a/app/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py
index b1945a5..3ce6cbc 100644
--- a/app/cmdline_test/cmdline_test_data.py
+++ b/app/cmdline_test/cmdline_test_data.py
@@ -33,8 +33,6 @@
 
 # collection of static data
 
-import sys
-
 # keycode constants
 CTRL_A = chr(1)
 CTRL_B = chr(2)
@@ -95,217 +93,220 @@
 # and expected output (if any).
 
 tests = [
-# test basic commands
-	{"Name" : "command test 1",
-	 "Sequence" : "ambiguous first" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "command test 2",
-	 "Sequence" : "ambiguous second" + ENTER,
-	 "Result" : CMD2},
-	{"Name" : "command test 3",
-	 "Sequence" : "ambiguous ambiguous" + ENTER,
-	 "Result" : AMBIG},
-	{"Name" : "command test 4",
-	 "Sequence" : "ambiguous ambiguous2" + ENTER,
-	 "Result" : AMBIG},
+    # test basic commands
+    {"Name": "command test 1",
+     "Sequence": "ambiguous first" + ENTER,
+     "Result": CMD1},
+    {"Name": "command test 2",
+     "Sequence": "ambiguous second" + ENTER,
+     "Result": CMD2},
+    {"Name": "command test 3",
+     "Sequence": "ambiguous ambiguous" + ENTER,
+     "Result": AMBIG},
+    {"Name": "command test 4",
+     "Sequence": "ambiguous ambiguous2" + ENTER,
+     "Result": AMBIG},
 
-	{"Name" : "invalid command test 1",
-	 "Sequence" : "ambiguous invalid" + ENTER,
-	 "Result" : BAD_ARG},
-# test invalid commands
-	{"Name" : "invalid command test 2",
-	 "Sequence" : "invalid" + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "invalid command test 3",
-	 "Sequence" : "ambiguousinvalid" + ENTER2,
-	 "Result" : NOT_FOUND},
+    {"Name": "invalid command test 1",
+     "Sequence": "ambiguous invalid" + ENTER,
+     "Result": BAD_ARG},
+    # test invalid commands
+    {"Name": "invalid command test 2",
+     "Sequence": "invalid" + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "invalid command test 3",
+     "Sequence": "ambiguousinvalid" + ENTER2,
+     "Result": NOT_FOUND},
 
-# test arrows and deletes
-	{"Name" : "arrows & delete test 1",
-	 "Sequence" : "singlebad" + LEFT*2 + CTRL_B + DEL*3 + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "arrows & delete test 2",
-	 "Sequence" : "singlebad" + LEFT*5 + RIGHT + CTRL_F + DEL*3 + ENTER,
-	 "Result" : SINGLE},
+    # test arrows and deletes
+    {"Name": "arrows & delete test 1",
+     "Sequence": "singlebad" + LEFT*2 + CTRL_B + DEL*3 + ENTER,
+     "Result": SINGLE},
+    {"Name": "arrows & delete test 2",
+     "Sequence": "singlebad" + LEFT*5 + RIGHT + CTRL_F + DEL*3 + ENTER,
+     "Result": SINGLE},
 
-# test backspace
-	{"Name" : "backspace test",
-	 "Sequence" : "singlebad" + BKSPACE*3 + ENTER,
-	 "Result" : SINGLE},
+    # test backspace
+    {"Name": "backspace test",
+     "Sequence": "singlebad" + BKSPACE*3 + ENTER,
+     "Result": SINGLE},
 
-# test goto left and goto right
-	{"Name" : "goto left test",
-	 "Sequence" : "biguous first" + CTRL_A + "am" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "goto right test",
-	 "Sequence" : "biguous fir" + CTRL_A + "am" + CTRL_E + "st" + ENTER,
-	 "Result" : CMD1},
+    # test goto left and goto right
+    {"Name": "goto left test",
+     "Sequence": "biguous first" + CTRL_A + "am" + ENTER,
+     "Result": CMD1},
+    {"Name": "goto right test",
+     "Sequence": "biguous fir" + CTRL_A + "am" + CTRL_E + "st" + ENTER,
+     "Result": CMD1},
 
-# test goto words
-	{"Name" : "goto left word test",
-	 "Sequence" : "ambiguous st" + ALT_B + "fir" + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "goto right word test",
-	 "Sequence" : "ambig first" + CTRL_A + ALT_F + "uous" + ENTER,
-	 "Result" : CMD1},
+    # test goto words
+    {"Name": "goto left word test",
+     "Sequence": "ambiguous st" + ALT_B + "fir" + ENTER,
+     "Result": CMD1},
+    {"Name": "goto right word test",
+     "Sequence": "ambig first" + CTRL_A + ALT_F + "uous" + ENTER,
+     "Result": CMD1},
 
-# test removing words
-	{"Name" : "remove left word 1",
-	 "Sequence" : "single invalid" + CTRL_W + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "remove left word 2",
-	 "Sequence" : "single invalid" + ALT_BKSPACE + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "remove right word",
-	 "Sequence" : "single invalid" + ALT_B + ALT_D + ENTER,
-	 "Result" : SINGLE},
+    # test removing words
+    {"Name": "remove left word 1",
+     "Sequence": "single invalid" + CTRL_W + ENTER,
+     "Result": SINGLE},
+    {"Name": "remove left word 2",
+     "Sequence": "single invalid" + ALT_BKSPACE + ENTER,
+     "Result": SINGLE},
+    {"Name": "remove right word",
+     "Sequence": "single invalid" + ALT_B + ALT_D + ENTER,
+     "Result": SINGLE},
 
-# test kill buffer (copy and paste)
-	{"Name" : "killbuffer test 1",
-	 "Sequence" : "ambiguous" + CTRL_A + CTRL_K + " first" + CTRL_A + CTRL_Y + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "killbuffer test 2",
-	 "Sequence" : "ambiguous" + CTRL_A + CTRL_K + CTRL_Y*26 + ENTER,
-	 "Result" : NOT_FOUND},
+    # test kill buffer (copy and paste)
+    {"Name": "killbuffer test 1",
+     "Sequence": "ambiguous" + CTRL_A + CTRL_K + " first" + CTRL_A +
+                 CTRL_Y + ENTER,
+     "Result": CMD1},
+    {"Name": "killbuffer test 2",
+     "Sequence": "ambiguous" + CTRL_A + CTRL_K + CTRL_Y*26 + ENTER,
+     "Result": NOT_FOUND},
 
-# test newline
-	{"Name" : "newline test",
-	 "Sequence" : "invalid" + CTRL_C + "single" + ENTER,
-	 "Result" : SINGLE},
+    # test newline
+    {"Name": "newline test",
+     "Sequence": "invalid" + CTRL_C + "single" + ENTER,
+     "Result": SINGLE},
 
-# test redisplay (nothing should really happen)
-	{"Name" : "redisplay test",
-	 "Sequence" : "single" + CTRL_L + ENTER,
-	 "Result" : SINGLE},
+    # test redisplay (nothing should really happen)
+    {"Name": "redisplay test",
+     "Sequence": "single" + CTRL_L + ENTER,
+     "Result": SINGLE},
 
-# test autocomplete
-	{"Name" : "autocomplete test 1",
-	 "Sequence" : "si" + TAB + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "autocomplete test 2",
-	 "Sequence" : "si" + TAB + "_" + TAB + ENTER,
-	 "Result" : SINGLE_LONG},
-	{"Name" : "autocomplete test 3",
-	 "Sequence" : "in" + TAB + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "autocomplete test 4",
-	 "Sequence" : "am" + TAB + ENTER,
-	 "Result" : BAD_ARG},
-	{"Name" : "autocomplete test 5",
-	 "Sequence" : "am" + TAB + "fir" + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 6",
-	 "Sequence" : "am" + TAB + "fir" + TAB + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 7",
-	 "Sequence" : "am" + TAB + "fir" + TAB + " " + TAB + ENTER,
-	 "Result" : CMD1},
-	{"Name" : "autocomplete test 8",
-	 "Sequence" : "am" + TAB + "     am" + TAB + "   " + ENTER,
-	 "Result" : AMBIG},
-	{"Name" : "autocomplete test 9",
-	 "Sequence" : "am" + TAB + "inv" + TAB + ENTER,
-	 "Result" : BAD_ARG},
-	{"Name" : "autocomplete test 10",
-	 "Sequence" : "au" + TAB + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "autocomplete test 11",
-	 "Sequence" : "au" + TAB + "1" + ENTER,
-	 "Result" : AUTO1},
-	{"Name" : "autocomplete test 12",
-	 "Sequence" : "au" + TAB + "2" + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 13",
-	 "Sequence" : "au" + TAB + "2" + TAB + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 14",
-	 "Sequence" : "au" + TAB + "2   " + TAB + ENTER,
-	 "Result" : AUTO2},
-	{"Name" : "autocomplete test 15",
-	 "Sequence" : "24" + TAB + ENTER,
-	 "Result" : "24"},
+    # test autocomplete
+    {"Name": "autocomplete test 1",
+     "Sequence": "si" + TAB + ENTER,
+     "Result": SINGLE},
+    {"Name": "autocomplete test 2",
+     "Sequence": "si" + TAB + "_" + TAB + ENTER,
+     "Result": SINGLE_LONG},
+    {"Name": "autocomplete test 3",
+     "Sequence": "in" + TAB + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "autocomplete test 4",
+     "Sequence": "am" + TAB + ENTER,
+     "Result": BAD_ARG},
+    {"Name": "autocomplete test 5",
+     "Sequence": "am" + TAB + "fir" + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 6",
+     "Sequence": "am" + TAB + "fir" + TAB + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 7",
+     "Sequence": "am" + TAB + "fir" + TAB + " " + TAB + ENTER,
+     "Result": CMD1},
+    {"Name": "autocomplete test 8",
+     "Sequence": "am" + TAB + "     am" + TAB + "   " + ENTER,
+     "Result": AMBIG},
+    {"Name": "autocomplete test 9",
+     "Sequence": "am" + TAB + "inv" + TAB + ENTER,
+     "Result": BAD_ARG},
+    {"Name": "autocomplete test 10",
+     "Sequence": "au" + TAB + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "autocomplete test 11",
+     "Sequence": "au" + TAB + "1" + ENTER,
+     "Result": AUTO1},
+    {"Name": "autocomplete test 12",
+     "Sequence": "au" + TAB + "2" + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 13",
+     "Sequence": "au" + TAB + "2" + TAB + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 14",
+     "Sequence": "au" + TAB + "2   " + TAB + ENTER,
+     "Result": AUTO2},
+    {"Name": "autocomplete test 15",
+     "Sequence": "24" + TAB + ENTER,
+     "Result": "24"},
 
-# test history
-	{"Name" : "history test 1",
-	 "Sequence" : "invalid" + ENTER + "single" + ENTER + "invalid" + ENTER + UP + CTRL_P + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "history test 2",
-	 "Sequence" : "invalid" + ENTER + "ambiguous first" + ENTER + "invalid" + ENTER + "single" + ENTER + UP * 3 + CTRL_N + DOWN + ENTER,
-	 "Result" : SINGLE},
+    # test history
+    {"Name": "history test 1",
+     "Sequence": "invalid" + ENTER + "single" + ENTER + "invalid" +
+                 ENTER + UP + CTRL_P + ENTER,
+     "Result": SINGLE},
+    {"Name": "history test 2",
+     "Sequence": "invalid" + ENTER + "ambiguous first" + ENTER + "invalid" +
+                 ENTER + "single" + ENTER + UP * 3 + CTRL_N + DOWN + ENTER,
+     "Result": SINGLE},
 
-#
-# tests that improve coverage
-#
+    #
+    # tests that improve coverage
+    #
 
-# empty space tests
-	{"Name" : "empty space test 1",
-	 "Sequence" : RIGHT + LEFT + CTRL_B + CTRL_F + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 2",
-	 "Sequence" : BKSPACE + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 3",
-	 "Sequence" : CTRL_E*2 + CTRL_A*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 4",
-	 "Sequence" : ALT_F*2 + ALT_B*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 5",
-	 "Sequence" : " " + CTRL_E*2 + CTRL_A*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 6",
-	 "Sequence" : " " + CTRL_A + ALT_F*2 + ALT_B*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 7",
-	 "Sequence" : "  " + CTRL_A + CTRL_D + CTRL_E + CTRL_D + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 8",
-	 "Sequence" : " space" + CTRL_W*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 9",
-	 "Sequence" : " space" + ALT_BKSPACE*2 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "empty space test 10",
-	 "Sequence" : " space " + CTRL_A + ALT_D*3 + ENTER,
-	 "Result" : PROMPT},
+    # empty space tests
+    {"Name": "empty space test 1",
+     "Sequence": RIGHT + LEFT + CTRL_B + CTRL_F + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 2",
+     "Sequence": BKSPACE + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 3",
+     "Sequence": CTRL_E*2 + CTRL_A*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 4",
+     "Sequence": ALT_F*2 + ALT_B*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 5",
+     "Sequence": " " + CTRL_E*2 + CTRL_A*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 6",
+     "Sequence": " " + CTRL_A + ALT_F*2 + ALT_B*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 7",
+     "Sequence": "  " + CTRL_A + CTRL_D + CTRL_E + CTRL_D + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 8",
+     "Sequence": " space" + CTRL_W*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 9",
+     "Sequence": " space" + ALT_BKSPACE*2 + ENTER,
+     "Result": PROMPT},
+    {"Name": "empty space test 10",
+     "Sequence": " space " + CTRL_A + ALT_D*3 + ENTER,
+     "Result": PROMPT},
 
-# non-printable char tests
-	{"Name" : "non-printable test 1",
-	 "Sequence" : chr(27) + chr(47) + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "non-printable test 2",
-	 "Sequence" : chr(27) + chr(128) + ENTER*7,
-	 "Result" : PROMPT},
-	{"Name" : "non-printable test 3",
-	 "Sequence" : chr(27) + chr(91) + chr(127) + ENTER*6,
-	 "Result" : PROMPT},
+    # non-printable char tests
+    {"Name": "non-printable test 1",
+     "Sequence": chr(27) + chr(47) + ENTER,
+     "Result": PROMPT},
+    {"Name": "non-printable test 2",
+     "Sequence": chr(27) + chr(128) + ENTER*7,
+     "Result": PROMPT},
+    {"Name": "non-printable test 3",
+     "Sequence": chr(27) + chr(91) + chr(127) + ENTER*6,
+     "Result": PROMPT},
 
-# miscellaneous tests
-	{"Name" : "misc test 1",
-	 "Sequence" : ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 2",
-	 "Sequence" : "single #comment" + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 3",
-	 "Sequence" : "#empty line" + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 4",
-	 "Sequence" : "   single  " + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 5",
-	 "Sequence" : "single#" + ENTER,
-	 "Result" : SINGLE},
-	{"Name" : "misc test 6",
-	 "Sequence" : 'a' * 257 + ENTER,
-	 "Result" : NOT_FOUND},
-	{"Name" : "misc test 7",
-	 "Sequence" : "clear_history" + UP*5 + DOWN*5 + ENTER,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 8",
-	 "Sequence" : "a" + HELP + CTRL_C,
-	 "Result" : PROMPT},
-	{"Name" : "misc test 9",
-	 "Sequence" : CTRL_D*3,
-	 "Result" : None},
+    # miscellaneous tests
+    {"Name": "misc test 1",
+     "Sequence": ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 2",
+     "Sequence": "single #comment" + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 3",
+     "Sequence": "#empty line" + ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 4",
+     "Sequence": "   single  " + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 5",
+     "Sequence": "single#" + ENTER,
+     "Result": SINGLE},
+    {"Name": "misc test 6",
+     "Sequence": 'a' * 257 + ENTER,
+     "Result": NOT_FOUND},
+    {"Name": "misc test 7",
+     "Sequence": "clear_history" + UP*5 + DOWN*5 + ENTER,
+     "Result": PROMPT},
+    {"Name": "misc test 8",
+     "Sequence": "a" + HELP + CTRL_C,
+     "Result": PROMPT},
+    {"Name": "misc test 9",
+     "Sequence": CTRL_D*3,
+     "Result": None},
 ]
diff --git a/app/test/autotest.py b/app/test/autotest.py
index b9fd6b6..3a00538 100644
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -33,44 +33,46 @@
 
 # Script that uses either test app or qemu controlled by python-pexpect
 
-import sys, autotest_data, autotest_runner
-
+import autotest_data
+import autotest_runner
+import sys
 
 
 def usage():
-	print"Usage: autotest.py [test app|test iso image]",
-	print "[target] [whitelist|-blacklist]"
+    print"Usage: autotest.py [test app|test iso image]",
+    print "[target] [whitelist|-blacklist]"
 
 if len(sys.argv) < 3:
-	usage()
-	sys.exit(1)
+    usage()
+    sys.exit(1)
 
 target = sys.argv[2]
 
-test_whitelist=None
-test_blacklist=None
+test_whitelist = None
+test_blacklist = None
 
 # get blacklist/whitelist
 if len(sys.argv) > 3:
-	testlist = sys.argv[3].split(',')
-	testlist = [test.lower() for test in testlist]
-	if testlist[0].startswith('-'):
-		testlist[0] = testlist[0].lstrip('-')
-		test_blacklist = testlist
-	else:
-		test_whitelist = testlist
+    testlist = sys.argv[3].split(',')
+    testlist = [test.lower() for test in testlist]
+    if testlist[0].startswith('-'):
+        testlist[0] = testlist[0].lstrip('-')
+        test_blacklist = testlist
+    else:
+        test_whitelist = testlist
 
-cmdline  = "%s -c f -n 4"%(sys.argv[1])
+cmdline = "%s -c f -n 4" % (sys.argv[1])
 
 print cmdline
 
-runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist, test_whitelist)
+runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,
+                                        test_whitelist)
 
 for test_group in autotest_data.parallel_test_group_list:
-	runner.add_parallel_test_group(test_group)
+    runner.add_parallel_test_group(test_group)
 
 for test_group in autotest_data.non_parallel_test_group_list:
-	runner.add_non_parallel_test_group(test_group)
+    runner.add_non_parallel_test_group(test_group)
 
 num_fails = runner.run_all_tests()
 
diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 9e8fd94..5176064 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -36,12 +36,14 @@
 from glob import glob
 from autotest_test_funcs import *
 
+
 # quick and dirty function to find out number of sockets
 def num_sockets():
-	result = len(glob("/sys/devices/system/node/node*"))
-	if result == 0:
-		return 1
-	return result
+    result = len(glob("/sys/devices/system/node/node*"))
+    if result == 0:
+        return 1
+    return result
+
 
 # Assign given number to each socket
 # e.g. 32 becomes 32,32 or 32,32,32,32
@@ -51,420 +53,419 @@ def per_sockets(num):
 # groups of tests that can be run in parallel
 # the grouping has been found largely empirically
 parallel_test_group_list = [
-
-{
-	"Prefix":	"group_1",
-	"Memory" :	per_sockets(8),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Cycles autotest",
-		 "Command" : 	"cycles_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Timer autotest",
-		 "Command" : 	"timer_autotest",
-		 "Func" :	timer_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Debug autotest",
-		 "Command" : 	"debug_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Errno autotest",
-		 "Command" : 	"errno_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Meter autotest",
-		 "Command" : 	"meter_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Common autotest",
-		 "Command" : 	"common_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Resource autotest",
-		 "Command" :	"resource_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_2",
-	"Memory" :	"16",
-	"Tests" :
-	[
-		{
-		 "Name" :	"Memory autotest",
-		 "Command" :	"memory_autotest",
-		 "Func" :	memory_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Read/write lock autotest",
-		 "Command" : 	"rwlock_autotest",
-		 "Func" :	rwlock_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Logs autotest",
-		 "Command" : 	"logs_autotest",
-		 "Func" :	logs_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"CPU flags autotest",
-		 "Command" : 	"cpuflags_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Version autotest",
-		 "Command" : 	"version_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"EAL filesystem autotest",
-		 "Command" : 	"eal_fs_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"EAL flags autotest",
-		 "Command" : 	"eal_flags_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Hash autotest",
-		 "Command" : 	"hash_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	],
-},
-{
-	"Prefix":	"group_3",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"LPM autotest",
-		 "Command" : 	"lpm_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-			"Name" :    "LPM6 autotest",
-			"Command" : "lpm6_autotest",
-			"Func" :    default_autotest,
-			"Report" :  None,
-		},
-		{
-		 "Name" :	"Memcpy autotest",
-		 "Command" : 	"memcpy_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Memzone autotest",
-		 "Command" : 	"memzone_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"String autotest",
-		 "Command" : 	"string_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Alarm autotest",
-		 "Command" :	"alarm_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_4",
-	"Memory" :	per_sockets(128),
-	"Tests" :
-	[
-		{
-		 "Name" :	"PCI autotest",
-		 "Command" :	"pci_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Malloc autotest",
-		 "Command" : 	"malloc_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Multi-process autotest",
-		 "Command" : 	"multiprocess_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Mbuf autotest",
-		 "Command" : 	"mbuf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Per-lcore autotest",
-		 "Command" : 	"per_lcore_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Ring autotest",
-		 "Command" : 	"ring_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_5",
-	"Memory" :	"32",
-	"Tests" :
-	[
-		{
-		 "Name" :	"Spinlock autotest",
-		 "Command" : 	"spinlock_autotest",
-		 "Func" :	spinlock_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Byte order autotest",
-		 "Command" : 	"byteorder_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"TAILQ autotest",
-		 "Command" : 	"tailq_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Command-line autotest",
-		 "Command" : 	"cmdline_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Interrupts autotest",
-		 "Command" : 	"interrupt_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"group_6",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Function reentrancy autotest",
-		 "Command" : 	"func_reentrancy_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Mempool autotest",
-		 "Command" : 	"mempool_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Atomics autotest",
-		 "Command" : 	"atomic_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Prefetch autotest",
-		 "Command" : 	"prefetch_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		 },
-		{
-		 "Name" :"Red autotest",
-		 "Command" : "red_autotest",
-		 "Func" :default_autotest,
-		 "Report" :None,
-		 },
-	]
-},
-{
-	"Prefix" :	"group_7",
-	"Memory" :	"64",
-	"Tests" :
-	[
-		{
-		 "Name" :	"PMD ring autotest",
-		 "Command" :	"ring_pmd_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		{
-		 "Name" :	"Access list control autotest",
-		 "Command" : 	"acl_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-		 {
-		 "Name" :"Sched autotest",
-		 "Command" : "sched_autotest",
-		 "Func" :default_autotest,
-		 "Report" :None,
-		 },
-	]
-},
+    {
+        "Prefix":    "group_1",
+        "Memory":    per_sockets(8),
+        "Tests":
+        [
+            {
+                "Name": "Cycles autotest",
+                "Command": "cycles_autotest",
+                "Func": default_autotest,
+                "Report": None,
+            },
+            {
+                "Name":    "Timer autotest",
+                "Command":     "timer_autotest",
+                "Func":    timer_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Debug autotest",
+                "Command":     "debug_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Errno autotest",
+                "Command":     "errno_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Meter autotest",
+                "Command":     "meter_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Common autotest",
+                "Command":     "common_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Resource autotest",
+                "Command":    "resource_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_2",
+        "Memory":    "16",
+        "Tests":
+        [
+            {
+                "Name":    "Memory autotest",
+                "Command":    "memory_autotest",
+                "Func":    memory_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Read/write lock autotest",
+                "Command":     "rwlock_autotest",
+                "Func":    rwlock_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Logs autotest",
+                "Command":     "logs_autotest",
+                "Func":    logs_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "CPU flags autotest",
+                "Command":     "cpuflags_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Version autotest",
+                "Command":     "version_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "EAL filesystem autotest",
+                "Command":     "eal_fs_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "EAL flags autotest",
+                "Command":     "eal_flags_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Hash autotest",
+                "Command":     "hash_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ],
+    },
+    {
+        "Prefix":    "group_3",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "LPM autotest",
+                "Command":     "lpm_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "LPM6 autotest",
+                "Command": "lpm6_autotest",
+                "Func":    default_autotest,
+                "Report":  None,
+            },
+            {
+                "Name":    "Memcpy autotest",
+                "Command":     "memcpy_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Memzone autotest",
+                "Command":     "memzone_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "String autotest",
+                "Command":     "string_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Alarm autotest",
+                "Command":    "alarm_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_4",
+        "Memory":    per_sockets(128),
+        "Tests":
+        [
+            {
+                "Name":    "PCI autotest",
+                "Command":    "pci_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Malloc autotest",
+                "Command":     "malloc_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Multi-process autotest",
+                "Command":     "multiprocess_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Mbuf autotest",
+                "Command":     "mbuf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Per-lcore autotest",
+                "Command":     "per_lcore_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Ring autotest",
+                "Command":     "ring_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_5",
+        "Memory":    "32",
+        "Tests":
+        [
+            {
+                "Name":    "Spinlock autotest",
+                "Command":     "spinlock_autotest",
+                "Func":    spinlock_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Byte order autotest",
+                "Command":     "byteorder_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "TAILQ autotest",
+                "Command":     "tailq_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Command-line autotest",
+                "Command":     "cmdline_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Interrupts autotest",
+                "Command":     "interrupt_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_6",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Function reentrancy autotest",
+                "Command":     "func_reentrancy_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Mempool autotest",
+                "Command":     "mempool_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Atomics autotest",
+                "Command":     "atomic_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Prefetch autotest",
+                "Command":     "prefetch_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name": "Red autotest",
+                "Command": "red_autotest",
+                "Func": default_autotest,
+                "Report": None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "group_7",
+        "Memory":    "64",
+        "Tests":
+        [
+            {
+                "Name":    "PMD ring autotest",
+                "Command":    "ring_pmd_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name":    "Access list control autotest",
+                "Command":     "acl_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+            {
+                "Name": "Sched autotest",
+                "Command": "sched_autotest",
+                "Func": default_autotest,
+                "Report": None,
+            },
+        ]
+    },
 ]
 
 # tests that should not be run when any other tests are running
 non_parallel_test_group_list = [
 
-{
-	"Prefix" :	"kni",
-	"Memory" :	"512",
-	"Tests" :
-	[
-		{
-		 "Name" :	"KNI autotest",
-		 "Command" :	"kni_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"mempool_perf",
-	"Memory" :	per_sockets(256),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Mempool performance autotest",
-		 "Command" : 	"mempool_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"memcpy_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Memcpy performance autotest",
-		 "Command" : 	"memcpy_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix":	"hash_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Hash performance autotest",
-		 "Command" : 	"hash_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
-{
-	"Prefix" :      "power",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power autotest",
-		 "Command" :    "power_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix" :      "power_acpi_cpufreq",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power ACPI cpufreq autotest",
-		 "Command" :    "power_acpi_cpufreq_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix" :      "power_kvm_vm",
-	"Memory" :      "16",
-	"Tests" :
-	[
-		{
-		 "Name" :       "Power KVM VM  autotest",
-		 "Command" :    "power_kvm_vm_autotest",
-		 "Func" :       default_autotest,
-		 "Report" :     None,
-		},
-	]
-},
-{
-	"Prefix":	"timer_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Timer performance autotest",
-		 "Command" : 	"timer_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
+    {
+        "Prefix":    "kni",
+        "Memory":    "512",
+        "Tests":
+        [
+            {
+                "Name":    "KNI autotest",
+                "Command":    "kni_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "mempool_perf",
+        "Memory":    per_sockets(256),
+        "Tests":
+        [
+            {
+                "Name":    "Mempool performance autotest",
+                "Command":     "mempool_perf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "memcpy_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Memcpy performance autotest",
+                "Command":     "memcpy_perf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "hash_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Hash performance autotest",
+                "Command":     "hash_perf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power autotest",
+                "Command":    "power_autotest",
+                "Func":       default_autotest,
+                "Report":     None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power_acpi_cpufreq",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power ACPI cpufreq autotest",
+                "Command":    "power_acpi_cpufreq_autotest",
+                "Func":       default_autotest,
+                "Report":     None,
+            },
+        ]
+    },
+    {
+        "Prefix":      "power_kvm_vm",
+        "Memory":      "16",
+        "Tests":
+        [
+            {
+                "Name":       "Power KVM VM  autotest",
+                "Command":    "power_kvm_vm_autotest",
+                "Func":       default_autotest,
+                "Report":     None,
+            },
+        ]
+    },
+    {
+        "Prefix":    "timer_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Timer performance autotest",
+                "Command":     "timer_perf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
 
-#
-# Please always make sure that ring_perf is the last test!
-#
-{
-	"Prefix":	"ring_perf",
-	"Memory" :	per_sockets(512),
-	"Tests" :
-	[
-		{
-		 "Name" :	"Ring performance autotest",
-		 "Command" : 	"ring_perf_autotest",
-		 "Func" :	default_autotest,
-		 "Report" :	None,
-		},
-	]
-},
+    #
+    # Please always make sure that ring_perf is the last test!
+    #
+    {
+        "Prefix":    "ring_perf",
+        "Memory":    per_sockets(512),
+        "Tests":
+        [
+            {
+                "Name":    "Ring performance autotest",
+                "Command":     "ring_perf_autotest",
+                "Func":    default_autotest,
+                "Report":    None,
+            },
+        ]
+    },
 ]
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index 21d3be2..55b63a8 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -33,20 +33,29 @@
 
 # The main logic behind running autotests in parallel
 
-import multiprocessing, subprocess, sys, pexpect, re, time, os, StringIO, csv
+import StringIO
+import csv
+import multiprocessing
+import pexpect
+import re
+import subprocess
+import sys
+import time
 
 # wait for prompt
+
+
 def wait_prompt(child):
-	try:
-		child.sendline()
-		result = child.expect(["RTE>>", pexpect.TIMEOUT, pexpect.EOF],
-			timeout = 120)
-	except:
-		return False
-	if result == 0:
-		return True
-	else:
-		return False
+    try:
+        child.sendline()
+        result = child.expect(["RTE>>", pexpect.TIMEOUT, pexpect.EOF],
+                              timeout=120)
+    except:
+        return False
+    if result == 0:
+        return True
+    else:
+        return False
 
 # run a test group
 # each result tuple in results list consists of:
@@ -60,363 +69,363 @@ def wait_prompt(child):
 # this function needs to be outside AutotestRunner class
 # because otherwise Pool won't work (or rather it will require
 # quite a bit of effort to make it work).
-def run_test_group(cmdline, test_group):
-	results = []
-	child = None
-	start_time = time.time()
-	startuplog = None
-
-	# run test app
-	try:
-		# prepare logging of init
-		startuplog = StringIO.StringIO()
-
-		print >>startuplog, "\n%s %s\n" % ("="*20, test_group["Prefix"])
-		print >>startuplog, "\ncmdline=%s" % cmdline
-
-		child = pexpect.spawn(cmdline, logfile=startuplog)
-
-		# wait for target to boot
-		if not wait_prompt(child):
-			child.close()
-
-			results.append((-1, "Fail [No prompt]", "Start %s" % test_group["Prefix"],
-				time.time() - start_time, startuplog.getvalue(), None))
-
-			# mark all tests as failed
-			for test in test_group["Tests"]:
-				results.append((-1, "Fail [No prompt]", test["Name"],
-				time.time() - start_time, "", None))
-			# exit test
-			return results
-
-	except:
-		results.append((-1, "Fail [Can't run]", "Start %s" % test_group["Prefix"],
-				time.time() - start_time, startuplog.getvalue(), None))
-
-		# mark all tests as failed
-		for t in test_group["Tests"]:
-			results.append((-1, "Fail [Can't run]", t["Name"],
-				time.time() - start_time, "", None))
-		# exit test
-		return results
-
-	# startup was successful
-	results.append((0, "Success", "Start %s" % test_group["Prefix"],
-		time.time() - start_time, startuplog.getvalue(), None))
-
-	# parse the binary for available test commands
-	binary = cmdline.split()[0]
-	stripped = 'not stripped' not in subprocess.check_output(['file', binary])
-	if not stripped:
-		symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
-		avail_cmds = re.findall('test_register_(\w+)', symbols)
-
-	# run all tests in test group
-	for test in test_group["Tests"]:
-
-		# create log buffer for each test
-		# in multiprocessing environment, the logging would be
-		# interleaved and will create a mess, hence the buffering
-		logfile = StringIO.StringIO()
-		child.logfile = logfile
-
-		result = ()
-
-		# make a note when the test started
-		start_time = time.time()
-
-		try:
-			# print test name to log buffer
-			print >>logfile, "\n%s %s\n" % ("-"*20, test["Name"])
-
-			# run test function associated with the test
-			if stripped or test["Command"] in avail_cmds:
-				result = test["Func"](child, test["Command"])
-			else:
-				result = (0, "Skipped [Not Available]")
-
-			# make a note when the test was finished
-			end_time = time.time()
-
-			# append test data to the result tuple
-			result += (test["Name"], end_time - start_time,
-				logfile.getvalue())
-
-			# call report function, if any defined, and supply it with
-			# target and complete log for test run
-			if test["Report"]:
-				report = test["Report"](self.target, log)
-
-				# append report to results tuple
-				result += (report,)
-			else:
-				# report is None
-				result += (None,)
-		except:
-			# make a note when the test crashed
-			end_time = time.time()
-
-			# mark test as failed
-			result = (-1, "Fail [Crash]", test["Name"],
-				end_time - start_time, logfile.getvalue(), None)
-		finally:
-			# append the results to the results list
-			results.append(result)
-
-	# regardless of whether test has crashed, try quitting it
-	try:
-		child.sendline("quit")
-		child.close()
-	# if the test crashed, just do nothing instead
-	except:
-		# nop
-		pass
-
-	# return test results
-	return results
-
 
 
+def run_test_group(cmdline, test_group):
+    results = []
+    child = None
+    start_time = time.time()
+    startuplog = None
+
+    # run test app
+    try:
+        # prepare logging of init
+        startuplog = StringIO.StringIO()
+
+        print >>startuplog, "\n%s %s\n" % ("=" * 20, test_group["Prefix"])
+        print >>startuplog, "\ncmdline=%s" % cmdline
+
+        child = pexpect.spawn(cmdline, logfile=startuplog)
+
+        # wait for target to boot
+        if not wait_prompt(child):
+            child.close()
+
+            results.append((-1,
+                            "Fail [No prompt]",
+                            "Start %s" % test_group["Prefix"],
+                            time.time() - start_time,
+                            startuplog.getvalue(),
+                            None))
+
+            # mark all tests as failed
+            for test in test_group["Tests"]:
+                results.append((-1, "Fail [No prompt]", test["Name"],
+                                time.time() - start_time, "", None))
+            # exit test
+            return results
+
+    except:
+        results.append((-1,
+                        "Fail [Can't run]",
+                        "Start %s" % test_group["Prefix"],
+                        time.time() - start_time,
+                        startuplog.getvalue(),
+                        None))
+
+        # mark all tests as failed
+        for t in test_group["Tests"]:
+            results.append((-1, "Fail [Can't run]", t["Name"],
+                            time.time() - start_time, "", None))
+        # exit test
+        return results
+
+    # startup was successful
+    results.append((0, "Success", "Start %s" % test_group["Prefix"],
+                    time.time() - start_time, startuplog.getvalue(), None))
+
+    # parse the binary for available test commands
+    binary = cmdline.split()[0]
+    stripped = 'not stripped' not in subprocess.check_output(['file', binary])
+    if not stripped:
+        symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
+        avail_cmds = re.findall('test_register_(\w+)', symbols)
+
+    # run all tests in test group
+    for test in test_group["Tests"]:
+
+        # create log buffer for each test
+        # in multiprocessing environment, the logging would be
+        # interleaved and will create a mess, hence the buffering
+        logfile = StringIO.StringIO()
+        child.logfile = logfile
+
+        result = ()
+
+        # make a note when the test started
+        start_time = time.time()
+
+        try:
+            # print test name to log buffer
+            print >>logfile, "\n%s %s\n" % ("-" * 20, test["Name"])
+
+            # run test function associated with the test
+            if stripped or test["Command"] in avail_cmds:
+                result = test["Func"](child, test["Command"])
+            else:
+                result = (0, "Skipped [Not Available]")
+
+            # make a note when the test was finished
+            end_time = time.time()
+
+            # append test data to the result tuple
+            result += (test["Name"], end_time - start_time,
+                       logfile.getvalue())
+
+            # call report function, if any defined, and supply it with
+            # target and complete log for test run
+            if test["Report"]:
+                report = test["Report"](self.target, log)
+
+                # append report to results tuple
+                result += (report,)
+            else:
+                # report is None
+                result += (None,)
+        except:
+            # make a note when the test crashed
+            end_time = time.time()
+
+            # mark test as failed
+            result = (-1, "Fail [Crash]", test["Name"],
+                      end_time - start_time, logfile.getvalue(), None)
+        finally:
+            # append the results to the results list
+            results.append(result)
+
+    # regardless of whether test has crashed, try quitting it
+    try:
+        child.sendline("quit")
+        child.close()
+    # if the test crashed, just do nothing instead
+    except:
+        # nop
+        pass
+
+    # return test results
+    return results
 
 
 # class representing an instance of autotests run
 class AutotestRunner:
-	cmdline = ""
-	parallel_test_groups = []
-	non_parallel_test_groups = []
-	logfile = None
-	csvwriter = None
-	target = ""
-	start = None
-	n_tests = 0
-	fails = 0
-	log_buffers = []
-	blacklist = []
-	whitelist = []
-
-
-	def __init__(self, cmdline, target, blacklist, whitelist):
-		self.cmdline = cmdline
-		self.target = target
-		self.blacklist = blacklist
-		self.whitelist = whitelist
-
-		# log file filename
-		logfile = "%s.log" % target
-		csvfile = "%s.csv" % target
-
-		self.logfile = open(logfile, "w")
-		csvfile = open(csvfile, "w")
-		self.csvwriter = csv.writer(csvfile)
-
-		# prepare results table
-		self.csvwriter.writerow(["test_name","test_result","result_str"])
-
-
-
-	# set up cmdline string
-	def __get_cmdline(self, test):
-		cmdline = self.cmdline
-
-		# append memory limitations for each test
-		# otherwise tests won't run in parallel
-		if not "i686" in self.target:
-			cmdline += " --socket-mem=%s"% test["Memory"]
-		else:
-			# affinitize startup so that tests don't fail on i686
-			cmdline = "taskset 1 " + cmdline
-			cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
-
-		# set group prefix for autotest group
-		# otherwise they won't run in parallel
-		cmdline += " --file-prefix=%s"% test["Prefix"]
-
-		return cmdline
-
-
-
-	def add_parallel_test_group(self,test_group):
-		self.parallel_test_groups.append(test_group)
-
-	def add_non_parallel_test_group(self,test_group):
-		self.non_parallel_test_groups.append(test_group)
-
-
-	def __process_results(self, results):
-		# this iterates over individual test results
-		for i, result in enumerate(results):
-
-			# increase total number of tests that were run
-			# do not include "start" test
-			if i > 0:
-				self.n_tests += 1
-
-			# unpack result tuple
-			test_result, result_str, test_name, \
-				test_time, log, report = result
-
-			# get total run time
-			cur_time = time.time()
-			total_time = int(cur_time - self.start)
-
-			# print results, test run time and total time since start
-			print ("%s:" % test_name).ljust(30),
-			print result_str.ljust(29),
-			print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
-
-			# don't print out total time every line, it's the same anyway
-			if i == len(results) - 1:
-				print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
-			else:
-				print ""
-
-			# if test failed and it wasn't a "start" test
-			if test_result < 0 and not i == 0:
-				self.fails += 1
-
-			# collect logs
-			self.log_buffers.append(log)
-
-			# create report if it exists
-			if report:
-				try:
-					f = open("%s_%s_report.rst" % (self.target,test_name), "w")
-				except IOError:
-					print "Report for %s could not be created!" % test_name
-				else:
-					with f:
-						f.write(report)
-
-			# write test result to CSV file
-			if i != 0:
-				self.csvwriter.writerow([test_name, test_result, result_str])
-
-
-
-
-	# this function iterates over test groups and removes each
-	# test that is not in whitelist/blacklist
-	def __filter_groups(self, test_groups):
-		groups_to_remove = []
-
-		# filter out tests from parallel test groups
-		for i, test_group in enumerate(test_groups):
-
-			# iterate over a copy so that we could safely delete individual tests
-			for test in test_group["Tests"][:]:
-				test_id = test["Command"]
-
-				# dump tests are specified in full e.g. "Dump_mempool"
-				if "_autotest" in test_id:
-					test_id = test_id[:-len("_autotest")]
-
-				# filter out blacklisted/whitelisted tests
-				if self.blacklist and test_id in self.blacklist:
-					test_group["Tests"].remove(test)
-					continue
-				if self.whitelist and test_id not in self.whitelist:
-					test_group["Tests"].remove(test)
-					continue
-
-			# modify or remove original group
-			if len(test_group["Tests"]) > 0:
-				test_groups[i] = test_group
-			else:
-				# remember which groups should be deleted
-				# put the numbers backwards so that we start
-				# deleting from the end, not from the beginning
-				groups_to_remove.insert(0, i)
-
-		# remove test groups that need to be removed
-		for i in groups_to_remove:
-			del test_groups[i]
-
-		return test_groups
-
-
-
-	# iterate over test groups and run tests associated with them
-	def run_all_tests(self):
-		# filter groups
-		self.parallel_test_groups = \
-			self.__filter_groups(self.parallel_test_groups)
-		self.non_parallel_test_groups = \
-			self.__filter_groups(self.non_parallel_test_groups)
-
-		# create a pool of worker threads
-		pool = multiprocessing.Pool(processes=1)
-
-		results = []
-
-		# whatever happens, try to save as much logs as possible
-		try:
-
-			# create table header
-			print ""
-			print "Test name".ljust(30),
-			print "Test result".ljust(29),
-			print "Test".center(9),
-			print "Total".center(9)
-			print "=" * 80
-
-			# make a note of tests start time
-			self.start = time.time()
-
-			# assign worker threads to run test groups
-			for test_group in self.parallel_test_groups:
-				result = pool.apply_async(run_test_group,
-					[self.__get_cmdline(test_group), test_group])
-				results.append(result)
-
-			# iterate while we have group execution results to get
-			while len(results) > 0:
-
-				# iterate over a copy to be able to safely delete results
-				# this iterates over a list of group results
-				for group_result in results[:]:
-
-					# if the thread hasn't finished yet, continue
-					if not group_result.ready():
-						continue
-
-					res = group_result.get()
-
-					self.__process_results(res)
-
-					# remove result from results list once we're done with it
-					results.remove(group_result)
-
-			# run non_parallel tests. they are run one by one, synchronously
-			for test_group in self.non_parallel_test_groups:
-				group_result = run_test_group(self.__get_cmdline(test_group), test_group)
-
-				self.__process_results(group_result)
-
-			# get total run time
-			cur_time = time.time()
-			total_time = int(cur_time - self.start)
-
-			# print out summary
-			print "=" * 80
-			print "Total run time: %02dm %02ds" % (total_time / 60, total_time % 60)
-			if self.fails != 0:
-				print "Number of failed tests: %s" % str(self.fails)
-
-			# write summary to logfile
-			self.logfile.write("Summary\n")
-			self.logfile.write("Target: ".ljust(15) + "%s\n" % self.target)
-			self.logfile.write("Tests: ".ljust(15) + "%i\n" % self.n_tests)
-			self.logfile.write("Failed tests: ".ljust(15) + "%i\n" % self.fails)
-		except:
-			print "Exception occured"
-			print sys.exc_info()
-			self.fails = 1
-
-		# drop logs from all executions to a logfile
-		for buf in self.log_buffers:
-			self.logfile.write(buf.replace("\r",""))
-
-		log_buffers = []
-
-		return self.fails
+    cmdline = ""
+    parallel_test_groups = []
+    non_parallel_test_groups = []
+    logfile = None
+    csvwriter = None
+    target = ""
+    start = None
+    n_tests = 0
+    fails = 0
+    log_buffers = []
+    blacklist = []
+    whitelist = []
+
+    def __init__(self, cmdline, target, blacklist, whitelist):
+        self.cmdline = cmdline
+        self.target = target
+        self.blacklist = blacklist
+        self.whitelist = whitelist
+
+        # log file filename
+        logfile = "%s.log" % target
+        csvfile = "%s.csv" % target
+
+        self.logfile = open(logfile, "w")
+        csvfile = open(csvfile, "w")
+        self.csvwriter = csv.writer(csvfile)
+
+        # prepare results table
+        self.csvwriter.writerow(["test_name", "test_result", "result_str"])
+
+    # set up cmdline string
+    def __get_cmdline(self, test):
+        cmdline = self.cmdline
+
+        # append memory limitations for each test
+        # otherwise tests won't run in parallel
+        if "i686" not in self.target:
+            cmdline += " --socket-mem=%s" % test["Memory"]
+        else:
+            # affinitize startup so that tests don't fail on i686
+            cmdline = "taskset 1 " + cmdline
+            cmdline += " -m " + str(sum(map(int, test["Memory"].split(","))))
+
+        # set group prefix for autotest group
+        # otherwise they won't run in parallel
+        cmdline += " --file-prefix=%s" % test["Prefix"]
+
+        return cmdline
+
+    def add_parallel_test_group(self, test_group):
+        self.parallel_test_groups.append(test_group)
+
+    def add_non_parallel_test_group(self, test_group):
+        self.non_parallel_test_groups.append(test_group)
+
+    def __process_results(self, results):
+        # this iterates over individual test results
+        for i, result in enumerate(results):
+
+            # increase total number of tests that were run
+            # do not include "start" test
+            if i > 0:
+                self.n_tests += 1
+
+            # unpack result tuple
+            test_result, result_str, test_name, \
+                test_time, log, report = result
+
+            # get total run time
+            cur_time = time.time()
+            total_time = int(cur_time - self.start)
+
+            # print results, test run time and total time since start
+            print ("%s:" % test_name).ljust(30),
+            print result_str.ljust(29),
+            print "[%02dm %02ds]" % (test_time / 60, test_time % 60),
+
+            # don't print out total time every line, it's the same anyway
+            if i == len(results) - 1:
+                print "[%02dm %02ds]" % (total_time / 60, total_time % 60)
+            else:
+                print ""
+
+            # if test failed and it wasn't a "start" test
+            if test_result < 0 and not i == 0:
+                self.fails += 1
+
+            # collect logs
+            self.log_buffers.append(log)
+
+            # create report if it exists
+            if report:
+                try:
+                    f = open("%s_%s_report.rst" %
+                             (self.target, test_name), "w")
+                except IOError:
+                    print "Report for %s could not be created!" % test_name
+                else:
+                    with f:
+                        f.write(report)
+
+            # write test result to CSV file
+            if i != 0:
+                self.csvwriter.writerow([test_name, test_result, result_str])
+
+    # this function iterates over test groups and removes each
+    # test that is not in whitelist/blacklist
+    def __filter_groups(self, test_groups):
+        groups_to_remove = []
+
+        # filter out tests from parallel test groups
+        for i, test_group in enumerate(test_groups):
+
+            # iterate over a copy so that we could safely delete individual
+            # tests
+            for test in test_group["Tests"][:]:
+                test_id = test["Command"]
+
+                # dump tests are specified in full e.g. "Dump_mempool"
+                if "_autotest" in test_id:
+                    test_id = test_id[:-len("_autotest")]
+
+                # filter out blacklisted/whitelisted tests
+                if self.blacklist and test_id in self.blacklist:
+                    test_group["Tests"].remove(test)
+                    continue
+                if self.whitelist and test_id not in self.whitelist:
+                    test_group["Tests"].remove(test)
+                    continue
+
+            # modify or remove original group
+            if len(test_group["Tests"]) > 0:
+                test_groups[i] = test_group
+            else:
+                # remember which groups should be deleted
+                # put the numbers backwards so that we start
+                # deleting from the end, not from the beginning
+                groups_to_remove.insert(0, i)
+
+        # remove test groups that need to be removed
+        for i in groups_to_remove:
+            del test_groups[i]
+
+        return test_groups
+
+    # iterate over test groups and run tests associated with them
+    def run_all_tests(self):
+        # filter groups
+        self.parallel_test_groups = \
+            self.__filter_groups(self.parallel_test_groups)
+        self.non_parallel_test_groups = \
+            self.__filter_groups(self.non_parallel_test_groups)
+
+        # create a pool of worker threads
+        pool = multiprocessing.Pool(processes=1)
+
+        results = []
+
+        # whatever happens, try to save as much logs as possible
+        try:
+
+            # create table header
+            print ""
+            print "Test name".ljust(30),
+            print "Test result".ljust(29),
+            print "Test".center(9),
+            print "Total".center(9)
+            print "=" * 80
+
+            # make a note of tests start time
+            self.start = time.time()
+
+            # assign worker threads to run test groups
+            for test_group in self.parallel_test_groups:
+                result = pool.apply_async(run_test_group,
+                                          [self.__get_cmdline(test_group),
+                                           test_group])
+                results.append(result)
+
+            # iterate while we have group execution results to get
+            while len(results) > 0:
+
+                # iterate over a copy to be able to safely delete results
+                # this iterates over a list of group results
+                for group_result in results[:]:
+
+                    # if the thread hasn't finished yet, continue
+                    if not group_result.ready():
+                        continue
+
+                    res = group_result.get()
+
+                    self.__process_results(res)
+
+                    # remove result from results list once we're done with it
+                    results.remove(group_result)
+
+            # run non_parallel tests. they are run one by one, synchronously
+            for test_group in self.non_parallel_test_groups:
+                group_result = run_test_group(
+                    self.__get_cmdline(test_group), test_group)
+
+                self.__process_results(group_result)
+
+            # get total run time
+            cur_time = time.time()
+            total_time = int(cur_time - self.start)
+
+            # print out summary
+            print "=" * 80
+            print "Total run time: %02dm %02ds" % (total_time / 60,
+                                                   total_time % 60)
+            if self.fails != 0:
+                print "Number of failed tests: %s" % str(self.fails)
+
+            # write summary to logfile
+            self.logfile.write("Summary\n")
+            self.logfile.write("Target: ".ljust(15) + "%s\n" % self.target)
+            self.logfile.write("Tests: ".ljust(15) + "%i\n" % self.n_tests)
+            self.logfile.write("Failed tests: ".ljust(
+                15) + "%i\n" % self.fails)
+        except:
+            print "Exception occurred"
+            print sys.exc_info()
+            self.fails = 1
+
+        # drop logs from all executions to a logfile
+        for buf in self.log_buffers:
+            self.logfile.write(buf.replace("\r", ""))
+
+        return self.fails
diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 14cffd0..c482ea8 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -33,257 +33,272 @@
 
 # Test functions
 
-import sys, pexpect, time, os, re
+import pexpect
 
 # default autotest, used to run most tests
 # waits for "Test OK"
+
+
 def default_autotest(child, test_name):
-	child.sendline(test_name)
-	result = child.expect(["Test OK", "Test Failed",
-		"Command not found", pexpect.TIMEOUT], timeout = 900)
-	if result == 1:
-		return -1, "Fail"
-	elif result == 2:
-		return -1, "Fail [Not found]"
-	elif result == 3:
-		return -1, "Fail [Timeout]"
-	return 0, "Success"
+    child.sendline(test_name)
+    result = child.expect(["Test OK", "Test Failed",
+                           "Command not found", pexpect.TIMEOUT], timeout=900)
+    if result == 1:
+        return -1, "Fail"
+    elif result == 2:
+        return -1, "Fail [Not found]"
+    elif result == 3:
+        return -1, "Fail [Timeout]"
+    return 0, "Success"
 
 # autotest used to run dump commands
 # just fires the command
+
+
 def dump_autotest(child, test_name):
-	child.sendline(test_name)
-	return 0, "Success"
+    child.sendline(test_name)
+    return 0, "Success"
 
 # memory autotest
 # reads output and waits for Test OK
+
+
 def memory_autotest(child, test_name):
-	child.sendline(test_name)
-	regexp = "phys:0x[0-9a-f]*, len:([0-9]*), virt:0x[0-9a-f]*, socket_id:[0-9]*"
-	index = child.expect([regexp, pexpect.TIMEOUT], timeout = 180)
-	if index != 0:
-		return -1, "Fail [Timeout]"
-	size = int(child.match.groups()[0], 16)
-	if size <= 0:
-		return -1, "Fail [Bad size]"
-	index = child.expect(["Test OK", "Test Failed",
-		          pexpect.TIMEOUT], timeout = 10)
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-	return 0, "Success"
+    child.sendline(test_name)
+    regexp = "phys:0x[0-9a-f]*, len:([0-9]*), virt:0x[0-9a-f]*, " \
+             "socket_id:[0-9]*"
+    index = child.expect([regexp, pexpect.TIMEOUT], timeout=180)
+    if index != 0:
+        return -1, "Fail [Timeout]"
+    size = int(child.match.groups()[0], 16)
+    if size <= 0:
+        return -1, "Fail [Bad size]"
+    index = child.expect(["Test OK", "Test Failed",
+                          pexpect.TIMEOUT], timeout=10)
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+    return 0, "Success"
+
 
 def spinlock_autotest(child, test_name):
-	i = 0
-	ir = 0
-	child.sendline(test_name)
-	while True:
-		index = child.expect(["Test OK",
-			"Test Failed",
-			"Hello from core ([0-9]*) !",
-			"Hello from within recursive locks from ([0-9]*) !",
-		pexpect.TIMEOUT], timeout = 5)
-		# ok
-		if index == 0:
-			break
-
-		# message, check ordering
-		elif index == 2:
-			if int(child.match.groups()[0]) < i:
-				return -1, "Fail [Bad order]"
-			i = int(child.match.groups()[0])
-		elif index == 3:
-			if int(child.match.groups()[0]) < ir:
-				return -1, "Fail [Bad order]"
-			ir = int(child.match.groups()[0])
-
-		# fail
-		elif index == 4:
-			return -1, "Fail [Timeout]"
-		elif index == 1:
-			return -1, "Fail"
-
-	return 0, "Success"
+    i = 0
+    ir = 0
+    child.sendline(test_name)
+    while True:
+        index = child.expect(["Test OK",
+                              "Test Failed",
+                              "Hello from core ([0-9]*) !",
+                              "Hello from within recursive locks "
+                              "from ([0-9]*) !",
+                              pexpect.TIMEOUT], timeout=5)
+        # ok
+        if index == 0:
+            break
+
+        # message, check ordering
+        elif index == 2:
+            if int(child.match.groups()[0]) < i:
+                return -1, "Fail [Bad order]"
+            i = int(child.match.groups()[0])
+        elif index == 3:
+            if int(child.match.groups()[0]) < ir:
+                return -1, "Fail [Bad order]"
+            ir = int(child.match.groups()[0])
+
+        # fail
+        elif index == 4:
+            return -1, "Fail [Timeout]"
+        elif index == 1:
+            return -1, "Fail"
+
+    return 0, "Success"
+
 
 def rwlock_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-	while True:
-		index = child.expect(["Test OK",
-			"Test Failed",
-			"Hello from core ([0-9]*) !",
-			"Global write lock taken on master core ([0-9]*)",
-		pexpect.TIMEOUT], timeout = 10)
-		# ok
-		if index == 0:
-			if i != 0xffff:
-				return -1, "Fail [Message is missing]"
-			break
-
-		# message, check ordering
-		elif index == 2:
-			if int(child.match.groups()[0]) < i:
-				return -1, "Fail [Bad order]"
-			i = int(child.match.groups()[0])
-
-		# must be the last message, check ordering
-		elif index == 3:
-			i = 0xffff
-
-		elif index == 4:
-			return -1, "Fail [Timeout]"
-
-		# fail
-		else:
-			return -1, "Fail"
-
-	return 0, "Success"
+    i = 0
+    child.sendline(test_name)
+    while True:
+        index = child.expect(["Test OK",
+                              "Test Failed",
+                              "Hello from core ([0-9]*) !",
+                              "Global write lock taken on master "
+                              "core ([0-9]*)",
+                              pexpect.TIMEOUT], timeout=10)
+        # ok
+        if index == 0:
+            if i != 0xffff:
+                return -1, "Fail [Message is missing]"
+            break
+
+        # message, check ordering
+        elif index == 2:
+            if int(child.match.groups()[0]) < i:
+                return -1, "Fail [Bad order]"
+            i = int(child.match.groups()[0])
+
+        # must be the last message, check ordering
+        elif index == 3:
+            i = 0xffff
+
+        elif index == 4:
+            return -1, "Fail [Timeout]"
+
+        # fail
+        else:
+            return -1, "Fail"
+
+    return 0, "Success"
+
 
 def logs_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-
-	log_list = [
-		"TESTAPP1: error message",
-		"TESTAPP1: critical message",
-		"TESTAPP2: critical message",
-		"TESTAPP1: error message",
-	]
-
-	for log_msg in log_list:
-		index = child.expect([log_msg,
-				      "Test OK",
-				      "Test Failed",
-				      pexpect.TIMEOUT], timeout = 10)
-
-		if index == 3:
-			return -1, "Fail [Timeout]"
-		# not ok
-		elif index != 0:
-			return -1, "Fail"
-
-	index = child.expect(["Test OK",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 10)
-
-	return 0, "Success"
+    child.sendline(test_name)
+
+    log_list = [
+        "TESTAPP1: error message",
+        "TESTAPP1: critical message",
+        "TESTAPP2: critical message",
+        "TESTAPP1: error message",
+    ]
+
+    for log_msg in log_list:
+        index = child.expect([log_msg,
+                              "Test OK",
+                              "Test Failed",
+                              pexpect.TIMEOUT], timeout=10)
+
+        if index == 3:
+            return -1, "Fail [Timeout]"
+        # not ok
+        elif index != 0:
+            return -1, "Fail"
+
+    index = child.expect(["Test OK",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=10)
+
+    return 0, "Success"
+
 
 def timer_autotest(child, test_name):
-	i = 0
-	child.sendline(test_name)
-
-	index = child.expect(["Start timer stress tests",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	index = child.expect(["Start timer stress tests 2",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	index = child.expect(["Start timer basic tests",
-		"Test Failed",
-		pexpect.TIMEOUT], timeout = 5)
-
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	prev_lcore_timer1 = -1
-
-	lcore_tim0 = -1
-	lcore_tim1 = -1
-	lcore_tim2 = -1
-	lcore_tim3 = -1
-
-	while True:
-		index = child.expect(["TESTTIMER: ([0-9]*): callback id=([0-9]*) count=([0-9]*) on core ([0-9]*)",
-			"Test OK",
-			"Test Failed",
-			pexpect.TIMEOUT], timeout = 10)
-
-		if index == 1:
-			break
-
-		if index == 2:
-			return -1, "Fail"
-		elif index == 3:
-			return -1, "Fail [Timeout]"
-
-		try:
-			t = int(child.match.groups()[0])
-			id = int(child.match.groups()[1])
-			cnt = int(child.match.groups()[2])
-			lcore = int(child.match.groups()[3])
-		except:
-			return -1, "Fail [Cannot parse]"
-
-		# timer0 always expires on the same core when cnt < 20
-		if id == 0:
-			if lcore_tim0 == -1:
-				lcore_tim0 = lcore
-			elif lcore != lcore_tim0 and cnt < 20:
-				return -1, "Fail [lcore != lcore_tim0 (%d, %d)]"%(lcore, lcore_tim0)
-			if cnt > 21:
-				return -1, "Fail [tim0 cnt > 21]"
-
-		# timer1 each time expires on a different core
-		if id == 1:
-			if lcore == lcore_tim1:
-				return -1, "Fail [lcore == lcore_tim1 (%d, %d)]"%(lcore, lcore_tim1)
-			lcore_tim1 = lcore
-			if cnt > 10:
-				return -1, "Fail [tim1 cnt > 30]"
-
-		# timer0 always expires on the same core
-		if id == 2:
-			if lcore_tim2 == -1:
-				lcore_tim2 = lcore
-			elif lcore != lcore_tim2:
-				return -1, "Fail [lcore != lcore_tim2 (%d, %d)]"%(lcore, lcore_tim2)
-			if cnt > 30:
-				return -1, "Fail [tim2 cnt > 30]"
-
-		# timer0 always expires on the same core
-		if id == 3:
-			if lcore_tim3 == -1:
-				lcore_tim3 = lcore
-			elif lcore != lcore_tim3:
-				return -1, "Fail [lcore_tim3 changed (%d -> %d)]"%(lcore, lcore_tim3)
-			if cnt > 30:
-				return -1, "Fail [tim3 cnt > 30]"
-
-	# must be 2 different cores
-	if lcore_tim0 == lcore_tim3:
-		return -1, "Fail [lcore_tim0 (%d) == lcore_tim3 (%d)]"%(lcore_tim0, lcore_tim3)
-
-	return 0, "Success"
+    child.sendline(test_name)
+
+    index = child.expect(["Start timer stress tests",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    index = child.expect(["Start timer stress tests 2",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    index = child.expect(["Start timer basic tests",
+                          "Test Failed",
+                          pexpect.TIMEOUT], timeout=5)
+
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    lcore_tim0 = -1
+    lcore_tim1 = -1
+    lcore_tim2 = -1
+    lcore_tim3 = -1
+
+    while True:
+        index = child.expect(["TESTTIMER: ([0-9]*): callback id=([0-9]*) "
+                              "count=([0-9]*) on core ([0-9]*)",
+                              "Test OK",
+                              "Test Failed",
+                              pexpect.TIMEOUT], timeout=10)
+
+        if index == 1:
+            break
+
+        if index == 2:
+            return -1, "Fail"
+        elif index == 3:
+            return -1, "Fail [Timeout]"
+
+        try:
+            id = int(child.match.groups()[1])
+            cnt = int(child.match.groups()[2])
+            lcore = int(child.match.groups()[3])
+        except:
+            return -1, "Fail [Cannot parse]"
+
+        # timer0 always expires on the same core when cnt < 20
+        if id == 0:
+            if lcore_tim0 == -1:
+                lcore_tim0 = lcore
+            elif lcore != lcore_tim0 and cnt < 20:
+                return -1, "Fail [lcore != lcore_tim0 (%d, %d)]" \
+                    % (lcore, lcore_tim0)
+            if cnt > 21:
+                return -1, "Fail [tim0 cnt > 21]"
+
+        # timer1 each time expires on a different core
+        if id == 1:
+            if lcore == lcore_tim1:
+                return -1, "Fail [lcore == lcore_tim1 (%d, %d)]" \
+                    % (lcore, lcore_tim1)
+            lcore_tim1 = lcore
+            if cnt > 10:
+                return -1, "Fail [tim1 cnt > 30]"
+
+        # timer0 always expires on the same core
+        if id == 2:
+            if lcore_tim2 == -1:
+                lcore_tim2 = lcore
+            elif lcore != lcore_tim2:
+                return -1, "Fail [lcore != lcore_tim2 (%d, %d)]" \
+                    % (lcore, lcore_tim2)
+            if cnt > 30:
+                return -1, "Fail [tim2 cnt > 30]"
+
+        # timer0 always expires on the same core
+        if id == 3:
+            if lcore_tim3 == -1:
+                lcore_tim3 = lcore
+            elif lcore != lcore_tim3:
+                return -1, "Fail [lcore_tim3 changed (%d -> %d)]" \
+                    % (lcore, lcore_tim3)
+            if cnt > 30:
+                return -1, "Fail [tim3 cnt > 30]"
+
+    # must be 2 different cores
+    if lcore_tim0 == lcore_tim3:
+        return -1, "Fail [lcore_tim0 (%d) == lcore_tim3 (%d)]" \
+            % (lcore_tim0, lcore_tim3)
+
+    return 0, "Success"
+
 
 def ring_autotest(child, test_name):
-	child.sendline(test_name)
-	index = child.expect(["Test OK", "Test Failed",
-		pexpect.TIMEOUT], timeout = 2)
-	if index == 1:
-		return -1, "Fail"
-	elif index == 2:
-		return -1, "Fail [Timeout]"
-
-	child.sendline("set_watermark test 100")
-	child.sendline("dump_ring test")
-	index = child.expect(["  watermark=100",
-		pexpect.TIMEOUT], timeout = 1)
-	if index != 0:
-		return -1, "Fail [Bad watermark]"
-
-	return 0, "Success"
+    child.sendline(test_name)
+    index = child.expect(["Test OK", "Test Failed",
+                          pexpect.TIMEOUT], timeout=2)
+    if index == 1:
+        return -1, "Fail"
+    elif index == 2:
+        return -1, "Fail [Timeout]"
+
+    child.sendline("set_watermark test 100")
+    child.sendline("dump_ring test")
+    index = child.expect(["  watermark=100",
+                          pexpect.TIMEOUT], timeout=1)
+    if index != 0:
+        return -1, "Fail [Bad watermark]"
+
+    return 0, "Success"
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 29e8efb..34c62de 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -58,7 +58,8 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion']).decode('utf-8').rstrip()
+version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
+version = version.decode('utf-8').rstrip()
 release = version
 
 master_doc = 'index'
@@ -94,6 +95,7 @@
     'preamble': latex_preamble
 }
 
+
 # Override the default Latex formatter in order to modify the
 # code/verbatim blocks.
 class CustomLatexFormatter(LatexFormatter):
@@ -117,12 +119,12 @@ def __init__(self, **options):
              ("tools/devbind", "dpdk-devbind",
               "check device status and bind/unbind them from drivers", "", 8)]
 
-######## :numref: fallback ########
+
+# ####### :numref: fallback ########
 # The following hook functions add some simple handling for the :numref:
 # directive for Sphinx versions prior to 1.3.1. The functions replace the
 # :numref: reference with a link to the target (for all Sphinx doc types).
 # It doesn't try to label figures/tables.
-
 def numref_role(reftype, rawtext, text, lineno, inliner):
     """
     Add a Sphinx role to handle numref references. Note, we can't convert
@@ -136,6 +138,7 @@ def numref_role(reftype, rawtext, text, lineno, inliner):
                               internal=True)
     return [newnode], []
 
+
 def process_numref(app, doctree, from_docname):
     """
     Process the numref nodes once the doctree has been built and prior to
diff --git a/examples/ip_pipeline/config/diagram-generator.py b/examples/ip_pipeline/config/diagram-generator.py
index 6b7170b..1748833 100755
--- a/examples/ip_pipeline/config/diagram-generator.py
+++ b/examples/ip_pipeline/config/diagram-generator.py
@@ -36,7 +36,8 @@
 # the DPDK ip_pipeline application.
 #
 # The input configuration file is translated to an output file in DOT syntax,
-# which is then used to create the image file using graphviz (www.graphviz.org).
+# which is then used to create the image file using graphviz
+# (www.graphviz.org).
 #
 
 from __future__ import print_function
@@ -94,6 +95,7 @@
 # SOURCEx | SOURCEx    | SOURCEx     | PIPELINEy     | SOURCEx
 # SINKx   | SINKx      | PIPELINEy   | SINKx         | SINKx
 
+
 #
 # Parse the input configuration file to detect the graph nodes and edges
 #
@@ -321,16 +323,17 @@ def process_config_file(cfgfile):
     #
     print('Creating image file "%s" ...' % imgfile)
     if os.system('which dot > /dev/null'):
-        print('Error: Unable to locate "dot" executable.' \
-            'Please install the "graphviz" package (www.graphviz.org).')
+        print('Error: Unable to locate "dot" executable.'
+              'Please install the "graphviz" package (www.graphviz.org).')
         return
 
     os.system(dot_cmd)
 
 
 if __name__ == '__main__':
-    parser = argparse.ArgumentParser(description=\
-        'Create diagram for IP pipeline configuration file.')
+    parser = argparse.ArgumentParser(description='Create diagram for IP '
+                                                 'pipeline configuration '
+                                                 'file.')
 
     parser.add_argument(
         '-f',
diff --git a/examples/ip_pipeline/config/pipeline-to-core-mapping.py b/examples/ip_pipeline/config/pipeline-to-core-mapping.py
index c2050b8..7a4eaa2 100755
--- a/examples/ip_pipeline/config/pipeline-to-core-mapping.py
+++ b/examples/ip_pipeline/config/pipeline-to-core-mapping.py
@@ -39,15 +39,14 @@
 #
 
 from __future__ import print_function
-import sys
-import errno
-import os
-import re
+from collections import namedtuple
+import argparse
 import array
+import errno
 import itertools
+import os
 import re
-import argparse
-from collections import namedtuple
+import sys
 
 # default values
 enable_stage0_traceout = 1
diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py
index d38d0b5..ccc22ec 100755
--- a/tools/cpu_layout.py
+++ b/tools/cpu_layout.py
@@ -38,40 +38,40 @@
 cores = []
 core_map = {}
 
-fd=open("/proc/cpuinfo")
+fd = open("/proc/cpuinfo")
 lines = fd.readlines()
 fd.close()
 
 core_details = []
 core_lines = {}
 for line in lines:
-	if len(line.strip()) != 0:
-		name, value = line.split(":", 1)
-		core_lines[name.strip()] = value.strip()
-	else:
-		core_details.append(core_lines)
-		core_lines = {}
+    if len(line.strip()) != 0:
+        name, value = line.split(":", 1)
+        core_lines[name.strip()] = value.strip()
+    else:
+        core_details.append(core_lines)
+        core_lines = {}
 
 for core in core_details:
-	for field in ["processor", "core id", "physical id"]:
-		if field not in core:
-			print "Error getting '%s' value from /proc/cpuinfo" % field
-			sys.exit(1)
-		core[field] = int(core[field])
+    for field in ["processor", "core id", "physical id"]:
+        if field not in core:
+            print "Error getting '%s' value from /proc/cpuinfo" % field
+            sys.exit(1)
+        core[field] = int(core[field])
 
-	if core["core id"] not in cores:
-		cores.append(core["core id"])
-	if core["physical id"] not in sockets:
-		sockets.append(core["physical id"])
-	key = (core["physical id"], core["core id"])
-	if key not in core_map:
-		core_map[key] = []
-	core_map[key].append(core["processor"])
+    if core["core id"] not in cores:
+        cores.append(core["core id"])
+    if core["physical id"] not in sockets:
+        sockets.append(core["physical id"])
+    key = (core["physical id"], core["core id"])
+    if key not in core_map:
+        core_map[key] = []
+    core_map[key].append(core["processor"])
 
 print "============================================================"
 print "Core and Socket Information (as reported by '/proc/cpuinfo')"
 print "============================================================\n"
-print "cores = ",cores
+print "cores = ", cores
 print "sockets = ", sockets
 print ""
 
@@ -81,15 +81,16 @@
 
 print " ".ljust(max_core_id_len + len('Core ')),
 for s in sockets:
-        print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
+    print "Socket %s" % str(s).ljust(max_core_map_len - len('Socket ')),
 print ""
+
 print " ".ljust(max_core_id_len + len('Core ')),
 for s in sockets:
-        print "--------".ljust(max_core_map_len),
+    print "--------".ljust(max_core_map_len),
 print ""
 
 for c in cores:
-        print "Core %s" % str(c).ljust(max_core_id_len),
-        for s in sockets:
-                print str(core_map[(s,c)]).ljust(max_core_map_len),
-        print ""
+    print "Core %s" % str(c).ljust(max_core_id_len),
+    for s in sockets:
+        print str(core_map[(s, c)]).ljust(max_core_map_len),
+    print ""
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index f1d374d..4f51a4b 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -93,10 +93,10 @@ def usage():
         Unbind a device (Equivalent to \"-b none\")
 
     --force:
-        By default, network devices which are used by Linux - as indicated by having
-        routes in the routing table - cannot be modified. Using the --force
-        flag overrides this behavior, allowing active links to be forcibly
-        unbound.
+        By default, network devices which are used by Linux - as indicated by
+        having routes in the routing table - cannot be modified. Using the
+        --force flag overrides this behavior, allowing active links to be
+        forcibly unbound.
         WARNING: This can lead to loss of network connection and should be used
         with caution.
 
@@ -151,7 +151,7 @@ def find_module(mod):
 
     # check for a copy based off current path
     tools_dir = dirname(abspath(sys.argv[0]))
-    if (tools_dir.endswith("tools")):
+    if tools_dir.endswith("tools"):
         base_dir = dirname(tools_dir)
         find_out = check_output(["find", base_dir, "-name", mod + ".ko"])
         if len(find_out) > 0:  # something matched
@@ -249,7 +249,7 @@ def get_nic_details():
     dev = {}
     dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
     for dev_line in dev_lines:
-        if (len(dev_line) == 0):
+        if len(dev_line) == 0:
             if dev["Class"][0:2] == NETWORK_BASE_CLASS:
                 # convert device and vendor ids to numbers, then add to global
                 dev["Vendor"] = int(dev["Vendor"], 16)
@@ -315,8 +315,8 @@ def get_crypto_details():
     dev = {}
     dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
     for dev_line in dev_lines:
-        if (len(dev_line) == 0):
-            if (dev["Class"][0:2] == CRYPTO_BASE_CLASS):
+        if len(dev_line) == 0:
+            if dev["Class"][0:2] == CRYPTO_BASE_CLASS:
                 # convert device and vendor ids to numbers, then add to global
                 dev["Vendor"] = int(dev["Vendor"], 16)
                 dev["Device"] = int(dev["Device"], 16)
@@ -513,7 +513,8 @@ 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" % (dev["Slot"],
-                               dev["Device_str"], extra_params % dev))
+                                               dev["Device_str"],
+                                               extra_params % dev))
             else:
                 strings.append("%s '%s'" % (dev["Slot"], dev["Device_str"]))
     # sort before printing, so that the entries appear in PCI order
@@ -532,7 +533,7 @@ def show_status():
 
     # split our list of network devices into the three categories above
     for d in devices.keys():
-        if (NETWORK_BASE_CLASS in devices[d]["Class"]):
+        if NETWORK_BASE_CLASS in devices[d]["Class"]:
             if not has_driver(d):
                 no_drv.append(devices[d])
                 continue
@@ -555,7 +556,7 @@ def show_status():
     no_drv = []
 
     for d in devices.keys():
-        if (CRYPTO_BASE_CLASS in devices[d]["Class"]):
+        if CRYPTO_BASE_CLASS in devices[d]["Class"]:
             if not has_driver(d):
                 no_drv.append(devices[d])
                 continue
diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py
index 3db9819..3d3ad7d 100755
--- a/tools/dpdk-pmdinfo.py
+++ b/tools/dpdk-pmdinfo.py
@@ -4,52 +4,20 @@
 # Utility to dump PMD_INFO_STRING support from an object file
 #
 # -------------------------------------------------------------------------
+import json
 import os
+import platform
+import string
 import sys
+from elftools.common.exceptions import ELFError
+from elftools.common.py3compat import (byte2int, bytes2str, str2bytes)
+from elftools.elf.elffile import ELFFile
 from optparse import OptionParser
-import string
-import json
-import platform
 
 # For running from development directory. It should take precedence over the
 # installed pyelftools.
 sys.path.insert(0, '.')
 
-
-from elftools import __version__
-from elftools.common.exceptions import ELFError
-from elftools.common.py3compat import (
-    ifilter, byte2int, bytes2str, itervalues, str2bytes)
-from elftools.elf.elffile import ELFFile
-from elftools.elf.dynamic import DynamicSection, DynamicSegment
-from elftools.elf.enums import ENUM_D_TAG
-from elftools.elf.segments import InterpSegment
-from elftools.elf.sections import SymbolTableSection
-from elftools.elf.gnuversions import (
-    GNUVerSymSection, GNUVerDefSection,
-    GNUVerNeedSection,
-)
-from elftools.elf.relocation import RelocationSection
-from elftools.elf.descriptions import (
-    describe_ei_class, describe_ei_data, describe_ei_version,
-    describe_ei_osabi, describe_e_type, describe_e_machine,
-    describe_e_version_numeric, describe_p_type, describe_p_flags,
-    describe_sh_type, describe_sh_flags,
-    describe_symbol_type, describe_symbol_bind, describe_symbol_visibility,
-    describe_symbol_shndx, describe_reloc_type, describe_dyn_tag,
-    describe_ver_flags,
-)
-from elftools.elf.constants import E_FLAGS
-from elftools.dwarf.dwarfinfo import DWARFInfo
-from elftools.dwarf.descriptions import (
-    describe_reg_name, describe_attr_value, set_global_machine_arch,
-    describe_CFI_instructions, describe_CFI_register_rule,
-    describe_CFI_CFA_rule,
-)
-from elftools.dwarf.constants import (
-    DW_LNS_copy, DW_LNS_set_file, DW_LNE_define_file)
-from elftools.dwarf.callframe import CIE, FDE
-
 raw_output = False
 pcidb = None
 
@@ -326,7 +294,7 @@ def parse_pmd_info_string(self, mystring):
         for i in optional_pmd_info:
             try:
                 print("%s: %s" % (i['tag'], pmdinfo[i['id']]))
-            except KeyError as e:
+            except KeyError:
                 continue
 
         if (len(pmdinfo["pci_ids"]) != 0):
@@ -475,7 +443,7 @@ def process_dt_needed_entries(self):
                         with open(library, 'rb') as file:
                             try:
                                 libelf = ReadElf(file, sys.stdout)
-                            except ELFError as e:
+                            except ELFError:
                                 print("%s is no an ELF file" % library)
                                 continue
                             libelf.process_dt_needed_entries()
@@ -491,7 +459,7 @@ def scan_autoload_path(autoload_path):
 
     try:
         dirs = os.listdir(autoload_path)
-    except OSError as e:
+    except OSError:
         # Couldn't read the directory, give up
         return
 
@@ -503,10 +471,10 @@ def scan_autoload_path(autoload_path):
             try:
                 file = open(dpath, 'rb')
                 readelf = ReadElf(file, sys.stdout)
-            except ELFError as e:
+            except ELFError:
                 # this is likely not an elf file, skip it
                 continue
-            except IOError as e:
+            except IOError:
                 # No permission to read the file, skip it
                 continue
 
@@ -531,7 +499,7 @@ def scan_for_autoload_pmds(dpdk_path):
     file = open(dpdk_path, 'rb')
     try:
         readelf = ReadElf(file, sys.stdout)
-    except ElfError as e:
+    except ElfError:
         if raw_output is False:
             print("Unable to parse %s" % file)
         return
@@ -557,7 +525,7 @@ def main(stream=None):
     global raw_output
     global pcidb
 
-    pcifile_default = "./pci.ids" # for unknown OS's assume local file
+    pcifile_default = "./pci.ids"  # For unknown OS's assume local file
     if platform.system() == 'Linux':
         pcifile_default = "/usr/share/hwdata/pci.ids"
     elif platform.system() == 'FreeBSD':
@@ -577,7 +545,8 @@ def main(stream=None):
                               "to get vendor names from",
                          default=pcifile_default, metavar="FILE")
     optparser.add_option("-t", "--table", dest="tblout",
-                         help="output information on hw support as a hex table",
+                         help="output information on hw support as a "
+                              "hex table",
                          action='store_true')
     optparser.add_option("-p", "--plugindir", dest="pdir",
                          help="scan dpdk for autoload plugins",
-- 
2.7.4

^ permalink raw reply related

* [PATCH v1 0/4] app: make python apps python2/3 compliant
From: John McNamara @ 2016-12-08 15:51 UTC (permalink / raw)
  To: dev; +Cc: mkletzan, John McNamara

These patches refactor the DPDK Python applications to make them Python 2/3
compatible.

In order to do this the patchset starts by making the apps PEP8 compliant in
accordance with the DPDK Coding guidelines:

    http://dpdk.org/doc/guides/contributing/coding_style.html#python-code

Implementing PEP8 and Python 2/3 compliance means that we can check all future
Python patches for consistency. Python 2/3 support also makes downstream
packaging easier as more distros move to Python 3 as the system python.

See the previous discussion about Python2/3 compatibilty here:

    http://dpdk.org/ml/archives/dev/2016-December/051683.html

I've tested that the apps compile with python 2 and 3 and I've tested some
of the apps for consistent output but it needs additional testing.

John McNamara (4):
  app: make python apps pep8 compliant
  app: make python apps python2/3 compliant
  app: give python apps a consistent shebang line
  doc: add required python versions to coding guidelines

 app/cmdline_test/cmdline_test.py                   |  87 ++-
 app/cmdline_test/cmdline_test_data.py              | 403 +++++-----
 app/test/autotest.py                               |  46 +-
 app/test/autotest_data.py                          | 831 +++++++++++----------
 app/test/autotest_runner.py                        | 740 +++++++++---------
 app/test/autotest_test_funcs.py                    | 481 ++++++------
 doc/guides/conf.py                                 |  11 +-
 doc/guides/contributing/coding_style.rst           |   3 +-
 examples/ip_pipeline/config/diagram-generator.py   |  13 +-
 .../ip_pipeline/config/pipeline-to-core-mapping.py |  11 +-
 tools/cpu_layout.py                                |  79 +-
 tools/dpdk-devbind.py                              |  26 +-
 tools/dpdk-pmdinfo.py                              |  73 +-
 13 files changed, 1410 insertions(+), 1394 deletions(-)

--
2.7.4

^ permalink raw reply

* Re: [RFC] ethdev: abstraction layer for QoS hierarchical scheduler
From: Alan Robertson @ 2016-12-08 15:41 UTC (permalink / raw)
  To: Dumitrescu, Cristian; +Cc: dev@dpdk.org, Thomas Monjalon
In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D8912652711302@IRSMSX108.ger.corp.intel.com>

Hi Cristian,

The way qos works just now should be feasible for dynamic targets.   That is similar functions
to rte_sched_port_enqueue() and rte_sched_port_dequeue() would be called.  The first to
enqueue the mbufs onto the queues the second to dequeue.  The qos structures and scheduler
don't need to be as functionally rich though.  I would have thought a simple pipe with child
nodes should suffice for most.  That would allow each tunnel/session to be shaped and the
queueing and drop logic inherited from what is there just now.

Thanks,
Alan.

-----Original Message-----
From: Dumitrescu, Cristian [mailto:cristian.dumitrescu@intel.com] 
Sent: Wednesday, December 07, 2016 7:52 PM
To: Alan Robertson
Cc: dev@dpdk.org; Thomas Monjalon
Subject: RE: [dpdk-dev] [RFC] ethdev: abstraction layer for QoS hierarchical scheduler

Hi Alan,

Thanks for your comments!


> Hi Cristian,

> Looking at points 10 and 11 it's good to hear nodes can be dynamically added.

Yes, many implementations allow on-the-fly remapping a node from one parent to another one, or simply adding more nodes post-initialization, so it is natural for the API to provide this.


> We've been trying to decide the best way to do this for support of qos 
> on tunnels for some time now and the existing implementation doesn't 
> allow this so effectively ruled out hierarchical queueing for tunnel targets on the output interface.

> Having said that, has thought been given to separating the queueing from being so closely
> tied to the Ethernet transmit process ?   When queueing on a tunnel for example we may
> be working with encryption.   When running with an anti-reply window it is really much
> better to do the QOS (packet reordering) before the encryption.  To 
> support this would it be possible to have a separate scheduler 
> structure which can be passed into the scheduling API ?  This means 
> the calling code can hang the structure of whatever entity it wishes to perform qos on, and we get dynamic target support (sessions/tunnels etc).

Yes, this is one point where we need to look for a better solution. Current proposal attaches the hierarchical scheduler function to an ethdev, so scheduling traffic for tunnels that have a pre-defined bandwidth is not supported nicely. This question was also raised in VPP, but there tunnels are supported as a type of output interfaces, so attaching scheduling to an output interface also covers the tunnels case.

Looks to me that nice tunnel abstractions are a gap in DPDK as well. Any thoughts about how tunnels should be supported in DPDK? What do other people think about this?


> Regarding the structure allocation, would it be possible to make the 
> number of queues associated with a TC a compile time option which the scheduler would accommodate ?
> We frequently only use one queue per tc which means 75% of the space 
> allocated at the queueing layer for that tc is never used.  This may 
> be specific to our implementation but if other implementations do the 
> same if folks could say we may get a better idea if this is a common case.

> Whilst touching on the scheduler, the token replenishment works using 
> a division and multiplication obviously to cater for the fact that it 
> may be run after several tc windows have passed.  The most commonly 
> used industrial scheduler simply does a lapsed on the tc and then adds 
> the bc.   This relies on the scheduler being called within the tc 
> window though.  It would be nice to have this as a configurable option since it's much for efficient assuming the infra code from which it's called can guarantee the calling frequency.

This is probably feedback for librte_sched as opposed to the current API proposal, as the Latter is intended to be generic/implementation-agnostic and therefor its scope far exceeds the existing set of librte_sched features.

Btw, we do plan using the librte_sched feature as the default fall-back when the HW ethdev is not scheduler-enabled, as well as the implementation of choice for a lot of use-cases where it fits really well, so we do have to continue evolve and improve librte_sched feature-wise and performance-wise.


> I hope you'll consider these points for inclusion into a future road 
> map.  Hopefully in the future my employer will increase the priority 
> of some of the tasks and a PR may appear on the mailing list.

> Thanks,
> Alan.

^ permalink raw reply

* Re: [PATCH 00/22] Generic flow API (rte_flow)
From: Adrien Mazarguil @ 2016-12-08 15:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Thomas Monjalon, Pablo de Lara, Olivier Matz
In-Reply-To: <e4ccc647-0c0f-ac85-a324-1d86ff7b1db2@intel.com>

Hi Ferruh,

On Fri, Dec 02, 2016 at 04:58:53PM +0000, Ferruh Yigit wrote:
> Hi Adrien,
> 
> On 11/16/2016 4:23 PM, Adrien Mazarguil wrote:
> > As previously discussed in RFC v1 [1], RFC v2 [2], with changes
> > described in [3] (also pasted below), here is the first non-draft series
> > for this new API.
> > 
> > Its capabilities are so generic that its name had to be vague, it may be
> > called "Generic flow API", "Generic flow interface" (possibly shortened
> > as "GFI") to refer to the name of the new filter type, or "rte_flow" from
> > the prefix used for its public symbols. I personally favor the latter.
> > 
> > While it is currently meant to supersede existing filter types in order for
> > all PMDs to expose a common filtering/classification interface, it may
> > eventually evolve to cover the following ideas as well:
> > 
> > - Rx/Tx offloads configuration through automatic offloads for specific
> >   packets, e.g. performing checksum on TCP packets could be expressed with
> >   an egress rule with a TCP pattern and a kind of checksum action.
> > 
> > - RSS configuration (already defined actually). Could be global or per rule
> >   depending on hardware capabilities.
> > 
> > - Switching configuration for devices with many physical ports; rules doing
> >   both ingress and egress could even be used to completely bypass software
> >   if supported by hardware.
> > 
> >  [1] http://dpdk.org/ml/archives/dev/2016-July/043365.html
> >  [2] http://dpdk.org/ml/archives/dev/2016-August/045383.html
> >  [3] http://dpdk.org/ml/archives/dev/2016-November/050044.html
> > 
> > Changes since RFC v2:
> > 
> > - New separate VLAN pattern item (previously part of the ETH definition),
> >   found to be much more convenient.
> > 
> > - Removed useless "any" field from VF pattern item, the same effect can be
> >   achieved by not providing a specification structure.
> > 
> > - Replaced bit-fields from the VXLAN pattern item to avoid endianness
> >   conversion issues on 24-bit fields.
> > 
> > - Updated struct rte_flow_item with a new "last" field to create inclusive
> >   ranges. They are defined as the interval between (spec & mask) and
> >   (last & mask). All three parameters are optional.
> > 
> > - Renamed ID action MARK.
> > 
> > - Renamed "queue" fields in actions QUEUE and DUP to "index".
> > 
> > - "rss_conf" field in RSS action is now const.
> > 
> > - VF action now uses a 32 bit ID like its pattern item counterpart.
> > 
> > - Removed redundant struct rte_flow_pattern, API functions now expect
> >   struct
> >   rte_flow_item lists terminated by END items.
> > 
> > - Replaced struct rte_flow_actions for the same reason, with struct
> >   rte_flow_action lists terminated by END actions.
> > 
> > - Error types (enum rte_flow_error_type) have been updated and the cause
> >   pointer in struct rte_flow_error is now const.
> > 
> > - Function prototypes (rte_flow_create, rte_flow_validate) have also been
> >   updated for clarity.
> > 
> > Additions:
> > 
> > - Public wrapper functions rte_flow_{validate|create|destroy|flush|query}
> >   are now implemented in rte_flow.c, with their symbols exported and
> >   versioned. Related filter type RTE_ETH_FILTER_GENERIC has been added.
> > 
> > - A separate header (rte_flow_driver.h) has been added for driver-side
> >   functionality, in particular struct rte_flow_ops which contains PMD
> >   callbacks returned by RTE_ETH_FILTER_GENERIC query.
> > 
> > - testpmd now exposes most of this API through the new "flow" command.
> > 
> > What remains to be done:
> > 
> > - Using endian-aware integer types (rte_beX_t) where necessary for clarity.
> > 
> > - API documentation (based on RFC).
> > 
> > - testpmd flow command documentation (although context-aware command
> >   completion should already help quite a bit in this regard).
> > 
> > - A few pattern item / action properties cannot be configured yet
> >   (e.g. rss_conf parameter for RSS action) and a few completions
> >   (e.g. possible queue IDs) should be added.
> > 
> 
> <...>
> 
> I was trying to check driver filter API patches, but hit a few compiler
> errors with this patchset.
> 
> [1] clang complains about variable bitfield value changed from -1 to 1.
> Which is correct, but I guess that is intentional, but I don't know how
> to tell this to clang?
> 
> [2] shred library compilation error, because of missing rte_flow_flush
> in rte_ether_version.map file
> 
> [3] bunch of icc compilation errors, almost all are same type:
> error #188: enumerated type mixed with another type

Thanks for the report, I'll attempt to address them all in v2. However icc
error #188 looks like a pain, I think I can work around it but do we really
not tolerate the use of normal integers inside enum fields in DPDK?

> [1]
> =============================
> .../app/test-pmd/cmdline_flow.c:944:16: error: implicit truncation from
> 'int' to bitfield changes value from -1 to 1
> [-Werror,-Wbitfield-constant-conversion]
>                 .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
> relative)),
> 
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:282:42: note: expanded from macro
> 'ARGS_ENTRY_BF'
>                 .mask = (const void *)&(const s){ .f = -1 }, \
>                                                        ^~
> .../app/test-pmd/cmdline_flow.c:269:49: note: expanded from macro 'ARGS'
> #define ARGS(...) (const struct arg *const []){ __VA_ARGS__, NULL, }
>                                                 ^~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:950:16: error: implicit truncation from
> 'int' to bitfield changes value from -1 to 1
> [-Werror,-Wbitfield-constant-conversion]
>                 .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
> search)),
>                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:282:42: note: expanded from macro
> 'ARGS_ENTRY_BF'
>                 .mask = (const void *)&(const s){ .f = -1 }, \
>                                                        ^~
> .../app/test-pmd/cmdline_flow.c:269:49: note: expanded from macro 'ARGS'
> #define ARGS(...) (const struct arg *const []){ __VA_ARGS__, NULL, }
>                                                 ^~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:1293:16: error: implicit truncation from
> 'int' to bitfield changes value from -1 to 1
> [-Werror,-Wbitfield-constant-conversion]
>                 .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
>                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:282:42: note: expanded from macro
> 'ARGS_ENTRY_BF'
>                 .mask = (const void *)&(const s){ .f = -1 }, \
>                                                        ^~
> .../app/test-pmd/cmdline_flow.c:269:49: note: expanded from macro 'ARGS'
> #define ARGS(...) (const struct arg *const []){ __VA_ARGS__, NULL, }
>                                                 ^~~~~~~~~~~
> .../app/test-pmd/cmdline_flow.c:1664:26: error: duplicate 'const'
> declaration specifier [-Werror,-Wduplicate-decl-specifier]
>         static const enum index const next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
>                                 ^
> 4 errors generated.
> 
> 
> 
> [2]
> =============================
>   LD testpmd
> config.o: In function `port_flow_flush':
> config.c:(.text+0x2231): undefined reference to `rte_flow_flush'
> collect2: error: ld returned 1 exit status
> 
> 
> [3]
> =============================
> .../app/test-pmd/cmdline_flow.c(364): error #188: enumerated type mixed
> with another type
> 
>         0,
> 
> 
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(370): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(376): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(385): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(406): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(413): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(419): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(425): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(435): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(443): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(450): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(457): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(464): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(471): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(478): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(485): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(492): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(498): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(514): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(520): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(526): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(532): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(538): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(545): error #188: enumerated type mixed
> with another type
>         0,
>         ^
> 
> .../app/test-pmd/cmdline_flow.c(619): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(FLOW)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(716): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(729): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(736): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(743): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(743): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(750): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(757): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(QUERY_ACTION),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(757): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(QUERY_ACTION),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(757): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(QUERY_ACTION),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(768): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(776): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(792): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(800): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(807): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(864): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTIONS)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(871): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ITEM_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(878): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ITEM_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(891): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(897): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(904): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ITEM_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(917): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(930): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_port, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(943): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(949): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(955): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(961): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(967): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw,
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(967): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_raw,
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(987): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(993): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(999): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1012): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1018): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1031): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1038): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1052): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1059): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1073): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1080): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1094): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1101): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1115): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1122): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1136): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1143): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1157): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1182): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1189): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1202): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1210): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1224): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1232): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1239): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1252): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_dup, NEXT_ENTRY(UNSIGNED)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1266): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_rss, NEXT_ENTRY(ACTION_RSS_QUEUE)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1279): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1292): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1300): error #188: enumerated type mixed
> with another type
>                 .next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
>                         ^
> 
> .../app/test-pmd/cmdline_flow.c(1599): error #188: enumerated type mixed
> with another type
>                 ctx->next[ctx->next_num - 2] = NEXT_ENTRY(PREFIX);
>                                                ^
> 
> .../app/test-pmd/cmdline_flow.c(1664): error #83: type qualifier
> specified more than once
>         static const enum index const next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
>                                 ^
> 
> .../app/test-pmd/cmdline_flow.c(1664): error #188: enumerated type mixed
> with another type
>         static const enum index const next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
>                                                ^
> 
> .../app/test-pmd/cmdline_flow.c(2302): error #188: enumerated type mixed
> with another type
>         ctx->curr = 0;
>                   ^
> 
> .../app/test-pmd/cmdline_flow.c(2303): error #188: enumerated type mixed
> with another type
>         ctx->prev = 0;
>                   ^
> 
> 

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply

* Re: [PATCH] net: introduce big and little endian types
From: Ananyev, Konstantin @ 2016-12-08 15:10 UTC (permalink / raw)
  To: Neil Horman, Nélio Laranjeiro
  Cc: dev@dpdk.org, Richardson, Bruce, Wiles, Keith, Morten Brørup,
	Lu, Wenzhuo, Olivier Matz
In-Reply-To: <20161208150721.GB4657@hmsreliant.think-freely.org>



> -----Original Message-----
> From: Neil Horman [mailto:nhorman@tuxdriver.com]
> Sent: Thursday, December 8, 2016 3:07 PM
> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>; Wiles,
> Keith <keith.wiles@intel.com>; Morten Brørup <mb@smartsharesystems.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Olivier Matz
> <olivier.matz@6wind.com>
> Subject: Re: [PATCH] net: introduce big and little endian types
> 
> On Thu, Dec 08, 2016 at 10:30:05AM +0100, Nélio Laranjeiro wrote:
> > Hi all,
> >
> > Following previous discussions, I would like to gather requirements for
> > v2, currently we have:
> >
> > 1. Introduction of new typedefs.
> > 2. Modification of network headers.
> > 3. Modification of rte_*_to_*() functions.
> >
> > Point 1. seems not to be an issue, everyone seems to agree on the fact
> > having those types could help to document some parts of the code.
> >
> No objection here
> 
> > Point 2. does not cause any ABI change as it is only a documentation
> > commit, not sure if anyone disagrees about this.
> >
> I have an objection here, and I think it was stated by others previously.  While
> its fine to offer endian encoded types so that developers can use them
> expediently, I don't like the idea of coding them into network headers
> specifically.  I assert that because network headers represent multiple views of
> network data (both network byte order if the data is taken off the wire and cpu
> byte order if its translated.  To implement such a network header change
> efficiently what you would need is something like the following:
> 
> struct rte_ip_network_hdr {
> 	rte_le_u32 dst;
> 	rte_le_u32 src;
> 	...
> };
> 
> struct rte_ip_cpu_hdr {
> 	rte_cpu_u32 dst;
> 	rte_cpu_u32 src;
> 	...
> };
> 
> where rte_cpu_* is defined to a big endian or little endian type based on the
> cpu being targeted.
> 
> Then of course you need to define translation macros to do all the appropriate
> conversions convieniently (or you need to do specific translations on the
> network byte order as needed, which may lead to lots of repeated conversions).
> Regardless, this seems to be unscalable. Endian types are the sort of thing that
> you should only use sparingly, not by default.

+1

> 
> > Point 3. documentation commit most people are uncomfortable with.
> > I propose to drop it from v2.
> >
> > Any objection to this plan?
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
> >

^ permalink raw reply

* Re: [PATCH 1/4] eal/common: introduce rte_memset on IA platform
From: Thomas Monjalon @ 2016-12-08 15:09 UTC (permalink / raw)
  To: Yang, Zhiyong
  Cc: dev, yuanhan.liu, Richardson, Bruce, Ananyev, Konstantin,
	De Lara Guarch, Pablo
In-Reply-To: <E182254E98A5DA4EB1E657AC7CB9BD2A3EB565EC@BGSMSX101.gar.corp.intel.com>

2016-12-08 07:41, Yang, Zhiyong:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2016-12-05 16:26, Zhiyong Yang:
> > > +#ifndef _RTE_MEMSET_X86_64_H_
> > 
> > Is this implementation specific to 64-bit?
> > 
> 
> Yes.

So should we rename this file?
rte_memset.h -> rte_memset_64.h

You need also to create a file rte_memset.h for each arch.

^ permalink raw reply

* Re: [PATCH 01/22] ethdev: introduce generic flow API
From: Adrien Mazarguil @ 2016-12-08 15:09 UTC (permalink / raw)
  To: Chandran, Sugesh
  Cc: Kevin Traynor, dev@dpdk.org, Thomas Monjalon,
	De Lara Guarch, Pablo, Olivier Matz, sugesh.chandran@intel.comn
In-Reply-To: <2EF2F5C0CC56984AA024D0B180335FCB13EC330D@IRSMSX102.ger.corp.intel.com>

Hi Sugesh,

On Tue, Dec 06, 2016 at 06:11:38PM +0000, Chandran, Sugesh wrote:
[...]
> > >>> +int
> > >>> +rte_flow_validate(uint8_t port_id,
> > >>> +		  const struct rte_flow_attr *attr,
> > >>> +		  const struct rte_flow_item pattern[],
> > >>> +		  const struct rte_flow_action actions[],
> > >>> +		  struct rte_flow_error *error);
> > >>
> > >> Why not just use rte_flow_create() and get an error? Is it less
> > >> disruptive to do a validate and find the rule cannot be created, than
> > >> using a create directly?
> > >
> > > The rationale can be found in the original RFC, which I'll convert to
> > > actual documentation in v2. In short:
> > >
> > > - Calling rte_flow_validate() before rte_flow_create() is useless since
> > >   rte_flow_create() also performs validation.
> > >
> > > - We cannot possibly express a full static set of allowed flow rules, even
> > >   if we could, it usually depends on the current hardware configuration
> > >   therefore would not be static.
> > >
> > > - rte_flow_validate() is thus provided as a replacement for capability
> > >   flags. It can be used to determine during initialization if the underlying
> > >   device can support the typical flow rules an application might want to
> > >   provide later and do something useful with that information (e.g. always
> > >   use software fallback due to HW limitations).
> > >
> > > - rte_flow_validate() being a subset of rte_flow_create(), it is essentially
> > >   free to expose.
> > 
> > make sense now, thanks.
> [Sugesh] : We had this discussion earlier at the design stage about the time taken for programming the hardware,
> and how to make it deterministic. How about having a timeout parameter as well for the rte_flow_*
> If the hardware flow insert is timed out, error out than waiting indefinitely, so that application have some control over
> The time to program the flow. It can be another set of APIs something like, rte_flow_create_timeout()

Yes as discussed the existing API does not provide any timing constraints to
PMDs, validate() and create() may take forever to complete, although PMDs
are strongly encouraged to take as little time as possible.

Like you suggested, this could be done through distinct API calls. The
validate() function would also have its _timeout() counterpart since the set
of possible rules could be restricted in that mode.

> Are you going to provide any control over the initialization of NIC  to define the capability matrices
> For eg; To operate in a L3 router mode,  software wanted to initialize the NIC port only to consider the L2 and L3 fields.
> I assume the initialization is done based on the first rules that are programmed into the NIC.?

Precisely, PMDs are supposed to determine the most appropriate device mode
to use in order to handle the requested rules. They may even switch to
another mode if necessary assuming this does not break existing constraints.

I think we've discussed an atomic (commit-based) mode of operation through
separate functions as well, where the application would attempt to create a
bunch of rules at once, possibly making it easier for PMDs to determine the
most appropriate mode of operation for the device.

All of these may be added later according to users feedback once the basic
API has settled.

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply

* Re: [PATCH] net: introduce big and little endian types
From: Neil Horman @ 2016-12-08 15:07 UTC (permalink / raw)
  To: Nélio Laranjeiro
  Cc: dev, Ananyev, Konstantin, Bruce Richardson, Wiles, Keith,
	Morten Brørup, wenzhuo.lu, Olivier Matz
In-Reply-To: <20161208093005.GD21794@autoinstall.dev.6wind.com>

On Thu, Dec 08, 2016 at 10:30:05AM +0100, Nélio Laranjeiro wrote:
> Hi all,
> 
> Following previous discussions, I would like to gather requirements for
> v2, currently we have:
> 
> 1. Introduction of new typedefs.
> 2. Modification of network headers.
> 3. Modification of rte_*_to_*() functions.
> 
> Point 1. seems not to be an issue, everyone seems to agree on the fact
> having those types could help to document some parts of the code.
> 
No objection here

> Point 2. does not cause any ABI change as it is only a documentation
> commit, not sure if anyone disagrees about this.
> 
I have an objection here, and I think it was stated by others previously.  While
its fine to offer endian encoded types so that developers can use them
expediently, I don't like the idea of coding them into network headers
specifically.  I assert that because network headers represent multiple views of
network data (both network byte order if the data is taken off the wire and cpu
byte order if its translated.  To implement such a network header change
efficiently what you would need is something like the following:

struct rte_ip_network_hdr {
	rte_le_u32 dst;
	rte_le_u32 src;
	...
}; 

struct rte_ip_cpu_hdr {
	rte_cpu_u32 dst;
	rte_cpu_u32 src;
	...
};

where rte_cpu_* is defined to a big endian or little endian type based on the
cpu being targeted.  

Then of course you need to define translation macros to do all the appropriate
conversions convieniently (or you need to do specific translations on the
network byte order as needed, which may lead to lots of repeated conversions).
Regardless, this seems to be unscalable. Endian types are the sort of thing that
you should only use sparingly, not by default.

> Point 3. documentation commit most people are uncomfortable with.
> I propose to drop it from v2.
> 
> Any objection to this plan?
> 
> -- 
> Nélio Laranjeiro
> 6WIND
> 

^ permalink raw reply

* Re: [RFC] ethdev: expand size of eth_dev_name in next release
From: Thomas Monjalon @ 2016-12-08 15:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev
In-Reply-To: <20161207182717.1fdb0851@xeon-e3>

2016-12-07 18:27, Stephen Hemminger:
> In order to support Hyper-V in a direct fashion, the eth_dev name
> needs to be expanded. The standard format for text representation of GUID
> is 36 bytes (plus null).  See uuid_unparse(3).
[...]
> --- a/doc/guides/rel_notes/release_17_02.rst
> +++ b/doc/guides/rel_notes/release_17_02.rst
> @@ -116,7 +116,9 @@ ABI Changes
>     Also, make sure to start the actual text at the margin.
>     =========================================================
>  
> -
> + * The macro ``RTE_ETH_NAME_MAX_LEN`` used in rte_eth_dev_data will be
> +   increased from 32 to 40 characters to allow for longer values such
> +   as GUID which is 36 characters long (plus null character).

Please start at the margin and keep the double blank lines before the next title.

>  Shared Library Versions
>  -----------------------
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 9678179..68cb956 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -1652,7 +1652,11 @@ struct rte_eth_dev_sriov {
>  };
>  #define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)
>  
> +#ifdef RTE_NEXT_ABI
> +#define RTE_ETH_NAME_MAX_LEN 40
> +#else
>  #define RTE_ETH_NAME_MAX_LEN (32)
> +#endif

No need for RTE_NEXT_ABI as it was planned to break ethdev ABI for
several reasons (see doc/guides/rel_notes/deprecation.rst).

Note that we should continue the discussion about the ABI process,
but I prefer avoiding this debate during December as we are really
too busy until the RC1.

^ permalink raw reply

* Re: [PATCH] Scheduler: add driver for scheduler crypto pmd
From: Neil Horman @ 2016-12-08 14:57 UTC (permalink / raw)
  To: Declan Doherty
  Cc: Richardson, Bruce, Thomas Monjalon, Zhang, Roy Fan, dev@dpdk.org
In-Reply-To: <ef95d01c-b2c6-15fc-ef77-f0392e34e863@intel.com>

On Wed, Dec 07, 2016 at 04:04:17PM +0000, Declan Doherty wrote:
> On 07/12/16 14:46, Richardson, Bruce wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: Neil Horman [mailto:nhorman@tuxdriver.com]
> > > Sent: Wednesday, December 7, 2016 2:17 PM
> > > To: Doherty, Declan <declan.doherty@intel.com>
> > > Cc: Richardson, Bruce <bruce.richardson@intel.com>; Thomas Monjalon
> > > <thomas.monjalon@6wind.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> > > dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH] Scheduler: add driver for scheduler crypto
> > > pmd
> > > 
> > > On Wed, Dec 07, 2016 at 12:42:15PM +0000, Declan Doherty wrote:
> > > > On 05/12/16 15:12, Neil Horman wrote:
> > > > > On Fri, Dec 02, 2016 at 04:22:16PM +0000, Declan Doherty wrote:
> > > > > > On 02/12/16 14:57, Bruce Richardson wrote:
> > > > > > > On Fri, Dec 02, 2016 at 03:31:24PM +0100, Thomas Monjalon wrote:
> > > > > > > > 2016-12-02 14:15, Fan Zhang:
> > > > > > > > > This patch provides the initial implementation of the
> > > > > > > > > scheduler poll mode driver using DPDK cryptodev framework.
> > > > > > > > > 
> > > > > > > > > Scheduler PMD is used to schedule and enqueue the crypto ops
> > > > > > > > > to the hardware and/or software crypto devices attached to
> > > > > > > > > it (slaves). The dequeue operation from the slave(s), and
> > > > > > > > > the possible dequeued crypto op reordering, are then carried
> > > out by the scheduler.
> > > > > > > > > 
> > > > > > > > > The scheduler PMD can be used to fill the throughput gap
> > > > > > > > > between the physical core and the existing cryptodevs to
> > > > > > > > > increase the overall performance. For example, if a physical
> > > > > > > > > core has higher crypto op processing rate than a cryptodev,
> > > > > > > > > the scheduler PMD can be introduced to attach more than one
> > > cryptodevs.
> > > > > > > > > 
> > > > > > > > > This initial implementation is limited to supporting the
> > > > > > > > > following scheduling modes:
> > > > > > > > > 
> > > > > > > > > - CRYPTO_SCHED_SW_ROUND_ROBIN_MODE (round robin amongst
> > > attached software
> > > > > > > > >     slave cryptodevs, to set this mode, the scheduler should
> > > have been
> > > > > > > > >     attached 1 or more software cryptodevs.
> > > > > > > > > 
> > > > > > > > > - CRYPTO_SCHED_HW_ROUND_ROBIN_MODE (round robin amongst
> > > attached hardware
> > > > > > > > >     slave cryptodevs (QAT), to set this mode, the scheduler
> > > should have
> > > > > > > > >     been attached 1 or more QATs.
> > > > > > > > 
> > > > > > > > Could it be implemented on top of the eventdev API?
> > > > > > > > 
> > > > > > > Not really. The eventdev API is for different types of
> > > > > > > scheduling between multiple sources that are all polling for
> > > > > > > packets, compared to this, which is more analgous - as I
> > > > > > > understand it - to the bonding PMD for ethdev.
> > > > > > > 
> > > > > > > To make something like this work with an eventdev API you would
> > > > > > > need to use one of the following models:
> > > > > > > * have worker cores for offloading packets to the different crypto
> > > > > > >   blocks pulling from the eventdev APIs. This would make it
> > > difficult to
> > > > > > >   do any "smart" scheduling of crypto operations between the
> > > blocks,
> > > > > > >   e.g. that one crypto instance may be better at certain types of
> > > > > > >   operations than another.
> > > > > > > * move the logic in this driver into an existing eventdev
> > > instance,
> > > > > > >   which uses the eventdev api rather than the crypto APIs and so
> > > has an
> > > > > > >   extra level of "structure abstraction" that has to be worked
> > > though.
> > > > > > >   It's just not really a good fit.
> > > > > > > 
> > > > > > > So for this workload, I believe the pseudo-cryptodev instance is
> > > > > > > the best way to go.
> > > > > > > 
> > > > > > > /Bruce
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > > As Bruce says this is much more analogous to the ethdev bonding
> > > > > > driver, the main idea is to allow different crypto op scheduling
> > > > > > mechanisms to be defined transparently to an application. This
> > > > > > could be load-balancing across multiple hw crypto devices, or
> > > > > > having a software crypto device to act as a backup device for a hw
> > > > > > accelerator if it becomes oversubscribed. I think the main
> > > > > > advantage of a crypto-scheduler approach means that the data path
> > > > > > of the application doesn't need to have any knowledge that
> > > > > > scheduling is happening at all, it is just using a different crypto
> > > device id, which is then manages the distribution of crypto work.
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > This is a good deal like the bonding pmd, and so from a certain
> > > > > standpoint it makes sense to do this, but whereas the bonding pmd is
> > > > > meant to create a single path to a logical network over several
> > > > > physical networks, this pmd really only focuses on maximizing
> > > > > througput, and for that we already have tools.  As Thomas mentions,
> > > > > there is the eventdev library, but from my view the distributor
> > > > > library already fits this bill.  It already is a basic framework to
> > > > > process mbufs in parallel according to whatever policy you want to
> > > implement, which sounds like exactly what the goal of this pmd is.
> > > > > 
> > > > > Neil
> > > > > 
> > > > > 
> > > > 
> > > > Hey Neil,
> > > > 
> > > > this is actually intended to act and look a good deal like the
> > > > ethernet bonding device but to handling the crypto scheduling use cases.
> > > > 
> > > > For example, take the case where multiple hw accelerators may be
> > > available.
> > > > We want to provide user applications with a mechanism to transparently
> > > > balance work across all devices without having to manage the load
> > > > balancing details or the guaranteeing of ordering of the processed ops
> > > > on the dequeue_burst side. In this case the application would just use
> > > > the crypto dev_id of the scheduler and it would look after balancing
> > > > the workload across the available hw accelerators.
> > > > 
> > > > 
> > > > +-------------------+
> > > > |  Crypto Sch PMD   |
> > > > |                   |
> > > > | ORDERING / RR SCH |
> > > > +-------------------+
> > > >         ^ ^ ^
> > > >         | | |
> > > >       +-+ | +-------------------------------+
> > > >       |   +---------------+                 |
> > > >       |                   |                 |
> > > >       V                   V                 V
> > > > +---------------+ +---------------+ +---------------+
> > > > | Crypto HW PMD | | Crypto HW PMD | | Crypto HW PMD |
> > > > +---------------+ +---------------+ +---------------+
> > > > 
> > > > Another use case we hope to support is migration of processing from
> > > > one device to another where a hw and sw crypto pmd can be bound to the
> > > > same crypto scheduler and the crypto processing could be
> > > > transparently migrated from the hw to sw pmd. This would allow for hw
> > > > accelerators to be hot-plugged attached/detached in a Guess VM
> > > > 
> > > > +----------------+
> > > > | Crypto Sch PMD |
> > > > |                |
> > > > | MIGRATION SCH  |
> > > > +----------------+
> > > >       | |
> > > >       | +-----------------+
> > > >       |                   |
> > > >       V                   V
> > > > +---------------+ +---------------+
> > > > | Crypto HW PMD | | Crypto SW PMD |
> > > > |   (Active)    | |   (Inactive)  |
> > > > +---------------+ +---------------+
> > > > 
> > > > The main point is that isn't envisaged as just a mechanism for
> > > > scheduling crypto work loads across multiple cores, but a framework
> > > > for allowing different scheduling mechanisms to be introduced, to
> > > > handle different crypto scheduling problems, and done so in a way
> > > > which  is completely transparent to the data path of an application.
> > > > Like the eth bonding driver we want to support creating the crypto
> > > > scheduler from EAL options, which allow specification of the
> > > > scheduling mode and the crypto pmds which are to be bound to that crypto
> > > scheduler.
> > > > 
> > > > 
> > > I get what its for, that much is pretty clear.  But whereas the bonding
> > > driver benefits from creating a single device interface for the purposes
> > > of properly routing traffic through the network stack without exposing
> > > that complexity to the using application, this pmd provides only
> > > aggregation accoring to various policies.  This is exactly what the
> > > distributor library was built for, and it seems like a re-invention of the
> > > wheel to ignore that.  At the very least, you should implement this pmd on
> > > top of the distributor library.  If that is impracitcal, then I somewhat
> > > question why we have the distributor library at all.
> > > 
> > > Neil
> > > 
> > 
> > Hi Neil,
> > 
> > The distributor library, and the eventdev framework are not the solution here, as, firstly, the crypto devices are not cores, in the same way that ethdev's are not cores, and the distributor library is for evenly distributing work among cores. Sure, some crypto implementations may be software only, but many aren't, and those that are software still appear as a device to software that must be used like they were a HW device. In the same way that to use distributor to load balance traffic between various TX ports is not a suitable solution - because you need to use cores to do the work "bridging" between the distributor/eventdev and the ethdev device, similarly here, if we distribute traffic using the distributor, you need cores to pull those packets from the distributor and offload them to the crypto devices. To use the distributor library in place of this vpmd, we'd need crypto devices which are aware of how to talk to the distributor, and use it's protocols for pushing/pulling packets, or else we are pulling in extra core cycles to do bridging work.
> > 
> > Secondly, the distributor and eventdev libraries are designed for doing flow based (generally atomic) packet distribution. Load balancing between crypto devices is not generally based on flows, but rather on other factors like packet size, offload cost per device, etc. To distributor/eventdev, all workers are equal, but for working with devices, for crypto offload or nic transmission, that is plainly not the case. In short the distribution problems that are being solved by distributor and eventdev libraries are fundamentally different than those being solved by this vpmd. They would be the wrong tool for the job.
> > 
> > I would agree with the previous statements that this driver is far closer in functionality to the bonded ethdev driver than anything else. It makes multiple devices appear as a single one while hiding the complexity of the multiple devices to the using application. In the same way as the bonded ethdev driver has different modes for active-backup, and for active-active for increased throughput, this vpmd for crypto can have the exact same modes - multiple active bonded devices for higher performance operation, or two devices in active backup to enable migration when using SR-IOV as described by Declan above.
> > 
> > Regards,
> > /Bruce
> > 
> 
> I think that having scheduler in the pmd name here may be somewhat of a
> loaded term and is muddying the waters of the problem we are trying to
> address and I think if we were to rename this to crypto_bond_pmd it may make
> our intent for what we want this pmd to achieve clearer.
> 
> Neil, in most of the initial scheduling use cases we want to address with
> this pmd initially, we are looking to schedule within the context of a
> single lcore on multiple hw accelerators or a mix of hw accelerators and sw
> pmds and therefore using the distributor or the eventdev wouldn't add a lot
> of value.
> 
> Declan

Ok, these are fair points, and I'll concede to them.  That said, it still seems
like a waste to me to ignore the 80% functionality overlap to be had here.  That
is to say, the distributor library does alot of work that both this pmd and the
bonding pmd could benefit from.  Perhaps its worth looking at how to enhance the
distributor library such that worker tasks can be affined to a single cpu, and
the worker assignment can be used as indexed device assignment (the idea being
that a single worker task might represent multiple worker ids in the distributor
library).  that way such a crypto aggregator pmd or the bonding pmd's
implementation is little more than setting tags in mbufs accoring to appropriate
policy.

Neil

^ permalink raw reply

* Re: [PATCH 01/22] ethdev: introduce generic flow API
From: Adrien Mazarguil @ 2016-12-08 14:50 UTC (permalink / raw)
  To: Xing, Beilei
  Cc: dev@dpdk.org, Thomas Monjalon, De Lara Guarch, Pablo,
	Olivier Matz
In-Reply-To: <94479800C636CB44BD422CB454846E012EA36991@SHSMSX101.ccr.corp.intel.com>

Hi Beilei,

On Thu, Dec 08, 2016 at 09:00:05AM +0000, Xing, Beilei wrote:
[...]
> > +/**
> > + * RTE_FLOW_ITEM_TYPE_ETH
> > + *
> > + * Matches an Ethernet header.
> > + */
> > +struct rte_flow_item_eth {
> > +	struct ether_addr dst; /**< Destination MAC. */
> > +	struct ether_addr src; /**< Source MAC. */
> > +	unsigned int type; /**< EtherType. */
> Hi Adrien,
> 
> ETHERTYPE in ether header is 2 bytes, so I think "uint16_t type" is more appropriate here, what do you think?

You're right, thanks for catching this. I'll update it in v2 (soon).

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply

* [PATCH] ethdev: cleanup device ops struct whitespace
From: Ferruh Yigit @ 2016-12-08 13:59 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

- Grouped related items using empty lines
- Aligned arguments to same column
- All item comments that doesn't fit same line are placed blow the item
  itself
- Moved some comments to same line if overall line < 100 chars

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

---

- ! This patch has the problem of trashing the git history for the struct,
  which is indeed valid argument.
- Some re-ordering also may be required which I hesitate to do
- Some item comments doesn't give extra information and can be removed
---
 lib/librte_ether/rte_ethdev.h | 170 +++++++++++++++++++++---------------------
 1 file changed, 84 insertions(+), 86 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179..1627a42 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1436,6 +1436,7 @@ struct eth_dev_ops {
 	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
 	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OF. */
 	eth_link_update_t          link_update;   /**< Get device link state. */
+
 	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
 	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
 	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
@@ -1444,109 +1445,106 @@ struct eth_dev_ops {
 	/**< Get names of extended statistics. */
 	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
 	/**< Configure per queue stat counter mapping. */
+
 	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
-	/**< Get packet types supported and identified by device*/
-	mtu_set_t                  mtu_set; /**< Set MTU. */
-	vlan_filter_set_t          vlan_filter_set;  /**< Filter VLAN Setup. */
-	vlan_tpid_set_t            vlan_tpid_set;      /**< Outer/Inner VLAN TPID Setup. */
+	/**< Get packet types supported and identified by device. */
+	mtu_set_t                  mtu_set;       /**< Set MTU. */
+
+	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
+	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
 	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
 	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
-	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion */
-	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue.*/
-	eth_queue_stop_t           rx_queue_stop;/**< Stop RX for a queue.*/
-	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue.*/
-	eth_queue_stop_t           tx_queue_stop;/**< Stop TX for a queue.*/
-	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue.*/
-	eth_queue_release_t        rx_queue_release;/**< Release RX queue.*/
-	eth_rx_queue_count_t       rx_queue_count; /**< Get Rx queue count. */
-	eth_rx_descriptor_done_t   rx_descriptor_done;  /**< Check rxd DD bit */
-	/**< Enable Rx queue interrupt. */
-	eth_rx_enable_intr_t       rx_queue_intr_enable;
-	/**< Disable Rx queue interrupt.*/
-	eth_rx_disable_intr_t      rx_queue_intr_disable;
-	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue.*/
-	eth_queue_release_t        tx_queue_release;/**< Release TX queue.*/
+	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
+
+	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
+	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
+	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
+	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
+	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
+	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
+	eth_rx_queue_count_t       rx_queue_count;/**< Get Rx queue count. */
+	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
+	eth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
+	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
+	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
+	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
+
 	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
 	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+
 	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
 	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
-	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control.*/
-	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address */
-	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address */
-	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address */
-	eth_uc_hash_table_set_t    uc_hash_table_set;  /**< Set Unicast Table Array */
-	eth_uc_all_hash_table_set_t uc_all_hash_table_set;  /**< Set Unicast hash bitmap */
-	eth_mirror_rule_set_t	   mirror_rule_set;  /**< Add a traffic mirror rule.*/
-	eth_mirror_rule_reset_t	   mirror_rule_reset;  /**< reset a traffic mirror rule.*/
-	eth_set_vf_rx_mode_t       set_vf_rx_mode;   /**< Set VF RX mode */
-	eth_set_vf_rx_t            set_vf_rx;  /**< enable/disable a VF receive */
-	eth_set_vf_tx_t            set_vf_tx;  /**< enable/disable a VF transmit */
-	eth_set_vf_vlan_filter_t   set_vf_vlan_filter;  /**< Set VF VLAN filter */
-	/** Add UDP tunnel port. */
-	eth_udp_tunnel_port_add_t udp_tunnel_port_add;
-	/** Del UDP tunnel port. */
-	eth_udp_tunnel_port_del_t udp_tunnel_port_del;
-	eth_set_queue_rate_limit_t set_queue_rate_limit;   /**< Set queue rate limit */
-	eth_set_vf_rate_limit_t    set_vf_rate_limit;   /**< Set VF rate limit */
-	/** Update redirection table. */
-	reta_update_t reta_update;
-	/** Query redirection table. */
-	reta_query_t reta_query;
-
-	eth_get_reg_t get_reg;
-	/**< Get registers */
-	eth_get_eeprom_length_t get_eeprom_length;
-	/**< Get eeprom length */
-	eth_get_eeprom_t get_eeprom;
-	/**< Get eeprom data */
-	eth_set_eeprom_t set_eeprom;
-	/**< Set eeprom */
-  /* bypass control */
+	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
+
+	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
+	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
+	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
+
+	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
+	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
+
+	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
+	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
+
+	eth_set_vf_rx_mode_t       set_vf_rx_mode;/**< Set VF RX mode. */
+	eth_set_vf_rx_t            set_vf_rx;     /**< enable/disable a VF receive. */
+	eth_set_vf_tx_t            set_vf_tx;     /**< enable/disable a VF transmit. */
+	eth_set_vf_vlan_filter_t   set_vf_vlan_filter; /**< Set VF VLAN filter. */
+
+	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
+	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
+
+	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
+	eth_set_vf_rate_limit_t    set_vf_rate_limit; /**< Set VF rate limit. */
+
+	reta_update_t              reta_update;   /** Update redirection table. */
+	reta_query_t               reta_query;    /** Query redirection table. */
+
+	eth_get_reg_t              get_reg;           /**< Get registers. */
+	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
+	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
+	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
+
+	/* bypass control */
 #ifdef RTE_NIC_BYPASS
-  bypass_init_t bypass_init;
-  bypass_state_set_t bypass_state_set;
-  bypass_state_show_t bypass_state_show;
-  bypass_event_set_t bypass_event_set;
-  bypass_event_show_t bypass_event_show;
-  bypass_wd_timeout_set_t bypass_wd_timeout_set;
-  bypass_wd_timeout_show_t bypass_wd_timeout_show;
-  bypass_ver_show_t bypass_ver_show;
-  bypass_wd_reset_t bypass_wd_reset;
+	bypass_init_t              bypass_init;
+	bypass_state_set_t         bypass_state_set;
+	bypass_state_show_t        bypass_state_show;
+	bypass_event_set_t         bypass_event_set;
+	bypass_event_show_t        bypass_event_show;
+	bypass_wd_timeout_set_t    bypass_wd_timeout_set;
+	bypass_wd_timeout_show_t   bypass_wd_timeout_show;
+	bypass_ver_show_t          bypass_ver_show;
+	bypass_wd_reset_t          bypass_wd_reset;
 #endif
 
-	/** Configure RSS hash protocols. */
-	rss_hash_update_t rss_hash_update;
-	/** Get current RSS hash configuration. */
-	rss_hash_conf_get_t rss_hash_conf_get;
-	eth_filter_ctrl_t              filter_ctrl;
-	/**< common filter control. */
-	eth_set_mc_addr_list_t set_mc_addr_list; /**< set list of mcast addrs */
-	eth_rxq_info_get_t rxq_info_get;
-	/**< retrieve RX queue information. */
-	eth_txq_info_get_t txq_info_get;
-	/**< retrieve TX queue information. */
+	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
+	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
+	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
+	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
+
+	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
+	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
+
+	eth_timesync_enable_t      timesync_enable;
 	/** Turn IEEE1588/802.1AS timestamping on. */
-	eth_timesync_enable_t timesync_enable;
+	eth_timesync_disable_t     timesync_disable;
 	/** Turn IEEE1588/802.1AS timestamping off. */
-	eth_timesync_disable_t timesync_disable;
-	/** Read the IEEE1588/802.1AS RX timestamp. */
 	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
-	/** Read the IEEE1588/802.1AS TX timestamp. */
+	/** Read the IEEE1588/802.1AS RX timestamp. */
 	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
+	/** Read the IEEE1588/802.1AS TX timestamp. */
+
+	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
+	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
+	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
+	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
 
-	/** Get DCB information */
-	eth_get_dcb_info get_dcb_info;
-	/** Adjust the device clock.*/
-	eth_timesync_adjust_time timesync_adjust_time;
-	/** Get the device clock time. */
-	eth_timesync_read_time timesync_read_time;
-	/** Set the device clock time. */
-	eth_timesync_write_time timesync_write_time;
-	/** Config ether type of l2 tunnel */
 	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-	/** Enable/disable l2 tunnel offload functions */
-	eth_l2_tunnel_offload_set_t l2_tunnel_offload_set;
+	/** Config ether type of l2 tunnel. */
+	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
+	/** Enable/disable l2 tunnel offload functions. */
 };
 
 /**
-- 
2.9.3

^ permalink raw reply related

* Re: [PATCH] net: introduce big and little endian types
From: Wiles, Keith @ 2016-12-08 13:59 UTC (permalink / raw)
  To: Nélio Laranjeiro
  Cc: DPDK, Ananyev, Konstantin, Richardson, Bruce, Morten Brørup,
	Neil Horman, Lu, Wenzhuo, Olivier Matz
In-Reply-To: <20161208093005.GD21794@autoinstall.dev.6wind.com>


> On Dec 8, 2016, at 3:30 AM, Nélio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> Hi all,
> 
> Following previous discussions, I would like to gather requirements for
> v2, currently we have:
> 
> 1. Introduction of new typedefs.
> 2. Modification of network headers.
> 3. Modification of rte_*_to_*() functions.
> 
> Point 1. seems not to be an issue, everyone seems to agree on the fact
> having those types could help to document some parts of the code.

I never stated these new types were useful in any way, I still believe documentation of the code is the better solution then forcing yet another restriction in submitting patches. 

> 
> Point 2. does not cause any ABI change as it is only a documentation
> commit, not sure if anyone disagrees about this.

I guess no ABI change is done, but I feel it should be as the developer now need to adjust his to reflex these new type even if the compiler does not complain.

> 
> Point 3. documentation commit most people are uncomfortable with.

Not sure what this one is stating, but I whole heartily believe documentation of the code is the best way forward.

The main reasons are:
 - We do not need to add yet another type to DPDK to make the patch process even more restrictive.
 - The new types do not add any type of checking for the compiler and the developer can still get it wrong.
- If any common code used in other platform (say Linux kernel driver) we have to include these new types in that environment.
 - Documentation is the best solution IMO to resolve these types of issues and it does not require any new types or code changes in DPDK or developers code.

Sorry, I strongly disagree with this patch in any form expect documentation changes.

> I propose to drop it from v2.
> 
> Any objection to this plan?
> 
> -- 
> Nélio Laranjeiro
> 6WIND

Regards,
Keith


^ permalink raw reply

* Re: [PATCH v2 00/12] Add crypto PMD optimized for ARMv8
From: Zbigniew Bodek @ 2016-12-08 11:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: pablo.de.lara.guarch, jerin.jacob, dev
In-Reply-To: <20161208102419.GE55440@bricha3-MOBL3.ger.corp.intel.com>

On 08.12.2016 11:24, Bruce Richardson wrote:
> On Tue, Dec 06, 2016 at 06:32:53PM -0800, zbigniew.bodek@caviumnetworks.com wrote:
>> From: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
>>
>> Introduce crypto poll mode driver using ARMv8
>> cryptographic extensions. This PMD is optimized
>> to provide performance boost for chained
>> crypto operations processing, such as:
>> * encryption + HMAC generation
>> * decryption + HMAC validation.
>> In particular, cipher only or hash only
>> operations are not provided.
>> Performance gain can be observed in tests
>> against OpenSSL PMD which also uses ARM
>> crypto extensions for packets processing.
>>
> Hi,
>
> great to see more crypto drivers coming into DPDK, thanks.
>
> Question: do you know if this code would have any export compliance
> implications for DPDK - or for those repackaging DPDK? Up till now, all
> the crypto code used by DPDK was actually packaged in separate libraries
> that were re-used, meaning that DPDK didn't contain any crypto
> algorithms itself.
>

Hello Bruce,

I don't know to be honest. I didn't know the reasoning behind not 
including crypto code for Intel for example. I thought it was due to 
licensing and code control rather than export compliance.

Maybe someone from the DPDK community will know what are the constraints 
related to including crypto algorithms to DPDK.

Kind regards
Zbigniew

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox