Show a patch.

GET /api/patches/73553/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73553,
    "url": "https://patches.dpdk.org/api/patches/73553/",
    "web_url": "https://patches.dpdk.org/patch/73553/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<20200708212335.25338-5-dmitry.kozliuk@gmail.com>",
    "date": "2020-07-08T21:23:35",
    "name": "[v4,4/4] pmdinfogen: remove C implementation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "603514fccda45c2e4772b70ce8fb9465582fc8ca",
    "submitter": {
        "id": 1581,
        "url": "https://patches.dpdk.org/api/people/1581/",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73553/mbox/",
    "series": [
        {
            "id": 10898,
            "url": "https://patches.dpdk.org/api/series/10898/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10898",
            "date": "2020-07-08T21:23:31",
            "name": "pmdinfogen: rewrite in Python",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/10898/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73553/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/73553/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "References": "<20200708005355.7102-1-dmitry.kozliuk@gmail.com>\n <20200708212335.25338-1-dmitry.kozliuk@gmail.com>",
        "X-Mailman-Version": "2.1.15",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<20200708212335.25338-5-dmitry.kozliuk@gmail.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=2Alog/35unG/Ni8lcEPWT07+nboNCH1l+lurJFcAIhM=;\n b=MvhRevqqrUHTaut6Ws0NoSEdy6lWB5vkEC2p8wTtKDu5G6nGrebPOlO4S+eoQlO0uj\n 0qOgbFjEDMB+bmfzGHSeH4yZrE4pSrvyEzmXj/XGy0nfV46WnpfcBgjDx7n71Ju1q/36\n r00UNj/yTxndFkAuQNw16aEbJ08gL/DBBkxp0AIy6OjmVOJG333drL2JyB+brjqsdwvQ\n GoI+ukaTmGoKKbaC6b8ZszisqGt0tCKGiLH0a+Q4iqpw98/tzVCK24jrsdSbec7g5l6q\n Az9DmagJMR8zPHOI1fWRRA2xXKIaBIicLyPg0E2bibcxavYDbfVNaRQ0dV/7cdBIObGd\n G5Uw==",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 82610A0526;\n\tWed,  8 Jul 2020 23:24:18 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AD0D71E4BD;\n\tWed,  8 Jul 2020 23:24:01 +0200 (CEST)",
            "from mail-lj1-f194.google.com (mail-lj1-f194.google.com\n [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 5016A1DEF3\n for <dev@dpdk.org>; Wed,  8 Jul 2020 23:23:52 +0200 (CEST)",
            "by mail-lj1-f194.google.com with SMTP id e8so21629499ljb.0\n for <dev@dpdk.org>; Wed, 08 Jul 2020 14:23:52 -0700 (PDT)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id u9sm230590ljk.44.2020.07.08.14.23.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 08 Jul 2020 14:23:50 -0700 (PDT)"
        ],
        "X-Mailer": "git-send-email 2.25.4",
        "X-Received": "by 2002:a05:651c:1117:: with SMTP id\n d23mr36124071ljo.277.1594243431108;\n Wed, 08 Jul 2020 14:23:51 -0700 (PDT)",
        "Subject": "[dpdk-dev] [PATCH v4 4/4] pmdinfogen: remove C implementation",
        "Precedence": "list",
        "X-Gm-Message-State": "AOAM531dhwZSYDZ0Et1qypfraSMmWjLmx8L5Yz57oebOqS/2/4auj1aB\n /mpfa7LVYtdv+AB/WpMRKZSrGGnVhMUXFg==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=2Alog/35unG/Ni8lcEPWT07+nboNCH1l+lurJFcAIhM=;\n b=aL5OM+ngZ99VgJWyIz1248CDzhnFuamCzVdvi3vH5/BS84Nn452OAfzQRsfoeGYKqO\n hTBKdYeZzgCioYvWyY1YU0yRZFWr/K6sl94BJ5AUNWeYDdjO0r63dZCPzrktibwMhBg3\n Wda6ul2IdyXYHS/6JR6vnGVjZiIszHwqGMDrWGNOkDuG5smevj5xPOJ5EoRZ6WEjiry9\n eq0CIBnAL82Zv1D7p8D1WSpEK/0mpvZDMzoeTybeiVI8wRj590SDTmlKlPhItuz3d+hK\n nNI4pNJGiFA81PG2ygdTP0zEoT3Tkk4KEjtAISO8wahC9XlW6/sEXWuxKHIdaTZZdB1t\n Sfpw==",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Date": "Thu,  9 Jul 2020 00:23:35 +0300",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Google-Smtp-Source": "\n ABdhPJyHwybkOHW4SaYO4ZVJVYgUX8hAWofYr6F70rbecAF/Ie1llDm2zKXfe/0/dziSSfXfJuQW6A==",
        "Cc": "Neil Horman <nhorman@tuxdriver.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>, robin.jarry@6wind.com,\n Jie Zhou <jizh@microsoft.com>, Tal Shnaiderman <talshn@mellanox.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "In-Reply-To": "<20200708212335.25338-1-dmitry.kozliuk@gmail.com>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "To": "dev@dpdk.org"
    },
    "content": "Delete the files no longer used in build process.  Keep Neil Horman\nmaintainer of the entire \"Driver information\" section, only adjust\npaths.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n MAINTAINERS                        |   2 +-\n buildtools/pmdinfogen/Makefile     |  20 --\n buildtools/pmdinfogen/meson.build  |  14 -\n buildtools/pmdinfogen/pmdinfogen.c | 456 -----------------------------\n buildtools/pmdinfogen/pmdinfogen.h | 119 --------\n 5 files changed, 1 insertion(+), 610 deletions(-)\n delete mode 100644 buildtools/pmdinfogen/Makefile\n delete mode 100644 buildtools/pmdinfogen/meson.build\n delete mode 100644 buildtools/pmdinfogen/pmdinfogen.c\n delete mode 100644 buildtools/pmdinfogen/pmdinfogen.h",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 2bb8583f3..68046aaad 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -157,7 +157,7 @@ F: lib/*/*.map\n \n Driver information\n M: Neil Horman <nhorman@tuxdriver.com>\n-F: buildtools/pmdinfogen/\n+F: buildtools/pmdinfogen.py\n F: usertools/dpdk-pmdinfo.py\n F: doc/guides/tools/pmdinfo.rst\n \ndiff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile\ndeleted file mode 100644\nindex a97a7648f..000000000\n--- a/buildtools/pmdinfogen/Makefile\n+++ /dev/null\n@@ -1,20 +0,0 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>\n-# All rights reserved.\n-\n-include $(RTE_SDK)/mk/rte.vars.mk\n-\n-#\n-# library name\n-#\n-HOSTAPP = dpdk-pmdinfogen\n-\n-#\n-# all sources are stored in SRCS-y\n-#\n-SRCS-y += pmdinfogen.c\n-\n-HOST_CFLAGS += $(HOST_WERROR_FLAGS) -g\n-HOST_CFLAGS += -I$(RTE_OUTPUT)/include\n-\n-include $(RTE_SDK)/mk/rte.hostapp.mk\ndiff --git a/buildtools/pmdinfogen/meson.build b/buildtools/pmdinfogen/meson.build\ndeleted file mode 100644\nindex 670528fac..000000000\n--- a/buildtools/pmdinfogen/meson.build\n+++ /dev/null\n@@ -1,14 +0,0 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n-\n-if is_windows\n-\tsubdir_done()\n-endif\n-\n-pmdinfogen_inc = [global_inc]\n-pmdinfogen_inc += include_directories('../../lib/librte_eal/include')\n-pmdinfogen_inc += include_directories('../../lib/librte_pci')\n-pmdinfogen = executable('pmdinfogen',\n-\t'pmdinfogen.c',\n-\tinclude_directories: pmdinfogen_inc,\n-\tnative: true)\ndiff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c\ndeleted file mode 100644\nindex a68d1ea99..000000000\n--- a/buildtools/pmdinfogen/pmdinfogen.c\n+++ /dev/null\n@@ -1,456 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0\n- * Postprocess pmd object files to export hw support\n- *\n- * Copyright 2016 Neil Horman <nhorman@tuxdriver.com>\n- * Based in part on modpost.c from the linux kernel\n- */\n-\n-#include <stdio.h>\n-#include <ctype.h>\n-#include <string.h>\n-#include <limits.h>\n-#include <stdbool.h>\n-#include <errno.h>\n-#include <libgen.h>\n-\n-#include <rte_common.h>\n-#include \"pmdinfogen.h\"\n-\n-#ifdef RTE_ARCH_64\n-#define ADDR_SIZE 64\n-#else\n-#define ADDR_SIZE 32\n-#endif\n-\n-static int use_stdin, use_stdout;\n-\n-static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)\n-{\n-\tif (sym)\n-\t\treturn elf->strtab + sym->st_name;\n-\telse\n-\t\treturn \"(unknown)\";\n-}\n-\n-static void *grab_file(const char *filename, unsigned long *size)\n-{\n-\tstruct stat st;\n-\tvoid *map = MAP_FAILED;\n-\tint fd = -1;\n-\n-\tif (!use_stdin) {\n-\t\tfd = open(filename, O_RDONLY);\n-\t\tif (fd < 0)\n-\t\t\treturn NULL;\n-\t} else {\n-\t\t/* from stdin, use a temporary file to mmap */\n-\t\tFILE *infile;\n-\t\tchar buffer[1024];\n-\t\tint n;\n-\n-\t\tinfile = tmpfile();\n-\t\tif (infile == NULL) {\n-\t\t\tperror(\"tmpfile\");\n-\t\t\treturn NULL;\n-\t\t}\n-\t\tfd = dup(fileno(infile));\n-\t\tfclose(infile);\n-\t\tif (fd < 0)\n-\t\t\treturn NULL;\n-\n-\t\tn = read(STDIN_FILENO, buffer, sizeof(buffer));\n-\t\twhile (n > 0) {\n-\t\t\tif (write(fd, buffer, n) != n)\n-\t\t\t\tgoto failed;\n-\t\t\tn = read(STDIN_FILENO, buffer, sizeof(buffer));\n-\t\t}\n-\t}\n-\n-\tif (fstat(fd, &st))\n-\t\tgoto failed;\n-\n-\t*size = st.st_size;\n-\tmap = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);\n-\n-failed:\n-\tclose(fd);\n-\tif (map == MAP_FAILED)\n-\t\treturn NULL;\n-\treturn map;\n-}\n-\n-/**\n-  * Return a copy of the next line in a mmap'ed file.\n-  * spaces in the beginning of the line is trimmed away.\n-  * Return a pointer to a static buffer.\n-  **/\n-static void release_file(void *file, unsigned long size)\n-{\n-\tmunmap(file, size);\n-}\n-\n-\n-static void *get_sym_value(struct elf_info *info, const Elf_Sym *sym)\n-{\n-\treturn RTE_PTR_ADD(info->hdr,\n-\t\tinfo->sechdrs[sym->st_shndx].sh_offset + sym->st_value);\n-}\n-\n-static Elf_Sym *find_sym_in_symtab(struct elf_info *info,\n-\t\t\t\t   const char *name, Elf_Sym *last)\n-{\n-\tElf_Sym *idx;\n-\tif (last)\n-\t\tidx = last+1;\n-\telse\n-\t\tidx = info->symtab_start;\n-\n-\tfor (; idx < info->symtab_stop; idx++) {\n-\t\tconst char *n = sym_name(info, idx);\n-\t\tif (!strncmp(n, name, strlen(name)))\n-\t\t\treturn idx;\n-\t}\n-\treturn NULL;\n-}\n-\n-static int parse_elf(struct elf_info *info, const char *filename)\n-{\n-\tunsigned int i;\n-\tElf_Ehdr *hdr;\n-\tElf_Shdr *sechdrs;\n-\tElf_Sym  *sym;\n-\tint endian;\n-\tunsigned int symtab_idx = ~0U, symtab_shndx_idx = ~0U;\n-\n-\thdr = grab_file(filename, &info->size);\n-\tif (!hdr) {\n-\t\tperror(filename);\n-\t\texit(1);\n-\t}\n-\tinfo->hdr = hdr;\n-\tif (info->size < sizeof(*hdr)) {\n-\t\t/* file too small, assume this is an empty .o file */\n-\t\treturn 0;\n-\t}\n-\t/* Is this a valid ELF file? */\n-\tif ((hdr->e_ident[EI_MAG0] != ELFMAG0) ||\n-\t    (hdr->e_ident[EI_MAG1] != ELFMAG1) ||\n-\t    (hdr->e_ident[EI_MAG2] != ELFMAG2) ||\n-\t    (hdr->e_ident[EI_MAG3] != ELFMAG3)) {\n-\t\t/* Not an ELF file - silently ignore it */\n-\t\treturn 0;\n-\t}\n-\n-\tif (!hdr->e_ident[EI_DATA]) {\n-\t\t/* Unknown endian */\n-\t\treturn 0;\n-\t}\n-\n-\tendian = hdr->e_ident[EI_DATA];\n-\n-\t/* Fix endianness in ELF header */\n-\thdr->e_type      = TO_NATIVE(endian, 16, hdr->e_type);\n-\thdr->e_machine   = TO_NATIVE(endian, 16, hdr->e_machine);\n-\thdr->e_version   = TO_NATIVE(endian, 32, hdr->e_version);\n-\thdr->e_entry     = TO_NATIVE(endian, ADDR_SIZE, hdr->e_entry);\n-\thdr->e_phoff     = TO_NATIVE(endian, ADDR_SIZE, hdr->e_phoff);\n-\thdr->e_shoff     = TO_NATIVE(endian, ADDR_SIZE, hdr->e_shoff);\n-\thdr->e_flags     = TO_NATIVE(endian, 32, hdr->e_flags);\n-\thdr->e_ehsize    = TO_NATIVE(endian, 16, hdr->e_ehsize);\n-\thdr->e_phentsize = TO_NATIVE(endian, 16, hdr->e_phentsize);\n-\thdr->e_phnum     = TO_NATIVE(endian, 16, hdr->e_phnum);\n-\thdr->e_shentsize = TO_NATIVE(endian, 16, hdr->e_shentsize);\n-\thdr->e_shnum     = TO_NATIVE(endian, 16, hdr->e_shnum);\n-\thdr->e_shstrndx  = TO_NATIVE(endian, 16, hdr->e_shstrndx);\n-\n-\tsechdrs = RTE_PTR_ADD(hdr, hdr->e_shoff);\n-\tinfo->sechdrs = sechdrs;\n-\n-\t/* Check if file offset is correct */\n-\tif (hdr->e_shoff > info->size) {\n-\t\tfprintf(stderr, \"section header offset=%lu in file '%s' \"\n-\t\t      \"is bigger than filesize=%lu\\n\",\n-\t\t      (unsigned long)hdr->e_shoff,\n-\t\t      filename, info->size);\n-\t\treturn 0;\n-\t}\n-\n-\tif (hdr->e_shnum == SHN_UNDEF) {\n-\t\t/*\n-\t\t * There are more than 64k sections,\n-\t\t * read count from .sh_size.\n-\t\t */\n-\t\tinfo->num_sections =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[0].sh_size);\n-\t} else {\n-\t\tinfo->num_sections = hdr->e_shnum;\n-\t}\n-\tif (hdr->e_shstrndx == SHN_XINDEX)\n-\t\tinfo->secindex_strings =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[0].sh_link);\n-\telse\n-\t\tinfo->secindex_strings = hdr->e_shstrndx;\n-\n-\t/* Fix endianness in section headers */\n-\tfor (i = 0; i < info->num_sections; i++) {\n-\t\tsechdrs[i].sh_name      =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[i].sh_name);\n-\t\tsechdrs[i].sh_type      =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[i].sh_type);\n-\t\tsechdrs[i].sh_flags     =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[i].sh_flags);\n-\t\tsechdrs[i].sh_addr      =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_addr);\n-\t\tsechdrs[i].sh_offset    =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset);\n-\t\tsechdrs[i].sh_size      =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size);\n-\t\tsechdrs[i].sh_link      =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[i].sh_link);\n-\t\tsechdrs[i].sh_info      =\n-\t\t\tTO_NATIVE(endian, 32, sechdrs[i].sh_info);\n-\t\tsechdrs[i].sh_addralign =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_addralign);\n-\t\tsechdrs[i].sh_entsize   =\n-\t\t\tTO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_entsize);\n-\t}\n-\t/* Find symbol table. */\n-\tfor (i = 1; i < info->num_sections; i++) {\n-\t\tint nobits = sechdrs[i].sh_type == SHT_NOBITS;\n-\n-\t\tif (!nobits && sechdrs[i].sh_offset > info->size) {\n-\t\t\tfprintf(stderr, \"%s is truncated. \"\n-\t\t\t      \"sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%zu\\n\",\n-\t\t\t      filename, (unsigned long)sechdrs[i].sh_offset,\n-\t\t\t      sizeof(*hdr));\n-\t\t\treturn 0;\n-\t\t}\n-\n-\t\tif (sechdrs[i].sh_type == SHT_SYMTAB) {\n-\t\t\tunsigned int sh_link_idx;\n-\t\t\tsymtab_idx = i;\n-\t\t\tinfo->symtab_start = RTE_PTR_ADD(hdr,\n-\t\t\t\tsechdrs[i].sh_offset);\n-\t\t\tinfo->symtab_stop  = RTE_PTR_ADD(hdr,\n-\t\t\t\tsechdrs[i].sh_offset + sechdrs[i].sh_size);\n-\t\t\tsh_link_idx = sechdrs[i].sh_link;\n-\t\t\tinfo->strtab       = RTE_PTR_ADD(hdr,\n-\t\t\t\tsechdrs[sh_link_idx].sh_offset);\n-\t\t}\n-\n-\t\t/* 32bit section no. table? (\"more than 64k sections\") */\n-\t\tif (sechdrs[i].sh_type == SHT_SYMTAB_SHNDX) {\n-\t\t\tsymtab_shndx_idx = i;\n-\t\t\tinfo->symtab_shndx_start = RTE_PTR_ADD(hdr,\n-\t\t\t\tsechdrs[i].sh_offset);\n-\t\t\tinfo->symtab_shndx_stop  = RTE_PTR_ADD(hdr,\n-\t\t\t\tsechdrs[i].sh_offset + sechdrs[i].sh_size);\n-\t\t}\n-\t}\n-\tif (!info->symtab_start)\n-\t\tfprintf(stderr, \"%s has no symtab?\\n\", filename);\n-\telse {\n-\t\t/* Fix endianness in symbols */\n-\t\tfor (sym = info->symtab_start; sym < info->symtab_stop; sym++) {\n-\t\t\tsym->st_shndx = TO_NATIVE(endian, 16, sym->st_shndx);\n-\t\t\tsym->st_name  = TO_NATIVE(endian, 32, sym->st_name);\n-\t\t\tsym->st_value = TO_NATIVE(endian, ADDR_SIZE, sym->st_value);\n-\t\t\tsym->st_size  = TO_NATIVE(endian, ADDR_SIZE, sym->st_size);\n-\t\t}\n-\t}\n-\n-\tif (symtab_shndx_idx != ~0U) {\n-\t\tElf32_Word *p;\n-\t\tif (symtab_idx != sechdrs[symtab_shndx_idx].sh_link)\n-\t\t\tfprintf(stderr,\n-\t\t\t      \"%s: SYMTAB_SHNDX has bad sh_link: %u!=%u\\n\",\n-\t\t\t      filename, sechdrs[symtab_shndx_idx].sh_link,\n-\t\t\t      symtab_idx);\n-\t\t/* Fix endianness */\n-\t\tfor (p = info->symtab_shndx_start; p < info->symtab_shndx_stop;\n-\t\t     p++)\n-\t\t\t*p = TO_NATIVE(endian, 32, *p);\n-\t}\n-\n-\treturn 1;\n-}\n-\n-static void parse_elf_finish(struct elf_info *info)\n-{\n-\tstruct pmd_driver *tmp, *idx = info->drivers;\n-\trelease_file(info->hdr, info->size);\n-\twhile (idx) {\n-\t\ttmp = idx->next;\n-\t\tfree(idx);\n-\t\tidx = tmp;\n-\t}\n-}\n-\n-struct opt_tag {\n-\tconst char *suffix;\n-\tconst char *json_id;\n-};\n-\n-static const struct opt_tag opt_tags[] = {\n-\t{\"_param_string_export\", \"params\"},\n-\t{\"_kmod_dep_export\", \"kmod\"},\n-};\n-\n-static int complete_pmd_entry(struct elf_info *info, struct pmd_driver *drv)\n-{\n-\tconst char *tname;\n-\tint i;\n-\tchar tmpsymname[128];\n-\tElf_Sym *tmpsym;\n-\n-\tdrv->name = get_sym_value(info, drv->name_sym);\n-\n-\tfor (i = 0; i < PMD_OPT_MAX; i++) {\n-\t\tmemset(tmpsymname, 0, 128);\n-\t\tsprintf(tmpsymname, \"__%s%s\", drv->name, opt_tags[i].suffix);\n-\t\ttmpsym = find_sym_in_symtab(info, tmpsymname, NULL);\n-\t\tif (!tmpsym)\n-\t\t\tcontinue;\n-\t\tdrv->opt_vals[i] = get_sym_value(info, tmpsym);\n-\t}\n-\n-\tmemset(tmpsymname, 0, 128);\n-\tsprintf(tmpsymname, \"__%s_pci_tbl_export\", drv->name);\n-\n-\ttmpsym = find_sym_in_symtab(info, tmpsymname, NULL);\n-\n-\n-\t/*\n-\t * If this returns NULL, then this is a PMD_VDEV, because\n-\t * it has no pci table reference\n-\t */\n-\tif (!tmpsym) {\n-\t\tdrv->pci_tbl = NULL;\n-\t\treturn 0;\n-\t}\n-\n-\ttname = get_sym_value(info, tmpsym);\n-\ttmpsym = find_sym_in_symtab(info, tname, NULL);\n-\tif (!tmpsym)\n-\t\treturn -ENOENT;\n-\n-\tdrv->pci_tbl = (struct rte_pci_id *)get_sym_value(info, tmpsym);\n-\tif (!drv->pci_tbl)\n-\t\treturn -ENOENT;\n-\n-\treturn 0;\n-}\n-\n-static int locate_pmd_entries(struct elf_info *info)\n-{\n-\tElf_Sym *last = NULL;\n-\tstruct pmd_driver *new;\n-\n-\tinfo->drivers = NULL;\n-\n-\tdo {\n-\t\tnew = calloc(sizeof(struct pmd_driver), 1);\n-\t\tif (new == NULL) {\n-\t\t\tfprintf(stderr, \"Failed to calloc memory\\n\");\n-\t\t\treturn -1;\n-\t\t}\n-\t\tnew->name_sym = find_sym_in_symtab(info, \"this_pmd_name\", last);\n-\t\tlast = new->name_sym;\n-\t\tif (!new->name_sym)\n-\t\t\tfree(new);\n-\t\telse {\n-\t\t\tif (complete_pmd_entry(info, new)) {\n-\t\t\t\tfprintf(stderr,\n-\t\t\t\t\t\"Failed to complete pmd entry\\n\");\n-\t\t\t\tfree(new);\n-\t\t\t} else {\n-\t\t\t\tnew->next = info->drivers;\n-\t\t\t\tinfo->drivers = new;\n-\t\t\t}\n-\t\t}\n-\t} while (last);\n-\n-\treturn 0;\n-}\n-\n-static void output_pmd_info_string(struct elf_info *info, char *outfile)\n-{\n-\tFILE *ofd;\n-\tstruct pmd_driver *drv;\n-\tstruct rte_pci_id *pci_ids;\n-\tint idx = 0;\n-\n-\tif (use_stdout)\n-\t\tofd = stdout;\n-\telse {\n-\t\tofd = fopen(outfile, \"w+\");\n-\t\tif (!ofd) {\n-\t\t\tfprintf(stderr, \"Unable to open output file\\n\");\n-\t\t\treturn;\n-\t\t}\n-\t}\n-\n-\tdrv = info->drivers;\n-\n-\twhile (drv) {\n-\t\tfprintf(ofd, \"const char %s_pmd_info[] __attribute__((used)) = \"\n-\t\t\t\"\\\"PMD_INFO_STRING= {\",\n-\t\t\tdrv->name);\n-\t\tfprintf(ofd, \"\\\\\\\"name\\\\\\\" : \\\\\\\"%s\\\\\\\", \", drv->name);\n-\n-\t\tfor (idx = 0; idx < PMD_OPT_MAX; idx++) {\n-\t\t\tif (drv->opt_vals[idx])\n-\t\t\t\tfprintf(ofd, \"\\\\\\\"%s\\\\\\\" : \\\\\\\"%s\\\\\\\", \",\n-\t\t\t\t\topt_tags[idx].json_id,\n-\t\t\t\t\tdrv->opt_vals[idx]);\n-\t\t}\n-\n-\t\tpci_ids = drv->pci_tbl;\n-\t\tfprintf(ofd, \"\\\\\\\"pci_ids\\\\\\\" : [\");\n-\n-\t\twhile (pci_ids && pci_ids->device_id) {\n-\t\t\tfprintf(ofd, \"[%d, %d, %d, %d]\",\n-\t\t\t\tpci_ids->vendor_id, pci_ids->device_id,\n-\t\t\t\tpci_ids->subsystem_vendor_id,\n-\t\t\t\tpci_ids->subsystem_device_id);\n-\t\t\tpci_ids++;\n-\t\t\tif (pci_ids->device_id)\n-\t\t\t\tfprintf(ofd, \",\");\n-\t\t\telse\n-\t\t\t\tfprintf(ofd, \" \");\n-\t\t}\n-\t\tfprintf(ofd, \"]}\\\";\\n\");\n-\t\tdrv = drv->next;\n-\t}\n-\n-\tfclose(ofd);\n-}\n-\n-int main(int argc, char **argv)\n-{\n-\tstruct elf_info info = {0};\n-\tint rc = 1;\n-\n-\tif (argc < 3) {\n-\t\tfprintf(stderr,\n-\t\t\t\"usage: %s <object file> <c output file>\\n\",\n-\t\t\tbasename(argv[0]));\n-\t\texit(127);\n-\t}\n-\tuse_stdin = !strcmp(argv[1], \"-\");\n-\tuse_stdout = !strcmp(argv[2], \"-\");\n-\tparse_elf(&info, argv[1]);\n-\n-\tif (locate_pmd_entries(&info) < 0)\n-\t\texit(1);\n-\n-\tif (info.drivers) {\n-\t\toutput_pmd_info_string(&info, argv[2]);\n-\t\trc = 0;\n-\t} else {\n-\t\tfprintf(stderr, \"No drivers registered\\n\");\n-\t}\n-\n-\tparse_elf_finish(&info);\n-\texit(rc);\n-}\ndiff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h\ndeleted file mode 100644\nindex 93930e454..000000000\n--- a/buildtools/pmdinfogen/pmdinfogen.h\n+++ /dev/null\n@@ -1,119 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0\n- * Postprocess pmd object files to export hw support\n- *\n- * Copyright 2016 Neil Horman <nhorman@tuxdriver.com>\n- * Based in part on modpost.c from the linux kernel\n- */\n-\n-#include <stdio.h>\n-#include <stdlib.h>\n-#include <stdarg.h>\n-#include <string.h>\n-#include <sys/types.h>\n-#include <sys/stat.h>\n-#include <sys/mman.h>\n-#ifdef __linux__\n-#include <endian.h>\n-#else\n-#include <sys/endian.h>\n-#endif\n-#include <fcntl.h>\n-#include <unistd.h>\n-#include <elf.h>\n-#include <rte_pci.h>\n-\n-/* On BSD-alike OSes elf.h defines these according to host's word size */\n-#undef ELF_ST_BIND\n-#undef ELF_ST_TYPE\n-#undef ELF_R_SYM\n-#undef ELF_R_TYPE\n-\n-/*\n- * Define ELF64_* to ELF_*, the latter being defined in both 32 and 64 bit\n- * flavors in elf.h.  This makes our code a bit more generic between arches\n- * and allows us to support 32 bit code in the future should we ever want to\n- */\n-#ifdef RTE_ARCH_64\n-#define Elf_Ehdr    Elf64_Ehdr\n-#define Elf_Shdr    Elf64_Shdr\n-#define Elf_Sym     Elf64_Sym\n-#define Elf_Addr    Elf64_Addr\n-#define Elf_Sword   Elf64_Sxword\n-#define Elf_Section Elf64_Half\n-#define ELF_ST_BIND ELF64_ST_BIND\n-#define ELF_ST_TYPE ELF64_ST_TYPE\n-\n-#define Elf_Rel     Elf64_Rel\n-#define Elf_Rela    Elf64_Rela\n-#define ELF_R_SYM   ELF64_R_SYM\n-#define ELF_R_TYPE  ELF64_R_TYPE\n-#else\n-#define Elf_Ehdr    Elf32_Ehdr\n-#define Elf_Shdr    Elf32_Shdr\n-#define Elf_Sym     Elf32_Sym\n-#define Elf_Addr    Elf32_Addr\n-#define Elf_Sword   Elf32_Sxword\n-#define Elf_Section Elf32_Half\n-#define ELF_ST_BIND ELF32_ST_BIND\n-#define ELF_ST_TYPE ELF32_ST_TYPE\n-\n-#define Elf_Rel     Elf32_Rel\n-#define Elf_Rela    Elf32_Rela\n-#define ELF_R_SYM   ELF32_R_SYM\n-#define ELF_R_TYPE  ELF32_R_TYPE\n-#endif\n-\n-\n-/*\n- * Note, it seems odd that we have both a CONVERT_NATIVE and a TO_NATIVE macro\n- * below.  We do this because the values passed to TO_NATIVE may themselves be\n- * macros and need both macros here to get expanded.  Specifically its the width\n- * variable we are concerned with, because it needs to get expanded prior to\n- * string concatenation\n- */\n-#define CONVERT_NATIVE(fend, width, x) ({ \\\n-typeof(x) ___x; \\\n-if ((fend) == ELFDATA2LSB) \\\n-\t___x = le##width##toh(x); \\\n-else \\\n-\t___x = be##width##toh(x); \\\n-\t___x; \\\n-})\n-\n-#define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)\n-\n-enum opt_params {\n-\tPMD_PARAM_STRING = 0,\n-\tPMD_KMOD_DEP,\n-\tPMD_OPT_MAX\n-};\n-\n-struct pmd_driver {\n-\tElf_Sym *name_sym;\n-\tconst char *name;\n-\tstruct rte_pci_id *pci_tbl;\n-\tstruct pmd_driver *next;\n-\n-\tconst char *opt_vals[PMD_OPT_MAX];\n-};\n-\n-struct elf_info {\n-\tunsigned long size;\n-\tElf_Ehdr     *hdr;\n-\tElf_Shdr     *sechdrs;\n-\tElf_Sym      *symtab_start;\n-\tElf_Sym      *symtab_stop;\n-\tchar         *strtab;\n-\n-\t/* support for 32bit section numbers */\n-\n-\tunsigned int num_sections; /* max_secindex + 1 */\n-\tunsigned int secindex_strings;\n-\t/* if Nth symbol table entry has .st_shndx = SHN_XINDEX,\n-\t * take shndx from symtab_shndx_start[N] instead\n-\t */\n-\tElf32_Word   *symtab_shndx_start;\n-\tElf32_Word   *symtab_shndx_stop;\n-\n-\tstruct pmd_driver *drivers;\n-};\n",
    "prefixes": [
        "v4",
        "4/4"
    ]
}