get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128054,
    "url": "http://patchwork.dpdk.org/api/patches/128054/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-27-ivan.malov@arknetworks.am/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230604232523.6746-27-ivan.malov@arknetworks.am>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230604232523.6746-27-ivan.malov@arknetworks.am",
    "date": "2023-06-04T23:25:15",
    "name": "[v3,26/34] common/sfc_efx/base: support NAT edits in MAE",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "31ea45a6924a51608b6bf8a4466091ada934b009",
    "submitter": {
        "id": 2962,
        "url": "http://patchwork.dpdk.org/api/people/2962/?format=api",
        "name": "Ivan Malov",
        "email": "ivan.malov@arknetworks.am"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-27-ivan.malov@arknetworks.am/mbox/",
    "series": [
        {
            "id": 28336,
            "url": "http://patchwork.dpdk.org/api/series/28336/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28336",
            "date": "2023-06-04T23:24:49",
            "name": "net/sfc: support HW conntrack assistance",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/28336/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128054/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128054/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 61B8B42C2C;\n\tMon,  5 Jun 2023 01:28:13 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C0A9A42FD8;\n\tMon,  5 Jun 2023 01:25:56 +0200 (CEST)",
            "from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80])\n by mails.dpdk.org (Postfix) with ESMTP id EAF7342D5E\n for <dev@dpdk.org>; Mon,  5 Jun 2023 01:25:38 +0200 (CEST)",
            "from localhost.localdomain (unknown [78.109.68.201])\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 77A18E12CA;\n Mon,  5 Jun 2023 03:25:38 +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>, Andy Moreton <amoreton@xilinx.com>",
        "Subject": "[PATCH v3 26/34] common/sfc_efx/base: support NAT edits in MAE",
        "Date": "Mon,  5 Jun 2023 03:25:15 +0400",
        "Message-Id": "<20230604232523.6746-27-ivan.malov@arknetworks.am>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "References": "<20230601195538.8265-1-ivan.malov@arknetworks.am>\n <20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "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": "NAT goes after IP TTL decrement. It can operate\non the outermost frame only. In the case of\nprior decapsulation, that maps to the frame\nwhich was (originally) the inner one. Input\ndata for the action comes from the response\nof the HW conntrack assistance table hit.\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      | 13 +++++++++++++\n drivers/common/sfc_efx/base/efx_impl.h |  1 +\n drivers/common/sfc_efx/base/efx_mae.c  | 17 +++++++++++++++++\n drivers/common/sfc_efx/version.map     |  1 +\n 4 files changed, 32 insertions(+)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 99ef0ce957..0a08b490e5 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -4560,6 +4560,19 @@ extern\t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_decr_ip_ttl(\n \t__in\t\t\t\tefx_mae_actions_t *spec);\n \n+/*\n+ * This only requests NAT action. The replacement IP address and\n+ * L4 port number, as well as the edit direction (DST/SRC), come\n+ * from the response to a hit in the conntrack assistance table.\n+ *\n+ * The action amends the outermost frame. In the case of prior\n+ * decapsulation, that maps to the (originally) inner frame.\n+ */\n+LIBEFX_API\n+extern\t__checkReturn\t\t\tefx_rc_t\n+efx_mae_action_set_populate_nat(\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_vlan_push(\ndiff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h\nindex 0a6a489d2c..e978ad0de8 100644\n--- a/drivers/common/sfc_efx/base/efx_impl.h\n+++ b/drivers/common/sfc_efx/base/efx_impl.h\n@@ -1771,6 +1771,7 @@ typedef enum efx_mae_action_e {\n \tEFX_MAE_ACTION_SET_DST_MAC,\n \tEFX_MAE_ACTION_SET_SRC_MAC,\n \tEFX_MAE_ACTION_DECR_IP_TTL,\n+\tEFX_MAE_ACTION_NAT,\n \tEFX_MAE_ACTION_VLAN_PUSH,\n \tEFX_MAE_ACTION_COUNT,\n \tEFX_MAE_ACTION_ENCAP,\ndiff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c\nindex 546c743a02..aaea38c933 100644\n--- a/drivers/common/sfc_efx/base/efx_mae.c\n+++ b/drivers/common/sfc_efx/base/efx_mae.c\n@@ -1837,6 +1837,9 @@ static const efx_mae_action_desc_t efx_mae_actions[EFX_MAE_NACTIONS] = {\n \t[EFX_MAE_ACTION_DECR_IP_TTL] = {\n \t\t.emad_add = efx_mae_action_set_no_op\n \t},\n+\t[EFX_MAE_ACTION_NAT] = {\n+\t\t.emad_add = efx_mae_action_set_no_op\n+\t},\n \t[EFX_MAE_ACTION_VLAN_PUSH] = {\n \t\t.emad_add = efx_mae_action_set_add_vlan_push\n \t},\n@@ -1863,6 +1866,7 @@ static const uint32_t efx_mae_action_ordered_map =\n \t(1U << EFX_MAE_ACTION_SET_DST_MAC) |\n \t(1U << EFX_MAE_ACTION_SET_SRC_MAC) |\n \t(1U << EFX_MAE_ACTION_DECR_IP_TTL) |\n+\t(1U << EFX_MAE_ACTION_NAT) |\n \t(1U << EFX_MAE_ACTION_VLAN_PUSH) |\n \t/*\n \t * HW will conduct action COUNT after\n@@ -2038,6 +2042,14 @@ efx_mae_action_set_populate_decr_ip_ttl(\n \treturn (rc);\n }\n \n+\t__checkReturn\t\t\tefx_rc_t\n+efx_mae_action_set_populate_nat(\n+\t__in\t\t\t\tefx_mae_actions_t *spec)\n+{\n+\treturn (efx_mae_action_set_spec_populate(spec,\n+\t    EFX_MAE_ACTION_NAT, 0, NULL));\n+}\n+\n \t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_vlan_push(\n \t__in\t\t\t\tefx_mae_actions_t *spec,\n@@ -3093,6 +3105,11 @@ efx_mae_action_set_alloc(\n \t\t    MAE_ACTION_SET_ALLOC_IN_DO_DECR_IP_TTL, 1);\n \t}\n \n+\tif ((spec->ema_actions & (1U << EFX_MAE_ACTION_NAT)) != 0) {\n+\t\tMCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,\n+\t\t    MAE_ACTION_SET_ALLOC_IN_DO_NAT, 1);\n+\t}\n+\n \tif (spec->ema_n_vlan_tags_to_push > 0) {\n \t\tunsigned int outer_tag_idx;\n \ndiff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map\nindex 28a2be0a95..1ff760a024 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -104,6 +104,7 @@ INTERNAL {\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_nat;\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": [
        "v3",
        "26/34"
    ]
}