[v4,0/4] pmdinfogen: rewrite in Python
mbox series

Message ID 20200708212335.25338-1-dmitry.kozliuk@gmail.com
Headers show
Series
  • pmdinfogen: rewrite in Python
Related show

Message

Dmitry Kozlyuk July 8, 2020, 9:23 p.m. UTC
This patchset implements existing pmdinfogen logic in Python, replaces
and removes the old code. The goals of rewriting are:

* easier maintenance by using a more high-level language,
* simpler build process without host application and libelf.

Travis CI script is adjusted to install python3-pyelftools, but other CI
systems may need similar tweaking. Particularly, testing on FreeBSD and
big-endian targets is desired.

---
Changes in v4:

Fix build by removing redundant check.

Changes in v3:

1. Rebase on ToT, add package to CI.
2. Add copyrights, fixup maintainers file.
3. Remove C implementation.

Changes in v2:

1. pyelftools is used instead of hand-written ELF parser.
2. Makefiles are adjusted.
3. f-strings replaced with % formatting to support Python 3.5.
4. Wrapper script does not hide stderr from ar and pmdinfogen.

---
Dmitry Kozlyuk (4):
  pmdinfogen: add Python implementation
  build: use Python pmdinfogen
  doc/linux_gsg: require pyelftools for pmdinfogen
  pmdinfogen: remove C implementation

 .travis.yml                        |   2 +-
 GNUmakefile                        |   2 +-
 MAINTAINERS                        |   2 +-
 buildtools/Makefile                |   9 -
 buildtools/gen-pmdinfo-cfile.sh    |   6 +-
 buildtools/meson.build             |   1 +
 buildtools/pmdinfogen.py           | 188 ++++++++++++
 buildtools/pmdinfogen/Makefile     |  20 --
 buildtools/pmdinfogen/meson.build  |  14 -
 buildtools/pmdinfogen/pmdinfogen.c | 456 -----------------------------
 buildtools/pmdinfogen/pmdinfogen.h | 119 --------
 doc/guides/linux_gsg/sys_reqs.rst  |   6 +
 drivers/meson.build                |   2 +-
 meson.build                        |   1 -
 mk/internal/rte.compile-pre.mk     |   2 +-
 mk/rte.sdkinstall.mk               |   2 -
 16 files changed, 203 insertions(+), 629 deletions(-)
 delete mode 100644 buildtools/Makefile
 create mode 100755 buildtools/pmdinfogen.py
 delete mode 100644 buildtools/pmdinfogen/Makefile
 delete mode 100644 buildtools/pmdinfogen/meson.build
 delete mode 100644 buildtools/pmdinfogen/pmdinfogen.c
 delete mode 100644 buildtools/pmdinfogen/pmdinfogen.h

Comments

Neil Horman July 9, 2020, 10:42 a.m. UTC | #1
On Thu, Jul 09, 2020 at 12:23:31AM +0300, Dmitry Kozlyuk wrote:
> This patchset implements existing pmdinfogen logic in Python, replaces
> and removes the old code. The goals of rewriting are:
> 
> * easier maintenance by using a more high-level language,
> * simpler build process without host application and libelf.
> 
> Travis CI script is adjusted to install python3-pyelftools, but other CI
> systems may need similar tweaking. Particularly, testing on FreeBSD and
> big-endian targets is desired.
> 
> ---
> Changes in v4:
> 
> Fix build by removing redundant check.
> 
> Changes in v3:
> 
> 1. Rebase on ToT, add package to CI.
> 2. Add copyrights, fixup maintainers file.
> 3. Remove C implementation.
> 
> Changes in v2:
> 
> 1. pyelftools is used instead of hand-written ELF parser.
> 2. Makefiles are adjusted.
> 3. f-strings replaced with % formatting to support Python 3.5.
> 4. Wrapper script does not hide stderr from ar and pmdinfogen.
> 
> ---
> Dmitry Kozlyuk (4):
>   pmdinfogen: add Python implementation
>   build: use Python pmdinfogen
>   doc/linux_gsg: require pyelftools for pmdinfogen
>   pmdinfogen: remove C implementation
> 

I'm not currently setup to test with cross compiling, but for direct targets
(tested on power and x86), it seems to work well

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Bruce Richardson July 21, 2020, 1:51 p.m. UTC | #2
On Thu, Jul 09, 2020 at 12:23:31AM +0300, Dmitry Kozlyuk wrote:
> This patchset implements existing pmdinfogen logic in Python, replaces
> and removes the old code. The goals of rewriting are:
> 
> * easier maintenance by using a more high-level language,
> * simpler build process without host application and libelf.
> 
> Travis CI script is adjusted to install python3-pyelftools, but other CI
> systems may need similar tweaking. Particularly, testing on FreeBSD and
> big-endian targets is desired.
> 
> ---
> Changes in v4:
> 
> Fix build by removing redundant check.
> 
> Changes in v3:
> 
> 1. Rebase on ToT, add package to CI.
> 2. Add copyrights, fixup maintainers file.
> 3. Remove C implementation.
> 
> Changes in v2:
> 
> 1. pyelftools is used instead of hand-written ELF parser.
> 2. Makefiles are adjusted.
> 3. f-strings replaced with % formatting to support Python 3.5.
> 4. Wrapper script does not hide stderr from ar and pmdinfogen.
> 
> ---
> Dmitry Kozlyuk (4):
>   pmdinfogen: add Python implementation
>   build: use Python pmdinfogen
>   doc/linux_gsg: require pyelftools for pmdinfogen
>   pmdinfogen: remove C implementation
> 
I've done builds with this patchset on linux and FreeBSD and checked the
results with dpdk-pmdinfo script. All looks ok to me.

Series-tested-by: Bruce Richardson <bruce.richardson@intel.com>