Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/61857/?format=api
https://patches.dpdk.org/api/patches/61857/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/0bdec3d7e6659e3a41b9888a8b3a13eb428426f6.1571910363.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "https://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": "<0bdec3d7e6659e3a41b9888a8b3a13eb428426f6.1571910363.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/0bdec3d7e6659e3a41b9888a8b3a13eb428426f6.1571910363.git.anatoly.burakov@intel.com", "date": "2019-10-24T09:46:39", "name": "[v5,02/10] buildtools: add script for updating symbols abi version", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0bc36f53c768199896a3cb83405779b5ba6229d7", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/0bdec3d7e6659e3a41b9888a8b3a13eb428426f6.1571910363.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 7035, "url": "https://patches.dpdk.org/api/series/7035/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7035", "date": "2019-10-24T09:46:37", "name": "Implement the new ABI policy and add helper scripts", "version": 5, "mbox": "https://patches.dpdk.org/series/7035/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/61857/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/61857/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5C3291E8F8;\n\tThu, 24 Oct 2019 11:46:59 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 9AB5B1E8C9\n\tfor <dev@dpdk.org>; Thu, 24 Oct 2019 11:46:53 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Oct 2019 02:46:53 -0700", "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.151])\n\tby fmsmga007.fm.intel.com with ESMTP; 24 Oct 2019 02:46:51 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.68,224,1569308400\"; d=\"scan'208\";a=\"197686506\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Pawel Modrak <pawelx.modrak@intel.com>, john.mcnamara@intel.com,\n\tray.kinsella@intel.com, bruce.richardson@intel.com, thomas@monjalon.net, \n\tdavid.marchand@redhat.com", "Date": "Thu, 24 Oct 2019 10:46:39 +0100", "Message-Id": "<0bdec3d7e6659e3a41b9888a8b3a13eb428426f6.1571910363.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<cover.1571910363.git.anatoly.burakov@intel.com>", "<cover.1571910363.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1571910363.git.anatoly.burakov@intel.com>", "<cover.1571322634.git.anatoly.burakov@intel.com>\n\t<cover.1571910363.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v5 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\t<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\t<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 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 | 170 +++++++++++++++++++++++++++\n 1 file changed, 170 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..50283e6a3d\n--- /dev/null\n+++ b/buildtools/update_version_map_abi.py\n@@ -0,0 +1,170 @@\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 __regenerate_map_file(f_out, abi_version, stable_lines,\n+ experimental_lines):\n+ # print ABI version header\n+ print(\"DPDK_{} {{\".format(abi_version), file=f_out)\n+\n+ if stable_lines:\n+ # print global section\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(stable_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+ # do we have experimental lines?\n+ if not experimental_lines:\n+ return\n+\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 experimental_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+ __regenerate_map_file(f_out, parsed.abi_version, stable_lines,\n+ experimental_lines)\n+\n+\n+if __name__ == \"__main__\":\n+ __main()\n", "prefixes": [ "v5", "02/10" ] }{ "id": 61857, "url": "