get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83808,
    "url": "http://patches.dpdk.org/api/patches/83808/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1604649795-27476-15-git-send-email-juraj.linkes@pantheon.tech/",
    "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": "<1604649795-27476-15-git-send-email-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1604649795-27476-15-git-send-email-juraj.linkes@pantheon.tech",
    "date": "2020-11-06T08:03:15",
    "name": "[v8,14/14] build: add Arm SoC meson option",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4cb165e6ad9a4e9e9d44ca3e3841d7d999d20846",
    "submitter": {
        "id": 1626,
        "url": "http://patches.dpdk.org/api/people/1626/?format=api",
        "name": "Juraj Linkeš",
        "email": "juraj.linkes@pantheon.tech"
    },
    "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/1604649795-27476-15-git-send-email-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 13717,
            "url": "http://patches.dpdk.org/api/series/13717/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13717",
            "date": "2020-11-06T08:03:01",
            "name": "Arm build options rework",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/13717/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83808/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/83808/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 B54CEA0524;\n\tFri,  6 Nov 2020 09:08:10 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 58F8EAC8F;\n\tFri,  6 Nov 2020 09:03:48 +0100 (CET)",
            "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by dpdk.org (Postfix) with ESMTP id 30CE46C96\n for <dev@dpdk.org>; Fri,  6 Nov 2020 09:03:41 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id 1248DB6B61;\n Fri,  6 Nov 2020 09:03:38 +0100 (CET)",
            "from lb.pantheon.sk ([127.0.0.1])\n by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id DqHUOoz3zQvS; Fri,  6 Nov 2020 09:03:37 +0100 (CET)",
            "from service-node1.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id 6BCE9B6B77;\n Fri,  6 Nov 2020 09:03:31 +0100 (CET)"
        ],
        "X-Virus-Scanned": "amavisd-new at siecit.sk",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "bruce.richardson@intel.com, Ruifeng.Wang@arm.com,\n Honnappa.Nagarahalli@arm.com, Phil.Yang@arm.com, vcchunga@amazon.com,\n Dharmik.Thakkar@arm.com, jerinjacobk@gmail.com, hemant.agrawal@nxp.com,\n ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, aconole@redhat.com",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Date": "Fri,  6 Nov 2020 09:03:15 +0100",
        "Message-Id": "<1604649795-27476-15-git-send-email-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1604649795-27476-1-git-send-email-juraj.linkes@pantheon.tech>",
        "References": "<1604584762-25321-1-git-send-email-juraj.linkes@pantheon.tech>\n <1604649795-27476-1-git-send-email-juraj.linkes@pantheon.tech>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v8 14/14] build: add Arm SoC meson option",
        "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": "Add Arm SoC configuration to Arm meson.build and add a meson option to\nenable those options for native builds. This is preferable to\nspecifying a cross file when doing aarch64 -> aarch64 builds, since the\ncross file specifies the toolchain as well.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n config/arm/arm64_armada_linux_gcc      |   6 +-\n config/arm/arm64_armv8_linux_gcc       |  58 +++--------\n config/arm/arm64_bluefield_linux_gcc   |   6 +-\n config/arm/arm64_dpaa_linux_gcc        |   5 +-\n config/arm/arm64_emag_linux_gcc        |   5 +-\n config/arm/arm64_graviton2_linux_gcc   |   6 +-\n config/arm/arm64_n1sdp_linux_gcc       |   6 +-\n config/arm/arm64_octeontx2_linux_gcc   |   6 +-\n config/arm/arm64_stingray_linux_gcc    |   6 +-\n config/arm/arm64_thunderx2_linux_gcc   |   5 +-\n config/arm/arm64_thunderxt88_linux_gcc |   5 +-\n config/arm/meson.build                 | 132 ++++++++++++++++++++++++-\n meson_options.txt                      |   2 +\n 13 files changed, 154 insertions(+), 94 deletions(-)",
    "diff": "diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc\nindex f5403f0a6..7cc40d1f4 100644\n--- a/config/arm/arm64_armada_linux_gcc\n+++ b/config/arm/arm64_armada_linux_gcc\n@@ -14,8 +14,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x56'\n-max_lcores = 16\n-max_numa_nodes = 1\n-numa = false\n-disabled_drivers = ['bus/dpaa', 'bus/fslmc', 'common/dpaax']\n+soc = 'armada'\ndiff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc\nindex 77e3d6278..d4cb6b5bf 100644\n--- a/config/arm/arm64_armv8_linux_gcc\n+++ b/config/arm/arm64_armv8_linux_gcc\n@@ -13,46 +13,18 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-# Supported implementers:\n-# 'generic': Generic armv8\n-# '0x41':    Arm\n-# '0x43':    Cavium\n-# '0x50':    Ampere Computing\n-# '0x56':    Marvell ARMADA\n-# 'dpaa':    NXP DPAA\n-implementer_id = 'generic'\n-\n-# Supported part_numbers for generic:\n-# 'generic': valid for all armv8-a architectures (unoptimized portable build)\n-part_number = 'generic'\n-\n-# Supported part_numbers for 0x41, 0x56, dpaa:\n-# '0xd03':   cortex-a53\n-# '0xd04':   cortex-a35\n-# '0xd05':   cortex-a55\n-# '0xd07':   cortex-a57\n-# '0xd08':   cortex-a72\n-# '0xd09':   cortex-a73\n-# '0xd0a':   cortex-a75\n-# '0xd0b':   cortex-a76\n-# '0xd0c':   neoverse-n1\n-\n-# Supported part_numbers for 0x43:\n-# '0xa1':    thunderxt88\n-# '0xa2':    thunderxt81\n-# '0xa3':    thunderxt83\n-# '0xaf':    thunderx2t99\n-# '0xb2':    octeontx2\n-\n-# Supported part_numbers for 0x50:\n-# '0x0':     emag\n-\n-# Supported extra configuration\n-# max_numa_nodes = n  # will set RTE_MAX_NUMA_NODES\n-# max_lcores = n      # will set RTE_MAX_LCORE\n-max_lcores = 256\n-max_numa_nodes = 4\n-\n-# numa = false        # set to false if the target is not a NUMA system\n-# disabled_drivers = ['bus/dpaa', 'crypto']\n-    # add to the set of disabled libraries\n+# Supported SoCs:\n+# generic\n+# armada\n+# bluefield\n+# dpaa\n+# emag\n+# graviton2\n+# n1sdp\n+# octeontx2\n+# stingray\n+# thunderx2\n+# thunderxt88\n+# thunderx2t99\n+\n+soc = 'generic'\ndiff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc\nindex 6bef87fbd..7b1fae8b9 100644\n--- a/config/arm/arm64_bluefield_linux_gcc\n+++ b/config/arm/arm64_bluefield_linux_gcc\n@@ -13,8 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x41'\n-part_number = '0xd08'\n-max_lcores = 16\n-max_numa_nodes = 1\n-numa = false\n+soc = 'bluefield'\ndiff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc\nindex 3458b9d7b..e52188842 100644\n--- a/config/arm/arm64_dpaa_linux_gcc\n+++ b/config/arm/arm64_dpaa_linux_gcc\n@@ -14,7 +14,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = 'dpaa'\n-max_lcores = 16\n-max_numa_nodes = 1\n-numa = false\n+soc = 'dpaa'\ndiff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc\nindex 7cbb05510..6c24b4bca 100644\n--- a/config/arm/arm64_emag_linux_gcc\n+++ b/config/arm/arm64_emag_linux_gcc\n@@ -13,7 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x50'\n-part_number = '0x0'\n-max_lcores = 32\n-max_numa_nodes = 1\n+soc = 'emag'\ndiff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc\nindex cfe239797..bae35d6be 100644\n--- a/config/arm/arm64_graviton2_linux_gcc\n+++ b/config/arm/arm64_graviton2_linux_gcc\n@@ -13,8 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementor_id = '0x41'\n-implementor_pn = '0xd0c'\n-max_lcores = 64\n-max_numa_nodes = 1\n-numa = false\n+soc = 'graviton2'\ndiff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc\nindex b00f2d1ef..249ff4738 100644\n--- a/config/arm/arm64_n1sdp_linux_gcc\n+++ b/config/arm/arm64_n1sdp_linux_gcc\n@@ -13,8 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x41'\n-part_number = '0xd0c'\n-max_lcores = 4\n-max_numa_nodes = 1\n-numa = false\n+soc = 'n1sdp'\ndiff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc\nindex 593769709..063018e8f 100644\n--- a/config/arm/arm64_octeontx2_linux_gcc\n+++ b/config/arm/arm64_octeontx2_linux_gcc\n@@ -13,8 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x43'\n-part_number = '0xb2'\n-max_lcores = 36\n-max_numa_nodes = 1\n-numa = false\n+soc = 'octeontx2'\ndiff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc\nindex 6bef87fbd..1209a8c0b 100644\n--- a/config/arm/arm64_stingray_linux_gcc\n+++ b/config/arm/arm64_stingray_linux_gcc\n@@ -13,8 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x41'\n-part_number = '0xd08'\n-max_lcores = 16\n-max_numa_nodes = 1\n-numa = false\n+soc = 'stingray'\ndiff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc\nindex c06dcdc2b..348650712 100644\n--- a/config/arm/arm64_thunderx2_linux_gcc\n+++ b/config/arm/arm64_thunderx2_linux_gcc\n@@ -13,7 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x43'\n-part_number = '0xaf'\n-max_lcores = 256\n-max_numa_nodes = 2\n+soc = 'thunderx2'\ndiff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc\nindex 3ba1528e4..d31d0c6d8 100644\n--- a/config/arm/arm64_thunderxt88_linux_gcc\n+++ b/config/arm/arm64_thunderxt88_linux_gcc\n@@ -13,7 +13,4 @@ cpu = 'armv8-a'\n endian = 'little'\n \n [properties]\n-implementer_id = '0x43'\n-part_number = '0xa1'\n-max_lcores = 96\n-max_numa_nodes = 1\n+soc = 'thunderxt88'\ndiff --git a/config/arm/meson.build b/config/arm/meson.build\nindex 52274c0c5..cd270f84b 100644\n--- a/config/arm/meson.build\n+++ b/config/arm/meson.build\n@@ -57,7 +57,7 @@ part_number_config_arm = {\n ## Part numbers are specific to Arm implementers\n # implementer specific aarch64 flags have middle priority\n #     (will overwrite common flags)\n-# part number specific aarch64 flags have the highest priority\n+# part number specific aarch64 flags have higher priority\n #     (will overwrite both common and implementer specific flags)\n implementers = {\n \t'generic': {\n@@ -164,6 +164,102 @@ implementers = {\n \t}\n }\n \n+# soc specific aarch64 flags have the highest priority\n+#     (will overwrite all other flags)\n+socs = {\n+\t'generic': {\n+\t\t'implementer': 'generic',\n+\t\t'part_number': 'generic',\n+\t\t'flags': []\n+\t},\n+\t'armada': {\n+\t\t'implementer': '0x56',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 16],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false,\n+\t\t'disabled_drivers': ['bus/dpaa', 'bus/fslmc', 'common/dpaax']\n+\t},\n+\t'bluefield': {\n+\t\t'implementer': '0x41',\n+\t\t'part_number': '0xd08',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 16],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'dpaa': {\n+\t\t'implementer': 'dpaa',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 16],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'emag': {\n+\t\t'implementer': '0x50',\n+\t\t'part_number': '0x0',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 32],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t]\n+\t},\n+\t'graviton2': {\n+\t\t'implementer': '0x41',\n+\t\t'part_number': '0xd0c',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 64],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'n1sdp': {\n+\t\t'implementer': '0x41',\n+\t\t'part_number': '0xd0c',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 4],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'octeontx2': {\n+\t\t'implementer': '0x43',\n+\t\t'part_number': '0xb2',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 32],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'stingray': {\n+\t\t'implementer': '0x41',\n+\t\t'part_number': '0xd08',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 16],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t],\n+\t\t'numa': false\n+\t},\n+\t'thunderx2': {\n+\t\t'implementer': '0x43',\n+\t\t'part_number': '0xaf',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 256],\n+\t\t\t['RTE_MAX_NUMA_NODES', 2]\n+\t\t]\n+\t},\n+\t'thunderxt88': {\n+\t\t'implementer': '0x43',\n+\t\t'part_number': '0xa1',\n+\t\t'flags': [\n+\t\t\t['RTE_MAX_LCORE', 96],\n+\t\t\t['RTE_MAX_NUMA_NODES', 1]\n+\t\t]\n+\t}\n+}\n+\n dpdk_conf.set('RTE_ARCH_ARM', 1)\n dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)\n \n@@ -176,11 +272,18 @@ if dpdk_conf.get('RTE_ARCH_32')\n else\n \t# aarch64 build\n \tuse_native_machine_args = false\n+\tarm_soc = get_option('arm_soc')\n+\tsoc_config = {}\n \tif not meson.is_cross_build()\n \t\tif machine == 'generic'\n \t\t\t# generic build\n+\t\t\tif arm_soc != ''\n+\t\t\t\terror('Arm SoC is unsupported with generic build.')\n+\t\t\tendif\n \t\t\timplementer_id = 'generic'\n \t\t\tpart_number = 'generic'\n+\t\telif arm_soc != ''\n+\t\t\tsoc_config = socs.get(arm_soc, {'not_supported': true})\n \t\telse\n \t\t\t# native build\n \t\t\t# The script returns ['Implementer', 'Variant', 'Architecture',\n@@ -199,8 +302,27 @@ else\n \t\tendif\n \telse\n \t\t# cross build\n-\t\timplementer_id = meson.get_cross_property('implementer_id')\n-\t\tpart_number = meson.get_cross_property('part_number')\n+\t\tarm_soc = meson.get_cross_property('soc', '')\n+\t\tif arm_soc == ''\n+\t\t\terror('Arm SoC must be specified in the cross file.')\n+\t\tendif\n+\t\tsoc_config = socs.get(arm_soc, {'not_supported': true})\n+\tendif\n+\n+\tsoc_flags = []\n+\tif soc_config.has_key('not_supported')\n+\t\terror('SoC @0@ not supported.'.format(arm_soc))\n+\telif soc_config != {}\n+\t\timplementer_id = soc_config['implementer']\n+\t\timplementer_config = implementers[implementer_id]\n+\t\tpart_number = soc_config['part_number']\n+\t\tsoc_flags = soc_config['flags']\n+\t\tif not soc_config.get('numa', true)\n+\t\t\thas_libnuma = 0\n+\t\tendif\n+\t\tif soc_config.has_key('disabled_drivers')\n+\t\t\tdisabled_drivers += soc_config['disabled_drivers']\n+\t\tendif\n \tendif\n \n \tif implementers.has_key(implementer_id)\n@@ -226,8 +348,8 @@ else\n \t\t      '(-Dmachine=generic) build.')\n \tendif\n \n-\t# use default flags with implementer flags\n-\tdpdk_flags = flags_common_default + implementer_config['flags'] + part_number_config.get('flags', [])\n+\t# add flags in the proper order\n+\tdpdk_flags = flags_common_default + implementer_config['flags'] + part_number_config.get('flags', []) + soc_flags\n \n \t# apply supported machine args\n \tmachine_args = [] # Clear previous machine args\ndiff --git a/meson_options.txt b/meson_options.txt\nindex e1059fb16..33b8b236c 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -1,5 +1,7 @@\n # Please keep these options sorted alphabetically.\n \n+option('arm_soc', type: 'string', value: '',\n+\tdescription: 'Specify if you want to build for a particular Arm SoC when building on an aarch64 machine.')\n option('armv8_crypto_dir', type: 'string', value: '',\n \tdescription: 'path to the armv8_crypto library installation directory')\n option('disable_drivers', type: 'string', value: '',\n",
    "prefixes": [
        "v8",
        "14/14"
    ]
}