get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87934,
    "url": "https://patches.dpdk.org/api/patches/87934/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210216202127.22803-4-cristian.dumitrescu@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": "<20210216202127.22803-4-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210216202127.22803-4-cristian.dumitrescu@intel.com",
    "date": "2021-02-16T20:21:26",
    "name": "[v2,4/5] table: add table entry priority",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c3c52be75f7612c142b7e5ade4beeaa365492303",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@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/20210216202127.22803-4-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 15271,
            "url": "https://patches.dpdk.org/api/series/15271/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15271",
            "date": "2021-02-16T20:21:26",
            "name": "[v2,1/5] pipeline: improve table entry helpers",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/15271/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87934/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87934/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 90B2CA054D;\n\tTue, 16 Feb 2021 21:21:36 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2987E16077B;\n\tTue, 16 Feb 2021 21:21:36 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 337E140690\n for <dev@dpdk.org>; Tue, 16 Feb 2021 21:21:33 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2021 12:21:32 -0800",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by fmsmga005.fm.intel.com with ESMTP; 16 Feb 2021 12:21:31 -0800"
        ],
        "IronPort-SDR": [
            "\n mz5MAdDyPxjko5I8Khzf/JfKwe0KAi0OlqethGHDeNc+xF86JyVWrdPbwSfCVK3NjkCooSMlEL\n paA6Fx6fZHDg==",
            "\n DsK40J8dlavX0cdt8OCuK1W2/VsZetPRevcDmcPVsA8G5KwlNLOtLlPxaRL0hgI1UIear8VB/r\n PLaiHCibJs8g=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9897\"; a=\"170669079\"",
            "E=Sophos;i=\"5.81,184,1610438400\"; d=\"scan'208\";a=\"170669079\"",
            "E=Sophos;i=\"5.81,184,1610438400\"; d=\"scan'208\";a=\"592507256\""
        ],
        "X-ExtLoop1": "1",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 16 Feb 2021 20:21:26 +0000",
        "Message-Id": "<20210216202127.22803-4-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210216202127.22803-1-cristian.dumitrescu@intel.com>",
        "References": "<20210216202127.22803-1-cristian.dumitrescu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/5] table: add table entry priority",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add support for table entry priority, which is required for the\nwildcard match/ACL table type.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/librte_pipeline/rte_swx_ctl.c | 27 +++++++++++++++++++++++++++\n lib/librte_table/rte_swx_table.h  |  9 +++++++++\n 2 files changed, 36 insertions(+)",
    "diff": "diff --git a/lib/librte_pipeline/rte_swx_ctl.c b/lib/librte_pipeline/rte_swx_ctl.c\nindex 3e8e283c3..38711b15c 100644\n--- a/lib/librte_pipeline/rte_swx_ctl.c\n+++ b/lib/librte_pipeline/rte_swx_ctl.c\n@@ -386,6 +386,9 @@ table_entry_duplicate(struct rte_swx_ctl_pipeline *ctl,\n \t\t\t       entry->key_mask,\n \t\t\t       table->params.key_size);\n \t\t}\n+\n+\t\t/* key_priority. */\n+\t\tnew_entry->key_priority = entry->key_priority;\n \t}\n \n \tif (data_duplicate) {\n@@ -1673,6 +1676,28 @@ rte_swx_ctl_pipeline_table_entry_read(struct rte_swx_ctl_pipeline *ctl,\n \ttokens += 1 + table->info.n_match_fields;\n \tn_tokens -= 1 + table->info.n_match_fields;\n \n+\t/*\n+\t * Match priority.\n+\t */\n+\tif (n_tokens && !strcmp(tokens[0], \"priority\")) {\n+\t\tchar *priority = tokens[1];\n+\t\tuint32_t val;\n+\n+\t\tif (n_tokens < 2)\n+\t\t\tgoto error;\n+\n+\t\t/* Parse. */\n+\t\tval = strtoul(priority, &priority, 0);\n+\t\tif (priority[0])\n+\t\t\tgoto error;\n+\n+\t\t/* Copy to entry. */\n+\t\tentry->key_priority = val;\n+\n+\t\ttokens += 2;\n+\t\tn_tokens -= 2;\n+\t}\n+\n \t/*\n \t * Action.\n \t */\n@@ -1769,6 +1794,8 @@ table_entry_printf(FILE *f,\n \t\t\tfprintf(f, \"%02x\", entry->key_mask[i]);\n \t}\n \n+\tfprintf(f, \" priority %u\", entry->key_priority);\n+\n \tfprintf(f, \" action %s \", action->info.name);\n \tfor (i = 0; i < action->data_size; i++)\n \t\tfprintf(f, \"%02x\", entry->action_data[i]);\ndiff --git a/lib/librte_table/rte_swx_table.h b/lib/librte_table/rte_swx_table.h\nindex 5a3137ec5..00446718f 100644\n--- a/lib/librte_table/rte_swx_table.h\n+++ b/lib/librte_table/rte_swx_table.h\n@@ -89,6 +89,15 @@ struct rte_swx_table_entry {\n \t */\n \tuint64_t key_signature;\n \n+\t/** Key priority for the current entry. Useful for wildcard match (as\n+\t * match rules are commonly overlapping with other rules), ignored for\n+\t * exact match (as match rules never overlap, hence all rules have the\n+\t * same match priority) and for LPM (match priority is driven by the\n+\t * prefix length, with non-overlapping prefixes essentially having the\n+\t * same match priority). Value 0 indicates the highest match priority.\n+\t */\n+\tuint32_t key_priority;\n+\n \t/** Action ID for the current entry. */\n \tuint64_t action_id;\n \n",
    "prefixes": [
        "v2",
        "4/5"
    ]
}