get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136010,
    "url": "https://patches.dpdk.org/api/patches/136010/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240121093653.2890-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": "<20240121093653.2890-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240121093653.2890-1-pbhagavatula@marvell.com",
    "date": "2024-01-21T09:36:52",
    "name": "[1/2] config/arm: avoid mcpu and march conflicts",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6939b3b666a92c83cfd8a3cc53470a9bed722087",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240121093653.2890-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 30867,
            "url": "https://patches.dpdk.org/api/series/30867/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30867",
            "date": "2024-01-21T09:36:52",
            "name": "[1/2] config/arm: avoid mcpu and march conflicts",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/30867/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/136010/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/136010/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 4CBB04391B;\n\tSun, 21 Jan 2024 10:37:07 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3D8FD4064A;\n\tSun, 21 Jan 2024 10:37:07 +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 8EA28402CE\n for <dev@dpdk.org>; Sun, 21 Jan 2024 10:37:05 +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 40L8HQHm032451; Sun, 21 Jan 2024 01:37:00 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vrcdpj141-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 21 Jan 2024 01:36:59 -0800 (PST)",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Sun, 21 Jan 2024 01:36:58 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Sun, 21 Jan 2024 01:36:58 -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 63F443F70AA;\n Sun, 21 Jan 2024 01:36:55 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding:content-type; s=pfpt0220; bh=MdrGOyU2\n p3OLZfuMVCULaT38bEwRrkoHBPXkx2NC2d0=; b=DyLEkjR8+6Gm+l9T8hcX/bk4\n 9BvPXDD3wCHdFNb+zPXH59T0qfrej4hmKvPZrHva7Ny+TF/yAt+nZPm50CyKezVx\n EFlu8FUCPb+KJi2os1Sr5VyeMyY1nKQnGJRTvx46b9EG7YKgeQXMDM2mrxCoKD0T\n yCGO1k3p4PBJgVnijCD3deyh0nNVm5pRsot6/ojrKnqI/b/Se73YKsbNLqBDVNAQ\n cnYS+no3y22nd83RkV8ty7ebguZ38w5m1tKB0KVQ6sMw1D8wS1VTrd5wmB/poqao\n GUSfrsRJKO4Geak7niOjFbyeYGbZpo71p8RKE2BSJ6hG2wazWYt5jgAc39s7mw==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <Ruifeng.Wang@arm.com>, <nd@arm.com>, Ruifeng Wang\n <ruifeng.wang@arm.com>, Bruce Richardson <bruce.richardson@intel.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH 1/2] config/arm: avoid mcpu and march conflicts",
        "Date": "Sun, 21 Jan 2024 15:06:52 +0530",
        "Message-ID": "<20240121093653.2890-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "sJRD4kl_GJVX4TmFHgZQnVqGfvDBcn6c",
        "X-Proofpoint-GUID": "sJRD4kl_GJVX4TmFHgZQnVqGfvDBcn6c",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-01-20_06,2024-01-19_02,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, force 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', '-march=armv9-a']\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>\n---\n config/arm/meson.build | 109 +++++++++++++++++++++++++----------------\n 1 file changed, 67 insertions(+), 42 deletions(-)",
    "diff": "diff --git a/config/arm/meson.build b/config/arm/meson.build\nindex 36f21d2259..8c8cfccca0 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,22 @@ 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+            'mcpu': 'thunderxt83',\n+            'compiler_options': ['-march=armv8-a+crc'],\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 +155,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 +178,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 +188,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 +208,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,11 +697,23 @@ if update_flags\n \n     machine_args = [] # Clear previous machine args\n \n+    candidate_mcpu = ''\n+    support_mcpu = false\n+    if part_number_config.has_key('mcpu')\n+        mcpu = part_number_config['mcpu']\n+        if (cc.has_argument('-mcpu=' + mcpu))\n+            candidate_mcpu = mcpu\n+            support_mcpu = true\n+        endif\n+    endif\n+\n     # probe supported archs and their features\n     candidate_march = ''\n     if part_number_config.has_key('march')\n-        if part_number_config.get('force_march', false)\n-            candidate_march = part_number_config['march']\n+        if part_number_config.get('force_march', false) or support_mcpu\n+            if cc.has_argument('-march=' +  part_number_config['march'])\n+                candidate_march = part_number_config['march']\n+            endif\n         else\n             supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',\n                                 'armv8.2-a', 'armv8.1-a', 'armv8-a']\n@@ -717,32 +731,43 @@ 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+        if candidate_march == '' and candidate_mcpu == ''\n+            error('No suitable ARM march/mcpu version found.')\n         endif\n-        if soc_config.has_key('extra_march_features')\n-            march_features += soc_config['extra_march_features']\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+\n+        if candidate_march != ''\n+            candidate_march = '-march=' + candidate_march\n+            march_features = []\n+            if part_number_config.has_key('march_features')\n+                march_features += part_number_config['march_features']\n             endif\n-        endforeach\n-        machine_args += candidate_march\n+            if soc_config.has_key('extra_march_features')\n+                march_features += soc_config['extra_march_features']\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+    endif\n+\n+    if candidate_mcpu != ''\n+        candidate_mcpu = '-mcpu=' + candidate_mcpu\n+        machine_args += candidate_mcpu\n     endif\n \n     # apply supported compiler options\n",
    "prefixes": [
        "1/2"
    ]
}