get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137189,
    "url": "https://patches.dpdk.org/api/patches/137189/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240226073810.19015-1-pbhagavatula@marvell.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": "<20240226073810.19015-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240226073810.19015-1-pbhagavatula@marvell.com",
    "date": "2024-02-26T07:38:08",
    "name": "[v6,1/3] config/arm: avoid mcpu and march conflicts",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2f6d6fc52876836af36ca84b68e28c9f66e814e7",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.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/20240226073810.19015-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 31213,
            "url": "https://patches.dpdk.org/api/series/31213/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31213",
            "date": "2024-02-26T07:38:08",
            "name": "[v6,1/3] config/arm: avoid mcpu and march conflicts",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/31213/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/137189/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/137189/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0A0DA43BE5;\n\tMon, 26 Feb 2024 08:38:27 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 835C1402BA;\n\tMon, 26 Feb 2024 08:38:26 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 5E3AA40144\n for <dev@dpdk.org>; Mon, 26 Feb 2024 08:38:24 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 41Q6jjgr008783; Sun, 25 Feb 2024 23:38:20 -0800",
            "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3wfepr4dtd-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Sun, 25 Feb 2024 23:38:20 -0800 (PST)",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Sun, 25 Feb\n 2024 23:38:19 -0800",
            "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id\n 15.0.1497.48; Sun, 25 Feb 2024 23:38:18 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend\n Transport; Sun, 25 Feb 2024 23:38:18 -0800",
            "from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com\n [10.28.164.106])\n by maili.marvell.com (Postfix) with ESMTP id 199BF3F7080;\n Sun, 25 Feb 2024 23:38:14 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-type:content-transfer-encoding; s=\n pfpt0220; bh=ModVPXt1Wua8TtbGFtTR9Hd0c2ZAFoU3T98wcyRAQSQ=; b=NcW\n w1pVeqHEmlqoHDABeeTcrtMJTjSv3TZ+ZvnOvunSl4ruXIsKPiKTroAPOAQ/GVZl\n MmHggrokR9Ip7CJsydOT9e7gGdYQii/rBQ4F7NoumvBCg4X/SX5yxfWDVUcImpHN\n 3iEoAJ4CU1+SfGYKzuO08a5zXqcpCPKJlUi5eXnlGz2sPg1xi3K54RFpO082gXjW\n w3htmPKoVEJljiVmk7DWfCY1PQ0tof7+shTJthn6XwK8bTyV9dSoa8VH52O65BXI\n A94Wll9W6m5rR2YcaDPvm595Bk7zUepEATbB+yD1Wn30Ms/8UqL66nU+HKZSpWCa\n d+ZbDZt5HzsEBq+oKJA==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <juraj.linkes@pantheon.tech>, <nd@arm.com>,\n <wathsala.vithanage@arm.com>, Ruifeng Wang <ruifeng.wang@arm.com>, \"Bruce\n Richardson\" <bruce.richardson@intel.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH v6 1/3] config/arm: avoid mcpu and march conflicts",
        "Date": "Mon, 26 Feb 2024 13:08:08 +0530",
        "Message-ID": "<20240226073810.19015-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20240222124503.17043-1-pbhagavatula@marvell.com>",
        "References": "<20240222124503.17043-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-Proofpoint-ORIG-GUID": "lSyX5CoFgolE1F8lNMlBDaLEluOaP0uH",
        "X-Proofpoint-GUID": "lSyX5CoFgolE1F8lNMlBDaLEluOaP0uH",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-02-26_04,2024-02-23_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nThe compiler options march and mtune are a subset\nof mcpu and will lead to conflicts if improper march\nis chosen for a given mcpu.\nTo avoid conflicts, discard part number march when\nmcpu is available and is supported by the compiler.\n\nExample:\n\tmarch = armv9-a\n\tmcpu = neoverse-n2\n\n\tmcpu supported, march supported\n\tmachine_args = ['-mcpu=neoverse-n2']\n\n\tmcpu supported, march not supported\n\tmachine_args = ['-mcpu=neoverse-n2']\n\n\tmcpu not supported, march supported\n\tmachine_args = ['-march=armv9-a']\n\n\tmcpu not supported, march not supported\n\tmachine_args = ['-march=armv8.6-a']\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nReviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\nv2 Changes:\n- Cleanup march inconsistencies. (Juraj Linkes)\n- Unify fallback march selection. (Juraj Linkes)\n- Tag along ARM WFE patch.\nv3 Changes:\n- Fix missing 'fallback_march' key check.\nv4 Changes:\n- Discard march when mcpu is supported.\nv5 Changes:\n- Consolidate mcpu and march checks. (Juraj Linkes)\n- Fix unintentionally skipping fallback march (Juraj Linkes)\nv6 Changes:\n- Remove compiler support check when march is forced. (Juraj Linkes)\n- Simplify fallback march configuration.\n\n config/arm/meson.build | 112 +++++++++++++++++++++++++----------------\n 1 file changed, 68 insertions(+), 44 deletions(-)\n\n--\n2.25.1",
    "diff": "diff --git a/config/arm/meson.build b/config/arm/meson.build\nindex 36f21d2259..236ad3702d 100644\n--- a/config/arm/meson.build\n+++ b/config/arm/meson.build\n@@ -58,18 +58,18 @@ implementer_generic = {\n }\n\n part_number_config_arm = {\n-    '0xd03': {'compiler_options':  ['-mcpu=cortex-a53']},\n-    '0xd04': {'compiler_options':  ['-mcpu=cortex-a35']},\n-    '0xd05': {'compiler_options':  ['-mcpu=cortex-a55']},\n-    '0xd07': {'compiler_options':  ['-mcpu=cortex-a57']},\n-    '0xd08': {'compiler_options':  ['-mcpu=cortex-a72']},\n-    '0xd09': {'compiler_options':  ['-mcpu=cortex-a73']},\n-    '0xd0a': {'compiler_options':  ['-mcpu=cortex-a75']},\n-    '0xd0b': {'compiler_options':  ['-mcpu=cortex-a76']},\n+    '0xd03': {'mcpu': 'cortex-a53'},\n+    '0xd04': {'mcpu': 'cortex-a35'},\n+    '0xd05': {'mcpu': 'cortex-a55'},\n+    '0xd07': {'mcpu': 'cortex-a57'},\n+    '0xd08': {'mcpu': 'cortex-a72'},\n+    '0xd09': {'mcpu': 'cortex-a73'},\n+    '0xd0a': {'mcpu': 'cortex-a75'},\n+    '0xd0b': {'mcpu': 'cortex-a76'},\n     '0xd0c': {\n         'march': 'armv8.2-a',\n         'march_features': ['crypto', 'rcpc'],\n-        'compiler_options':  ['-mcpu=neoverse-n1'],\n+        'mcpu': 'neoverse-n1',\n         'flags': [\n             ['RTE_MACHINE', '\"neoverse-n1\"'],\n             ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -81,7 +81,7 @@ part_number_config_arm = {\n     '0xd40': {\n         'march': 'armv8.4-a',\n         'march_features': ['sve'],\n-        'compiler_options':  ['-mcpu=neoverse-v1'],\n+        'mcpu': 'neoverse-v1',\n         'flags': [\n             ['RTE_MACHINE', '\"neoverse-v1\"'],\n             ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -92,8 +92,9 @@ part_number_config_arm = {\n         'march': 'armv8.4-a',\n     },\n     '0xd49': {\n+        'march': 'armv9-a',\n         'march_features': ['sve2'],\n-        'compiler_options': ['-mcpu=neoverse-n2'],\n+        'mcpu': 'neoverse-n2',\n         'flags': [\n             ['RTE_MACHINE', '\"neoverse-n2\"'],\n             ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -127,21 +128,23 @@ implementer_cavium = {\n     ],\n     'part_number_config': {\n         '0xa1': {\n-            'compiler_options': ['-mcpu=thunderxt88'],\n+            'mcpu': 'thunderxt88',\n             'flags': flags_part_number_thunderx\n         },\n         '0xa2': {\n-            'compiler_options': ['-mcpu=thunderxt81'],\n+            'mcpu': 'thunderxt81',\n             'flags': flags_part_number_thunderx\n         },\n         '0xa3': {\n-            'compiler_options': ['-march=armv8-a+crc', '-mcpu=thunderxt83'],\n+            'march': 'armv8-a',\n+            'march_features': ['crc'],\n+            'mcpu': 'thunderxt83',\n             'flags': flags_part_number_thunderx\n         },\n         '0xaf': {\n             'march': 'armv8.1-a',\n             'march_features': ['crc', 'crypto'],\n-            'compiler_options': ['-mcpu=thunderx2t99'],\n+            'mcpu': 'thunderx2t99',\n             'flags': [\n                 ['RTE_MACHINE', '\"thunderx2\"'],\n                 ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -153,7 +156,7 @@ implementer_cavium = {\n         '0xb2': {\n             'march': 'armv8.2-a',\n             'march_features': ['crc', 'crypto', 'lse'],\n-            'compiler_options': ['-mcpu=octeontx2'],\n+            'mcpu': 'octeontx2',\n             'flags': [\n                 ['RTE_MACHINE', '\"cn9k\"'],\n                 ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -176,7 +179,7 @@ implementer_ampere = {\n         '0x0': {\n             'march': 'armv8-a',\n             'march_features': ['crc', 'crypto'],\n-            'compiler_options':  ['-mtune=emag'],\n+            'mcpu': 'emag',\n             'flags': [\n                 ['RTE_MACHINE', '\"eMAG\"'],\n                 ['RTE_MAX_LCORE', 32],\n@@ -186,7 +189,7 @@ implementer_ampere = {\n         '0xac3': {\n             'march': 'armv8.6-a',\n             'march_features': ['crc', 'crypto'],\n-            'compiler_options':  ['-mcpu=ampere1'],\n+            'mcpu': 'ampere1',\n             'flags': [\n                 ['RTE_MACHINE', '\"AmpereOne\"'],\n                 ['RTE_MAX_LCORE', 320],\n@@ -206,7 +209,7 @@ implementer_hisilicon = {\n         '0xd01': {\n             'march': 'armv8.2-a',\n             'march_features': ['crypto'],\n-            'compiler_options': ['-mtune=tsv110'],\n+            'mcpu': 'tsv110',\n             'flags': [\n                 ['RTE_MACHINE', '\"Kunpeng 920\"'],\n                 ['RTE_ARM_FEATURE_ATOMICS', true],\n@@ -695,13 +698,35 @@ if update_flags\n\n     machine_args = [] # Clear previous machine args\n\n-    # probe supported archs and their features\n+    march_features = []\n+    if part_number_config.has_key('march_features')\n+        march_features += part_number_config['march_features']\n+    endif\n+    if soc_config.has_key('extra_march_features')\n+        march_features += soc_config['extra_march_features']\n+    endif\n+\n+    candidate_mcpu = ''\n     candidate_march = ''\n-    if part_number_config.has_key('march')\n+\n+    if (part_number_config.has_key('mcpu') and\n+        cc.has_argument('-mcpu=' + part_number_config['mcpu']))\n+        candidate_mcpu = '-mcpu=' + part_number_config['mcpu']\n+        foreach feature: march_features\n+            if cc.has_argument('+'.join([candidate_mcpu, feature]))\n+                candidate_mcpu = '+'.join([candidate_mcpu, feature])\n+            else\n+                warning('The compiler does not support feature @0@'\n+                    .format(feature))\n+            endif\n+        endforeach\n+        machine_args += candidate_mcpu\n+    elif part_number_config.has_key('march')\n+        # probe supported archs and their features\n         if part_number_config.get('force_march', false)\n             candidate_march = part_number_config['march']\n         else\n-            supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',\n+            supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',\n                                 'armv8.2-a', 'armv8.1-a', 'armv8-a']\n             check_compiler_support = false\n             foreach supported_march: supported_marchs\n@@ -717,32 +742,31 @@ if update_flags\n                 endif\n             endforeach\n         endif\n-        if candidate_march == ''\n-            error('No suitable armv8 march version found.')\n-        endif\n+\n         if candidate_march != part_number_config['march']\n-            warning('Configuration march version is ' +\n-                    '@0@, but the compiler supports only @1@.'\n-                    .format(part_number_config['march'], candidate_march))\n+            warning('Configuration march version is @0@, not supported.'\n+                    .format(part_number_config['march']))\n+            if candidate_march != ''\n+                warning('Using march version @0@.'.format(candidate_march))\n+            endif\n         endif\n-        candidate_march = '-march=' + candidate_march\n\n-        march_features = []\n-        if part_number_config.has_key('march_features')\n-            march_features += part_number_config['march_features']\n-        endif\n-        if soc_config.has_key('extra_march_features')\n-            march_features += soc_config['extra_march_features']\n+        if candidate_march != ''\n+            candidate_march = '-march=' + candidate_march\n+            foreach feature: march_features\n+                if cc.has_argument('+'.join([candidate_march, feature]))\n+                    candidate_march = '+'.join([candidate_march, feature])\n+                else\n+                    warning('The compiler does not support feature @0@'\n+                        .format(feature))\n+                endif\n+            endforeach\n+            machine_args += candidate_march\n         endif\n-        foreach feature: march_features\n-            if cc.has_argument('+'.join([candidate_march, feature]))\n-                candidate_march = '+'.join([candidate_march, feature])\n-            else\n-                warning('The compiler does not support feature @0@'\n-                    .format(feature))\n-            endif\n-        endforeach\n-        machine_args += candidate_march\n+    endif\n+\n+    if candidate_mcpu == '' and candidate_march == ''\n+        error('No suitable ARM march/mcpu version found.')\n     endif\n\n     # apply supported compiler options\n",
    "prefixes": [
        "v6",
        "1/3"
    ]
}