[RFC,0/9] Modularize and enhance DPDK Python scripts

Message ID cover.1529940601.git.anatoly.burakov@intel.com (mailing list archive)


Anatoly Burakov June 25, 2018, 3:59 p.m. UTC
  This patchset attempts to create a library out of Python scripts that
come with DPDK, with a goal of enabling external tools to get the same
information about the system DPDK has, and perhaps configure DPDK.

Potential applications include:

* Better setup.sh script (it's long overdue, and you know it!)
* Easier development of better tools for developers (see hugepage-info
* Easier gathering of DPDK-centric system information, has potential
  applications in troubleshooting tools
* Reduce code duplication for external tools seeking to use the same
  functionality (bind-unbind, cpu layout, etc)
* Add cross-platform support for our scripts (see cpu-layout example
  now working on FreeBSD)

There are a few things to mention. First of all, it's an RFC, so the
fact that it's unfinished and maybe awkward comes with the territory.
I am also aware of the fact that it's a Python library, that it's
outside the scope of DPDK and that it's somewhat a Not-Invented-Here
kind of proposition where there are a lot of externally available
(and arguably much better designed and implemented) tools that do the
same thing.

So the first question i would like to ask is, is the community at all
interested in something like this? Does it have to be part of DPDK
repository? Can it be maintained in a separate repository? How do we
handle updates and dependencies?

I should also mention that it is *not* intended to be a replacement
for udev or any other method of device binding - if anything, it's
the opposite, in that it takes the whole issue out of the question
and thus would make switching to udev or any other device binding
easier since both internal and external tools can utilize the same
Python API.

Anatoly Burakov (9):
  usertools: add DPDK config lib python library
  usertools/lib: add platform info library
  usertools/cpu_layout: rewrite to use DPDKConfigLib
  usertools/lib: support FreeBSD for platform info
  usertools/lib: add device information library
  usertools/devbind: switch to using DPDKConfigLib
  usertools/lib: add hugepage information library
  usertools: add hugepage info script
  usertools/lib: add GRUB utility library for hugepage config

 usertools/DPDKConfigLib/DevInfo.py      | 414 +++++++++++++++++++
 usertools/DPDKConfigLib/DevUtil.py      | 242 +++++++++++
 usertools/DPDKConfigLib/GrubHugeUtil.py | 175 ++++++++
 usertools/DPDKConfigLib/HugeUtil.py     | 309 ++++++++++++++
 usertools/DPDKConfigLib/PlatformInfo.py | 205 ++++++++++
 usertools/DPDKConfigLib/Util.py         |  84 ++++
 usertools/DPDKConfigLib/__init__.py     |   0
 usertools/cpu_layout.py                 |  53 +--
 usertools/dpdk-devbind.py               | 518 ++++--------------------
 usertools/hugepage-info.py              |  32 ++
 10 files changed, 1544 insertions(+), 488 deletions(-)
 create mode 100755 usertools/DPDKConfigLib/DevInfo.py
 create mode 100755 usertools/DPDKConfigLib/DevUtil.py
 create mode 100755 usertools/DPDKConfigLib/GrubHugeUtil.py
 create mode 100755 usertools/DPDKConfigLib/HugeUtil.py
 create mode 100755 usertools/DPDKConfigLib/PlatformInfo.py
 create mode 100755 usertools/DPDKConfigLib/Util.py
 create mode 100644 usertools/DPDKConfigLib/__init__.py
 create mode 100755 usertools/hugepage-info.py