get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124879,
    "url": "http://patches.dpdk.org/api/patches/124879/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230309042842.8709-1-ivan.malov@arknetworks.am/",
    "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": "<20230309042842.8709-1-ivan.malov@arknetworks.am>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230309042842.8709-1-ivan.malov@arknetworks.am",
    "date": "2023-03-09T04:28:41",
    "name": "[1/2] common/sfc_efx/base: allow to request MAE mark reset action",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "963fa732d1be6f204bf323b4f1a515648460fceb",
    "submitter": {
        "id": 2962,
        "url": "http://patches.dpdk.org/api/people/2962/?format=api",
        "name": "Ivan Malov",
        "email": "ivan.malov@arknetworks.am"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230309042842.8709-1-ivan.malov@arknetworks.am/mbox/",
    "series": [
        {
            "id": 27297,
            "url": "http://patches.dpdk.org/api/series/27297/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27297",
            "date": "2023-03-09T04:28:41",
            "name": "[1/2] common/sfc_efx/base: allow to request MAE mark reset action",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/27297/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/124879/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/124879/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 D738D41E2F;\n\tThu,  9 Mar 2023 05:28:20 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BE4AF410EE;\n\tThu,  9 Mar 2023 05:28:20 +0100 (CET)",
            "from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80])\n by mails.dpdk.org (Postfix) with ESMTP id 0393840A7E;\n Thu,  9 Mar 2023 05:28:20 +0100 (CET)",
            "from localhost.localdomain (unknown [78.109.74.25])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by agw.arknetworks.am (Postfix) with ESMTPSA id 4712EE0439;\n Thu,  9 Mar 2023 08:28:19 +0400 (+04)"
        ],
        "From": "Ivan Malov <ivan.malov@arknetworks.am>",
        "To": "dev@dpdk.org",
        "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ferruh Yigit <ferruh.yigit@amd.com>, stable@dpdk.org,\n Andy Moreton <amoreton@xilinx.com>",
        "Subject": "[PATCH 1/2] common/sfc_efx/base: allow to request MAE mark reset\n action",
        "Date": "Thu,  9 Mar 2023 08:28:41 +0400",
        "Message-Id": "<20230309042842.8709-1-ivan.malov@arknetworks.am>",
        "X-Mailer": "git-send-email 2.30.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Previously, DPDK sfc driver received support for tunnel\noffload. In it, MAE needs to set intermediate mark from\nan outer rule (OR) recirculation ID in order to help\nthe driver identify packets that hit the OR but miss\non action rule (AR) lookup. But, for packets that do\nhit an AR, the driver wants to reset this mark so\nthat the end receiver of traffic does not see it.\n\nThe driver has a call to request such mark reset,\nbut it does not work as it comes via the regular\nmark populate API, which must not be invoked\nafter final delivery action has been added.\n\nProvide a suitable dedicated API for that.\n\nFixes: 3a73dcfdb255 (\"common/sfc_efx/base: match on recirc ID in action rules\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ivan Malov <ivan.malov@arknetworks.am>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/efx.h     | 18 ++++++++++++++++++\n drivers/common/sfc_efx/base/efx_mae.c | 12 ++++++++++++\n drivers/common/sfc_efx/version.map    |  1 +\n 3 files changed, 31 insertions(+)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 92ec18761b..f4fa88f169 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -4582,6 +4582,24 @@ efx_mae_action_set_populate_mark(\n \t__in\t\t\t\tefx_mae_actions_t *spec,\n \t__in\t\t\t\tuint32_t mark_value);\n \n+/*\n+ * Whilst efx_mae_action_set_populate_mark() can be used to request setting\n+ * a user mark in matching packets and demands that the request come before\n+ * setting the final destination (deliver action), this API can be invoked\n+ * after deliver action has been added in order to request mark reset if\n+ * the user's own mark request has not been added as a result of parsing.\n+ *\n+ * It is useful when the driver chains an outer rule (OR) with an action\n+ * rule (AR) by virtue of a recirculation ID. The OR may set mark from\n+ * this ID to help the driver identify packets that hit the OR and do\n+ * not hit the AR. But, for packets that do hit the AR, the driver\n+ * wants to reset the mark value to avoid confusing recipients.\n+ */\n+LIBEFX_API\n+extern\t\t\t\t\tvoid\n+efx_mae_action_set_populate_mark_reset(\n+\t__in\t\t\t\tefx_mae_actions_t *spec);\n+\n LIBEFX_API\n extern\t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_deliver(\ndiff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c\nindex 31f51b5548..7732d99992 100644\n--- a/drivers/common/sfc_efx/base/efx_mae.c\n+++ b/drivers/common/sfc_efx/base/efx_mae.c\n@@ -1916,6 +1916,18 @@ efx_mae_action_set_populate_mark(\n \t    EFX_MAE_ACTION_MARK, sizeof (mark_value), arg));\n }\n \n+\t\t\t\t\tvoid\n+efx_mae_action_set_populate_mark_reset(\n+\t__in\t\t\t\tefx_mae_actions_t *spec)\n+{\n+\tuint32_t action_mask = (1U << EFX_MAE_ACTION_MARK);\n+\n+\tif ((spec->ema_actions & action_mask) == 0) {\n+\t\tspec->ema_actions |= action_mask;\n+\t\tspec->ema_mark_value = 0;\n+\t}\n+}\n+\n \t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_deliver(\n \t__in\t\t\t\tefx_mae_actions_t *spec,\ndiff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map\nindex a54aab0a08..aabc354118 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -103,6 +103,7 @@ INTERNAL {\n \tefx_mae_action_set_populate_encap;\n \tefx_mae_action_set_populate_flag;\n \tefx_mae_action_set_populate_mark;\n+\tefx_mae_action_set_populate_mark_reset;\n \tefx_mae_action_set_populate_set_dst_mac;\n \tefx_mae_action_set_populate_set_src_mac;\n \tefx_mae_action_set_populate_vlan_pop;\n",
    "prefixes": [
        "1/2"
    ]
}