DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, bruce.richardson@intel.com,
	pablo.de.lara.guarch@intel.com, david.hunt@intel.com,
	mohammad.abdul.awal@intel.com, thomas@monjalon.net,
	ferruh.yigit@intel.com
Subject: [dpdk-dev] [RFC v2 0/9] Modularize and enhance DPDK Python scripts
Date: Thu, 15 Nov 2018 15:47:12 +0000	[thread overview]
Message-ID: <cover.1542291869.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1529940601.git.anatoly.burakov@intel.com>

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
  example)
* Easier gathering of DPDK-centric system information, has potential
  applications in troubleshooting tools
* Reduce code duplication for internal (e.g. quickstart [1], setup.sh)
  and external tools seeking to use the same functionality
* 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
(which are 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?

An alternative approach to something like this would be to
acknowledge the fact that we cannot do everything on our own, and
pull in additional dependencies (preferably automatically - this
can be done through pip, everyone has it and it's not that hard!)
instead of relying on hacky scripts we currently have. The point
is - we do need better tooling, better setup scripts and better
OS/machine logging/troubleshooting tools.

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.

[1] http://patches.dpdk.org/patch/47475/

RFC v2:
- Rebased on latest 18.11 master (rc3)
- Added compressdev support in DevInfo library

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      | 424 +++++++++++++++++++
 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               | 533 ++++--------------------
 usertools/hugepage-info.py              |  32 ++
 10 files changed, 1558 insertions(+), 499 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

-- 
2.17.1

  parent reply	other threads:[~2018-11-15 15:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 15:59 [dpdk-dev] [RFC " Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 1/9] usertools: add DPDK config lib python library Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 2/9] usertools/lib: add platform info library Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 3/9] usertools/cpu_layout: rewrite to use DPDKConfigLib Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 4/9] usertools/lib: support FreeBSD for platform info Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 5/9] usertools/lib: add device information library Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 6/9] usertools/devbind: switch to using DPDKConfigLib Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 7/9] usertools/lib: add hugepage information library Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 8/9] usertools: add hugepage info script Anatoly Burakov
2018-06-25 15:59 ` [dpdk-dev] [RFC 9/9] usertools/lib: add GRUB utility library for hugepage config Anatoly Burakov
2018-06-26  1:09   ` Kevin Wilson
2018-06-26  9:05     ` Burakov, Anatoly
2018-08-14 10:11 ` [dpdk-dev] [RFC 0/9] Modularize and enhance DPDK Python scripts Burakov, Anatoly
2018-08-28  8:16   ` Burakov, Anatoly
2018-11-15 15:47 ` Anatoly Burakov [this message]
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 1/9] usertools: add DPDK config lib python library Anatoly Burakov
2018-11-16  0:45   ` Stephen Hemminger
2018-11-16 11:49     ` Burakov, Anatoly
2018-11-16 14:09       ` Wiles, Keith
2018-11-16 14:13         ` Richardson, Bruce
2018-11-16 14:37           ` Burakov, Anatoly
2018-11-16 14:55             ` Thomas Monjalon
2018-11-16 15:41               ` Wiles, Keith
2018-11-16 15:43               ` Burakov, Anatoly
2018-11-16 15:58                 ` Thomas Monjalon
2018-11-16 16:10                   ` Bruce Richardson
2018-11-16 16:08                 ` Bruce Richardson
2018-11-16 15:38             ` Wiles, Keith
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 2/9] usertools/lib: add platform info library Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 3/9] usertools/cpu_layout: rewrite to use DPDKConfigLib Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 4/9] usertools/lib: support FreeBSD for platform info Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 5/9] usertools/lib: add device information library Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 6/9] usertools/devbind: switch to using DPDKConfigLib Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 7/9] usertools/lib: add hugepage information library Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 8/9] usertools: add hugepage info script Anatoly Burakov
2018-11-15 15:47 ` [dpdk-dev] [RFC v2 9/9] usertools/lib: add GRUB utility library for hugepage config Anatoly Burakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1542291869.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=mohammad.abdul.awal@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).