From patchwork Thu Jul 2 00:02:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 72694 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED2EEA0350; Thu, 2 Jul 2020 02:02:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 359761D5D1; Thu, 2 Jul 2020 02:02:51 +0200 (CEST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by dpdk.org (Postfix) with ESMTP id AB3D01D5A6 for ; Thu, 2 Jul 2020 02:02:48 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id d17so14643640ljl.3 for ; Wed, 01 Jul 2020 17:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cj78+bsEtIKedIm3xULBWyTH7wvdqf3TdD1maWxm4pI=; b=QxiIROrKYgIe3dP1I7V1u7jJauokRHMwiBhnkvc8kiXJaoM46fiQEFTlKPFIp7fFn5 LilC9ixQu/v0j5pUKJqzWZyL0xlwvq1GcwkaJVEHbQ29LRBg8heH/XHnA2qELxZ1kMl5 ZxFP0Gndwh8orS9zQ3rytbW3kmQaotN7BQ+/omGEkry+R4vqonUzbbBl6X/UCtPzuKnk GzgcU9DcwrQZW0my5hz0Z9Y8yUfp0gZKBOPzrvPBDPkFzEMSdk44tafVaci2OeY+o3T8 LBR0hTRhrldOFoWlQixsVdjiPGwYfU7o30IVBGSy7ArWTtQjrJ5/MQCP/f27AzPSsmLJ BLiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cj78+bsEtIKedIm3xULBWyTH7wvdqf3TdD1maWxm4pI=; b=Xw9Y2tXjssC9pjIE/7gaf1J7Qhbqvkb3wRDjGlqn0pbLi980TpoBmb/FVZC3BLpFyt 78TNRc/R6n/o46XKEI8UbOmMvtjASOG2Fa48gB2TBP77D8EMvzwyXvOAWZrkYFKkTz3u /gv880Xl3+FnuwFwchIK31bbKx1FEIXy04PTyuEpwQhzNclF94zaXIbPXSFesuf7HVff jWkeAHSnCs48KQhRB+nomf1UfFHIv97xDmdYBp124tzZCmQmW/MB1/46wdUoamuQQdpM K2DLL4UzmHRSqL30C0Zp/DEkc3cy2R45C12JFT5PsZYKRa+mezFK3QdbuKoWrrSbiRMW j+bw== X-Gm-Message-State: AOAM5322dNo7yNIKMh/A2V12s11OkBiIYJYm9Y0NSYXQb2RnAf5fvNcd 6GKD3tw6SuOb9CrhLL8VU/Lzvnib1WM= X-Google-Smtp-Source: ABdhPJzzsHdFYqcLepV7mSl2YQg05pu1ZMKwJzHuEMaQpcKNxcanv9vGgkqKq7ZB1Kyt3hQDROBG/Q== X-Received: by 2002:a2e:8699:: with SMTP id l25mr6010467lji.81.1593648167841; Wed, 01 Jul 2020 17:02:47 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u26sm2875550lfq.72.2020.07.01.17.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 17:02:47 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Neil Horman , Bruce Richardson , Thomas Monjalon , robin.jarry@6wind.com, Jie Zhou , Tal Shnaiderman , Dmitry Kozlyuk Date: Thu, 2 Jul 2020 03:02:30 +0300 Message-Id: <20200702000232.10761-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200702000232.10761-1-dmitry.kozliuk@gmail.com> References: <20200622004503.29036-1-dmitry.kozliuk@gmail.com> <20200702000232.10761-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC PATCH v2 1/3] pmdinfogen: prototype in Python X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Requires pyelfutils, but no docs yet. Signed-off-by: Dmitry Kozlyuk --- buildtools/pmdinfogen.py | 191 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100755 buildtools/pmdinfogen.py diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py new file mode 100755 index 000000000..05252e7ce --- /dev/null +++ b/buildtools/pmdinfogen.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python3 + +import argparse +import ctypes +import json +import sys +import tempfile + +from elftools.elf.elffile import ELFFile +from elftools.elf.sections import SymbolTableSection + + +class ELFSymbol: + def __init__(self, image, symbol): + self._image = image + self._symbol = symbol + + @property + def size(self): + return self._symbol["st_size"] + + @property + def value(self): + data = self._image._image.get_section(self._symbol["st_shndx"]).data() + base = self._symbol["st_value"] + return data[base : base + self.size] + + @property + def string_value(self): + value = self.value + if len(value): + return value[:-1].decode() + return "" + + +class ELFImage: + def __init__(self, data): + self._image = ELFFile(data) + self._symtab = self._image.get_section_by_name(".symtab") + if not isinstance(self._symtab, SymbolTableSection): + raise Exception(".symtab section is not a symbol table") + + @property + def is_big_endian(self): + return not self._image.little_endian + + def find_by_name(self, name): + symbol = self._symtab.get_symbol_by_name(name) + if symbol: + return ELFSymbol(self, symbol[0]) + + def find_by_prefix(self, prefix): + for i in range(self._symtab.num_symbols()): + symbol = self._symtab.get_symbol(i) + if symbol.name.startswith(prefix): + yield ELFSymbol(self, symbol) + + +def define_rte_pci_id(is_big_endian): + base_type = ctypes.LittleEndianStructure + if is_big_endian: + base_type = ctypes.BigEndianStructure + + class rte_pci_id(base_type): + _pack_ = True + _fields_ = [ + ("class_id", ctypes.c_uint32), + ("vendor_id", ctypes.c_uint16), + ("device_id", ctypes.c_uint16), + ("subsystem_vendor_id", ctypes.c_uint16), + ("subsystem_device_id", ctypes.c_uint16), + ] + + return rte_pci_id + + +class Driver: + OPTIONS = [ + ("params", "_param_string_export"), + ("kmod", "_kmod_dep_export"), + ] + + def __init__(self, name, options): + self.name = name + for key, value in options.items(): + setattr(self, key, value) + self.pci_ids = [] + + @classmethod + def load(cls, image, symbol): + name = symbol.string_value + + options = {} + for key, suffix in cls.OPTIONS: + option_symbol = image.find_by_name("__%s%s" % (name, suffix)) + if option_symbol: + value = option_symbol.string_value + options[key] = value + + driver = cls(name, options) + + pci_table_name_symbol = image.find_by_name("__%s_pci_tbl_export" % name) + if pci_table_name_symbol: + driver._load_pci_ids(image, pci_table_name_symbol) + + return driver + + def _load_pci_ids(self, image, table_name_symbol): + table_name = table_name_symbol.string_value + table_symbol = image.find_by_name(table_name) + if not table_symbol: + raise Exception("PCI table declared but not defined: %d" % table_name) + + rte_pci_id = define_rte_pci_id(image.is_big_endian) + + pci_id_size = ctypes.sizeof(rte_pci_id) + if table_symbol.size % pci_id_size != 0: + raise Exception( + "PCI table size (%d) is not a multiple of rte_pci_id size (%d)" + % (table_symbol.size, pci_id_size) + ) + + pci_ids_desc = rte_pci_id * (table_symbol.size // pci_id_size) + pci_ids = pci_ids_desc.from_buffer_copy(table_symbol.value) + for pci_id in pci_ids: + if not pci_id.device_id: + break + self.pci_ids.append( + [ + pci_id.vendor_id, + pci_id.device_id, + pci_id.subsystem_vendor_id, + pci_id.subsystem_device_id, + ] + ) + + def dump(self, file): + dumped = json.dumps(self.__dict__) + escaped = dumped.replace('"', '\\"') + print( + 'const char %s_pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= %s";' + % (self.name, escaped), + file=file, + ) + + +def load_drivers(image): + drivers = [] + for symbol in image.find_by_prefix("this_pmd_name"): + drivers.append(Driver.load(image, symbol)) + return drivers + + +def dump_drivers(drivers, file): + # Keep legacy order of definitions. + for driver in reversed(drivers): + driver.dump(file) + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("input", help="input object file path or '-' for stdin") + parser.add_argument("output", help="output C file path or '-' for stdout") + return parser.parse_args() + + +def open_input(path): + if path == "-": + temp = tempfile.TemporaryFile() + temp.write(sys.stdin.buffer.read()) + return temp + return open(path, "rb") + + +def open_output(path): + if path == "-": + return sys.stdout + return open(path, "w") + + +def main(): + args = parse_args() + infile = open_input(args.input) + image = ELFImage(infile) + drivers = load_drivers(image) + output = open_output(args.output) + dump_drivers(drivers, output) + + +if __name__ == "__main__": + main() From patchwork Thu Jul 2 00:02:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 72695 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9318BA0350; Thu, 2 Jul 2020 02:03:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 48AB51D5E4; Thu, 2 Jul 2020 02:02:53 +0200 (CEST) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id F241A1D5C0 for ; Thu, 2 Jul 2020 02:02:49 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id 9so29330771ljv.5 for ; Wed, 01 Jul 2020 17:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LqaoIabq7gNhprB9O6OxPn9Vp6sLQwqWeTxfCL90X+Y=; b=Jv1NTpBRvvhjS0F/feprl7lmU86kJj71uW4rASsitr7h4RdxvYpAdW8Gwm4EaRPKdS eZnNB9xVBCCE6gK4G5VGYdImFKg2qOKm8xrJPs+pVizdQba7kWmxzRkYdRhvCFEmA022 QUce5oJyn779yi6QhD339ZAQ7GWXIK/I2sNanHrd1qdBdhfoqxb7T3dLWi17w8/l9sFI z4kQpPoQ55W2RbsXojq+bliBMhaJOio+tI05UK7BIUGl/z6kIO4lI7wqz7PF3BfMUXrk u4g36XuUilRPolyOIqLM6RDjjhjBsGD0v6rB29lbVS5KxXam4T2TyuLno5ExwvAV/nrO M8/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LqaoIabq7gNhprB9O6OxPn9Vp6sLQwqWeTxfCL90X+Y=; b=s8zPRzzMKmWmezmzwDRppR19CV/UQvqa1fKoMu9c4/R5pJqrYrGJnmzD7jIGsEnRBf XKSDHBlwu3rCIYTXMWJoAhBzoDuMK4+BQOEDmMaJhwRvR9WYrjvJb0H8tkY7TLePgtBy diTDeaKwnBnGV76a2oVMjkS389MI9Te6QhCYbhukS8p7gq0WaV8Co56SMrLK158TnNfe z2uz18NMkIGRir4PBpPExjcSoiWGMrJhO9n/6ZOZNK0TOVLqwKBPjrVz21iHdoJWU5de YM0niPgDvNYyswccwGslxHzriOhDd3m9iyjHYkq/MPG1xMTlXfCpMWX8ega/DLa7528F FQfQ== X-Gm-Message-State: AOAM531Gc6Gk3xjMK5xA2L1xpuauuTviSkoWdpN8UpLq0Z5asPoYERUW 6BJhxSj+FcVZeo/N1jDiFosUGySRBPA= X-Google-Smtp-Source: ABdhPJzktHWJS9wIbuqcq6bzIaB41+t+9X1ZXlg9AXN+pqJ/FI8c7aZG4OIh1LzOm+ewdoClHCMnRw== X-Received: by 2002:a2e:7203:: with SMTP id n3mr11857128ljc.174.1593648168960; Wed, 01 Jul 2020 17:02:48 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u26sm2875550lfq.72.2020.07.01.17.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 17:02:48 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Neil Horman , Bruce Richardson , Thomas Monjalon , robin.jarry@6wind.com, Jie Zhou , Tal Shnaiderman , Dmitry Kozlyuk Date: Thu, 2 Jul 2020 03:02:31 +0300 Message-Id: <20200702000232.10761-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200702000232.10761-1-dmitry.kozliuk@gmail.com> References: <20200622004503.29036-1-dmitry.kozliuk@gmail.com> <20200702000232.10761-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC PATCH v2 2/3] build: use Python pmdinfogen X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Also don't suppress stderr from ar and pmdinfogen. Signed-off-by: Dmitry Kozlyuk --- GNUmakefile | 2 +- buildtools/Makefile | 9 --------- buildtools/gen-pmdinfo-cfile.sh | 3 +-- buildtools/meson.build | 3 +-- drivers/meson.build | 2 +- mk/internal/rte.compile-pre.mk | 2 +- mk/rte.sdkinstall.mk | 2 -- 7 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 buildtools/Makefile diff --git a/GNUmakefile b/GNUmakefile index e8de422df..242d30d2e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -12,6 +12,6 @@ export RTE_SDK # directory list # -ROOTDIRS-y := buildtools lib kernel drivers app +ROOTDIRS-y := lib kernel drivers app include $(RTE_SDK)/mk/rte.sdkroot.mk diff --git a/buildtools/Makefile b/buildtools/Makefile deleted file mode 100644 index 7f76fd7d6..000000000 --- a/buildtools/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2016 Neil Horman -# All rights reserved. - -include $(RTE_SDK)/mk/rte.vars.mk - -DIRS-y += pmdinfogen - -include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh index 43059cf36..eeeab678e 100755 --- a/buildtools/gen-pmdinfo-cfile.sh +++ b/buildtools/gen-pmdinfo-cfile.sh @@ -9,6 +9,5 @@ pmdinfogen=$3 # The generated file must not be empty if compiled in pedantic mode echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output for ofile in `ar t $arfile` ; do - ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null + ar p $arfile $ofile | $pmdinfogen - - >> $output done -exit 0 diff --git a/buildtools/meson.build b/buildtools/meson.build index f9d2fdf74..88c238ca4 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -1,9 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2019 Intel Corporation -subdir('pmdinfogen') - pkgconf = find_program('pkg-config', 'pkgconf', required: false) +pmdinfogen = find_program('pmdinfogen.py') pmdinfo = find_program('gen-pmdinfo-cfile.sh') list_dir_globs = find_program('list-dir-globs.py') check_symbols = find_program('check-symbols.sh') diff --git a/drivers/meson.build b/drivers/meson.build index e78c76c55..37822537a 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -119,7 +119,7 @@ foreach class:dpdk_driver_classes command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], output: out_filename, - depends: [pmdinfogen, tmp_lib]) + depends: [tmp_lib]) endif version_map = '@0@/@1@/@2@_version.map'.format( meson.current_source_dir(), diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk index df05b5576..bb2ab0725 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -59,7 +59,7 @@ endif CHECK_SYMBOLS_SCRIPT = $(RTE_SDK)/buildtools/check-symbols.sh CHECK_SYMBOLS = $(CHECK_SYMBOLS_SCRIPT) $(SRCDIR)/$(EXPORT_MAP) $@ -PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c +PMDINFO_GEN = $(RTE_SDK)/buildtools/pmdinfogen.py $@ $@.pmd.c PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@ PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \ diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 32bed5d95..875a64f04 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -98,7 +98,6 @@ install-runtime: $(Q)cp $(CP_FLAGS) $O/lib/* $(DESTDIR)$(libdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) $(Q)tar -cf - -C $O --exclude 'app/*.map' \ - --exclude app/dpdk-pmdinfogen \ --exclude 'app/cmdline*' --exclude app/test \ --exclude app/testacl --exclude app/testpipeline app | \ tar -xf - -C $(DESTDIR)$(bindir) $(TAR_X_FLAGS) @@ -134,7 +133,6 @@ install-sdk: $(Q)cp $(CP_FLAGS) $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)/app) $(Q)cp $(CP_FLAGS) $O/.config $(DESTDIR)$(targetdir) - $(Q)cp $(CP_FLAGS) $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) From patchwork Thu Jul 2 00:02:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 72696 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CBBE8A0350; Thu, 2 Jul 2020 02:03:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E5AD11D5F3; Thu, 2 Jul 2020 02:02:54 +0200 (CEST) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by dpdk.org (Postfix) with ESMTP id B44A71D5C3 for ; Thu, 2 Jul 2020 02:02:50 +0200 (CEST) Received: by mail-lf1-f66.google.com with SMTP id y18so14761547lfh.11 for ; Wed, 01 Jul 2020 17:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1+v3DraxAk+R/FdDJjf7vMV9ncMFhD0gTbJShGvK9m4=; b=uWceVHt+x74q9Ldp4tCrNNpiuhFo4f5WOObzkiIrqLpVkUZY7+TjlQNf+XHzxfnXzT C04Apv7TTcMXjfb4QiYOAC0dz8inCNpu7vPcKHtFCvSn9PogIfTtenCMuIbpkwha+sxA 60W+pqrxsEH2x6kJFt0RzlaLLnodOMt/uEpu+V+asIhM5Fg8sqx429DQf7k15HPvlrhy 0/4nijm8e0oqUH9wY483zyDE9IabrxxJAhUI5hohIFDxHk4S00tQK/xdk/lPyNK+iY9Y QN28QBAkFNVx6GojwcFqQWsRrhyqb1+UsZP2sW3xUW3YypIAZGKdF6flc5e4OMdsFKox IHMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1+v3DraxAk+R/FdDJjf7vMV9ncMFhD0gTbJShGvK9m4=; b=LhnSivD2aLlMMN/B5u/hoEjRj7KAmnRnQotvQNuxzVrEV3B0o7I2zYRngKdt+Cwsb1 Jwudt3vfQVRXp67YwGPWrj2Sl6bUCnydF5s1tp0qkgQQNlG5IlSOxCMkgbc4DRgI4dL9 WE6DSyrA5XD9LVnKyv2dRbDTLANjrMNLaRKmSW4ueHRQNuMg6/vdecnmymv9lrfQi36n GYe6meJbL5ZvsWf667YxiQiMhvVBAPFDzTzfXhKwK50jSB92imQ+5iohrKAds2CnylDs GQqHA2ySbGDuX1lP1UkY/bL16XRj34RwBrpEOrBdKz2Glc0XaFx8FApdcE0+0v58buJm KwCg== X-Gm-Message-State: AOAM533Pwhl8HoeCt1/8QJhVEcBVIEdkJ4tTMDDkoFHA0oWCVnnmNEkD bimRm66obezil/RMxuyXnKD5GwdJZzc= X-Google-Smtp-Source: ABdhPJzNz10dmkx0PT93ea1ylOOZcM69uyQg9laJ9UO3pd0X5UAuSQ7T/7fn/d11zPB2xwKdhEflag== X-Received: by 2002:a19:cc93:: with SMTP id c141mr16603350lfg.15.1593648170057; Wed, 01 Jul 2020 17:02:50 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u26sm2875550lfq.72.2020.07.01.17.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 17:02:49 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Neil Horman , Bruce Richardson , Thomas Monjalon , robin.jarry@6wind.com, Jie Zhou , Tal Shnaiderman , Dmitry Kozlyuk Date: Thu, 2 Jul 2020 03:02:32 +0300 Message-Id: <20200702000232.10761-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200702000232.10761-1-dmitry.kozliuk@gmail.com> References: <20200622004503.29036-1-dmitry.kozliuk@gmail.com> <20200702000232.10761-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC PATCH v2 3/3] doc/linux_gsg: require pyelftools for pmdinfogen X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The package is available on all major distributions. FreeBSD has no system requirements section in its GSG, Windows currently neither uses pmdinfogen not is supported by it. Signed-off-by: Dmitry Kozlyuk --- doc/guides/linux_gsg/sys_reqs.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index a124656bc..ef2037ca7 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -56,6 +56,12 @@ Compilation of the DPDK * If the packaged version is below the minimum version, the latest versions can be installed from Python's "pip" repository: ``pip3 install meson ninja`` +* ``pyelftools`` (version 0.22+) + + * For RHEL/Fedora systems it can be installed using ``dnf install python-pyelftools`` + + * For Ubuntu/Debian it can be installed using ``apt install python3-pyelftools`` + * Library for handling NUMA (Non Uniform Memory Access). * ``numactl-devel`` in RHEL/Fedora;