Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62571/?format=api
http://patches.dpdk.org/api/patches/62571/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/b3be71ac71dfaa0a05b8155b6da253918eabbdf3.1573059201.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "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", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<b3be71ac71dfaa0a05b8155b6da253918eabbdf3.1573059201.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/b3be71ac71dfaa0a05b8155b6da253918eabbdf3.1573059201.git.anatoly.burakov@intel.com", "date": "2019-11-06T16:54:21", "name": "[v6,02/10] buildtools: add script for updating symbols abi version", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "85122be8628deae294fc00931b7675ab75846660", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/b3be71ac71dfaa0a05b8155b6da253918eabbdf3.1573059201.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 7299, "url": "http://patches.dpdk.org/api/series/7299/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7299", "date": "2019-11-06T16:54:19", "name": "Implement the new ABI policy and add helper scripts", "version": 6, "mbox": "http://patches.dpdk.org/series/7299/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/62571/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/62571/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EBCC6A04AC;\n\tWed, 6 Nov 2019 17:54:53 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E2C6F1D181;\n\tWed, 6 Nov 2019 17:54:40 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id 9D5BC1D172\n for <dev@dpdk.org>; Wed, 6 Nov 2019 17:54:37 +0100 (CET)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 06 Nov 2019 08:54:36 -0800", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.223.151])\n by fmsmga008.fm.intel.com with ESMTP; 06 Nov 2019 08:54:35 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.68,275,1569308400\"; d=\"scan'208\";a=\"200764013\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Pawel Modrak <pawelx.modrak@intel.com>, john.mcnamara@intel.com,\n ray.kinsella@intel.com, bruce.richardson@intel.com, thomas@monjalon.net,\n david.marchand@redhat.com", "Date": "Wed, 6 Nov 2019 16:54:21 +0000", "Message-Id": "\n <b3be71ac71dfaa0a05b8155b6da253918eabbdf3.1573059201.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<cover.1573059201.git.anatoly.burakov@intel.com>", "<cover.1573059201.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1573059201.git.anatoly.burakov@intel.com>", "<cover.1571910363.git.anatoly.burakov@intel.com>\n <cover.1573059201.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v6 02/10] buildtools: add script for updating\n\tsymbols abi version", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Pawel Modrak <pawelx.modrak@intel.com>\n\nAdd a script that automatically merges all stable ABI's under one\nABI section with the new version, while leaving experimental\nsection exactly as it is.\n\nSigned-off-by: Pawel Modrak <pawelx.modrak@intel.com>\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n\nNotes:\n v6:\n - Split map file generation function in two\n - Do not print stable ABI if it wasn't present\n \n v3:\n - Add comments to regex patterns\n \n v2:\n - Reworked script to be pep8-compliant and more reliable\n\n buildtools/update_version_map_abi.py | 171 +++++++++++++++++++++++++++\n 1 file changed, 171 insertions(+)\n create mode 100755 buildtools/update_version_map_abi.py", "diff": "diff --git a/buildtools/update_version_map_abi.py b/buildtools/update_version_map_abi.py\nnew file mode 100755\nindex 0000000000..6dfc856ed3\n--- /dev/null\n+++ b/buildtools/update_version_map_abi.py\n@@ -0,0 +1,171 @@\n+#!/usr/bin/env python\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2019 Intel Corporation\n+\n+\"\"\"\n+A Python program to update the ABI version and function names in a DPDK\n+lib_*_version.map file. Called from the buildtools/update_abi.sh utility.\n+\"\"\"\n+\n+from __future__ import print_function\n+import argparse\n+import sys\n+import re\n+\n+\n+def __parse_map_file(f_in):\n+ # match function name, followed by semicolon, followed by EOL, optionally\n+ # with whitespace inbetween each item\n+ func_line_regex = re.compile(r\"\\s*\"\n+ r\"(?P<func>[a-zA-Z_0-9]+)\"\n+ r\"\\s*\"\n+ r\";\"\n+ r\"\\s*\"\n+ r\"$\")\n+ # match section name, followed by opening bracked, followed by EOL,\n+ # optionally with whitespace inbetween each item\n+ section_begin_regex = re.compile(r\"\\s*\"\n+ r\"(?P<version>[a-zA-Z0-9_\\.]+)\"\n+ r\"\\s*\"\n+ r\"{\"\n+ r\"\\s*\"\n+ r\"$\")\n+ # match closing bracket, optionally followed by section name (for when we\n+ # inherit from another ABI version), followed by semicolon, followed by\n+ # EOL, optionally with whitespace inbetween each item\n+ section_end_regex = re.compile(r\"\\s*\"\n+ r\"}\"\n+ r\"\\s*\"\n+ r\"(?P<parent>[a-zA-Z0-9_\\.]+)?\"\n+ r\"\\s*\"\n+ r\";\"\n+ r\"\\s*\"\n+ r\"$\")\n+\n+ # for stable ABI, we don't care about which version introduced which\n+ # function, we just flatten the list. there are dupes in certain files, so\n+ # use a set instead of a list\n+ stable_lines = set()\n+ # copy experimental section as is\n+ experimental_lines = []\n+ is_experimental = False\n+\n+ # gather all functions\n+ for line in f_in:\n+ # clean up the line\n+ line = line.strip('\\n').strip()\n+\n+ # is this an end of section?\n+ match = section_end_regex.match(line)\n+ if match:\n+ # whatever section this was, it's not active any more\n+ is_experimental = False\n+ continue\n+\n+ # if we're in the middle of experimental section, we need to copy\n+ # the section verbatim, so just add the line\n+ if is_experimental:\n+ experimental_lines += [line]\n+ continue\n+\n+ # skip empty lines\n+ if not line:\n+ continue\n+\n+ # is this a beginning of a new section?\n+ match = section_begin_regex.match(line)\n+ if match:\n+ cur_section = match.group(\"version\")\n+ # is it experimental?\n+ is_experimental = cur_section == \"EXPERIMENTAL\"\n+ continue\n+\n+ # is this a function?\n+ match = func_line_regex.match(line)\n+ if match:\n+ stable_lines.add(match.group(\"func\"))\n+\n+ return stable_lines, experimental_lines\n+\n+\n+def __generate_stable_abi(f_out, abi_version, lines):\n+ # print ABI version header\n+ print(\"DPDK_{} {{\".format(abi_version), file=f_out)\n+\n+ # print global section if it exists\n+ if lines:\n+ print(\"\\tglobal:\", file=f_out)\n+ # blank line\n+ print(file=f_out)\n+\n+ # print all stable lines, alphabetically sorted\n+ for line in sorted(lines):\n+ print(\"\\t{};\".format(line), file=f_out)\n+\n+ # another blank line\n+ print(file=f_out)\n+\n+ # print local section\n+ print(\"\\tlocal: *;\", file=f_out)\n+\n+ # end stable version\n+ print(\"};\", file=f_out)\n+\n+\n+def __generate_experimental_abi(f_out, lines, need_newline):\n+ if need_newline:\n+ # another blank line\n+ print(file=f_out)\n+\n+ # start experimental section\n+ print(\"EXPERIMENTAL {\", file=f_out)\n+\n+ # print all experimental lines as they were\n+ for line in lines:\n+ # don't print empty whitespace\n+ if not line:\n+ print(\"\", file=f_out)\n+ else:\n+ print(\"\\t{}\".format(line), file=f_out)\n+\n+ # end section\n+ print(\"};\", file=f_out)\n+\n+\n+def __main():\n+ arg_parser = argparse.ArgumentParser(\n+ description='Merge versions in linker version script.')\n+\n+ arg_parser.add_argument(\"map_file\", type=str,\n+ help='path to linker version script file '\n+ '(pattern: *version.map)')\n+ arg_parser.add_argument(\"abi_version\", type=str,\n+ help='target ABI version (pattern: MAJOR.MINOR)')\n+\n+ parsed = arg_parser.parse_args()\n+\n+ if not parsed.map_file.endswith('version.map'):\n+ print(\"Invalid input file: {}\".format(parsed.map_file),\n+ file=sys.stderr)\n+ arg_parser.print_help()\n+ sys.exit(1)\n+\n+ if not re.match(r\"\\d{1,2}\\.\\d{1,2}\", parsed.abi_version):\n+ print(\"Invalid ABI version: {}\".format(parsed.abi_version),\n+ file=sys.stderr)\n+ arg_parser.print_help()\n+ sys.exit(1)\n+\n+ with open(parsed.map_file) as f_in:\n+ stable_lines, experimental_lines = __parse_map_file(f_in)\n+\n+ with open(parsed.map_file, 'w') as f_out:\n+ if stable_lines or not experimental_lines:\n+ __generate_stable_abi(f_out, parsed.abi_version, stable_lines)\n+ if experimental_lines:\n+ __generate_experimental_abi(f_out, experimental_lines,\n+ bool(stable_lines))\n+\n+\n+if __name__ == \"__main__\":\n+ __main()\n", "prefixes": [ "v6", "02/10" ] }{ "id": 62571, "url": "