get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103891,
    "url": "https://patches.dpdk.org/api/patches/103891/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211105215409.5706-5-ivan.malov@oktetlabs.ru/",
    "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": "<20211105215409.5706-5-ivan.malov@oktetlabs.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211105215409.5706-5-ivan.malov@oktetlabs.ru",
    "date": "2021-11-05T21:54:08",
    "name": "[4/5] common/sfc_efx/base: support adding dec. TTL action to a set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9815252a3612b4dbebe153476c66656d2a86e77b",
    "submitter": {
        "id": 869,
        "url": "https://patches.dpdk.org/api/people/869/?format=api",
        "name": "Ivan Malov",
        "email": "Ivan.Malov@oktetlabs.ru"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211105215409.5706-5-ivan.malov@oktetlabs.ru/mbox/",
    "series": [
        {
            "id": 20356,
            "url": "https://patches.dpdk.org/api/series/20356/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20356",
            "date": "2021-11-05T21:54:04",
            "name": "net/sfc: support IP TTL decrement actions in transfer flows",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/20356/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/103891/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/103891/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 5E19EA0C41;\n\tFri,  5 Nov 2021 22:54:54 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 77B6441137;\n\tFri,  5 Nov 2021 22:54:36 +0100 (CET)",
            "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id A5DEC40689\n for <dev@dpdk.org>; Fri,  5 Nov 2021 22:54:31 +0100 (CET)",
            "from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5])\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 shelob.oktetlabs.ru (Postfix) with ESMTPS id 70AA47F70C;\n Sat,  6 Nov 2021 00:54:31 +0300 (MSK)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 70AA47F70C",
        "Authentication-Results": "shelob.oktetlabs.ru/70AA47F70C; dkim=none;\n dkim-atps=neutral",
        "From": "Ivan Malov <ivan.malov@oktetlabs.ru>",
        "To": "dev@dpdk.org",
        "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Andy Moreton <amoreton@xilinx.com>, Ray Kinsella <mdr@ashroe.eu>",
        "Date": "Sat,  6 Nov 2021 00:54:08 +0300",
        "Message-Id": "<20211105215409.5706-5-ivan.malov@oktetlabs.ru>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211105215409.5706-1-ivan.malov@oktetlabs.ru>",
        "References": "<20211105215409.5706-1-ivan.malov@oktetlabs.ru>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 4/5] common/sfc_efx/base: support adding dec. TTL\n action to a set",
        "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": "Affects the outermost header, taking prior action DECAP into\naccount. Takes care to also update IPv4 checksum accordingly.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nReviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/ef10_nic.c |  9 +++++++\n drivers/common/sfc_efx/base/efx.h      | 14 +++++++++++\n drivers/common/sfc_efx/base/efx_impl.h |  8 ++++++\n drivers/common/sfc_efx/base/efx_mae.c  | 35 ++++++++++++++++++++++++++\n drivers/common/sfc_efx/version.map     |  1 +\n 5 files changed, 67 insertions(+)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c\nindex bbc59811ec..72d2caadb8 100644\n--- a/drivers/common/sfc_efx/base/ef10_nic.c\n+++ b/drivers/common/sfc_efx/base/ef10_nic.c\n@@ -1452,6 +1452,15 @@ ef10_get_datapath_caps(\n \t\tencp->enc_mae_supported = B_FALSE;\n \t\tencp->enc_mae_admin = B_FALSE;\n \t}\n+\n+\t/*\n+\t * Check support for MAE action set v2 features.\n+\t * These provide support for packet edits.\n+\t */\n+\tif (CAP_FLAGS3(req, MAE_ACTION_SET_ALLOC_V2_SUPPORTED))\n+\t\tencp->enc_mae_aset_v2_supported = B_TRUE;\n+\telse\n+\t\tencp->enc_mae_aset_v2_supported = B_FALSE;\n #else\n \tencp->enc_mae_supported = B_FALSE;\n \tencp->enc_mae_admin = B_FALSE;\ndiff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 60533881c2..f08a004536 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -1625,6 +1625,8 @@ typedef struct efx_nic_cfg_s {\n \t * destination (a MAE client or network port).\n \t */\n \tboolean_t\t\tenc_mae_admin;\n+\t/* NIC support for MAE action set v2 features. */\n+\tboolean_t\t\tenc_mae_aset_v2_supported;\n \t/* Firmware support for \"FLAG\" and \"MARK\" filter actions */\n \tboolean_t\t\tenc_filter_action_flag_supported;\n \tboolean_t\t\tenc_filter_action_mark_supported;\n@@ -4435,6 +4437,18 @@ extern\t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_vlan_pop(\n \t__in\t\t\t\tefx_mae_actions_t *spec);\n \n+/*\n+ * This always amends the outermost header. This way, for a tunnel\n+ * packet, if action DECAP is not requested, this will affect the\n+ * outer header; otherwise, the inner header will be updated.\n+ *\n+ * This will also take care to update IPv4 checksum accordingly.\n+ */\n+LIBEFX_API\n+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 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 5dcdb9c78d..eda41b4be0 100644\n--- a/drivers/common/sfc_efx/base/efx_impl.h\n+++ b/drivers/common/sfc_efx/base/efx_impl.h\n@@ -1740,6 +1740,7 @@ typedef enum efx_mae_action_e {\n \t/* These actions are strictly ordered. */\n \tEFX_MAE_ACTION_DECAP,\n \tEFX_MAE_ACTION_VLAN_POP,\n+\tEFX_MAE_ACTION_DECR_IP_TTL,\n \tEFX_MAE_ACTION_VLAN_PUSH,\n \tEFX_MAE_ACTION_COUNT,\n \tEFX_MAE_ACTION_ENCAP,\n@@ -1793,6 +1794,13 @@ struct efx_mae_actions_s {\n \t * to make sure that resource IDs are not compared.\n \t */\n \tefx_mae_actions_rsrc_t\t\tema_rsrc;\n+\n+\t/*\n+\t * A copy of encp->enc_mae_aset_v2_supported.\n+\t * It is set by efx_mae_action_set_spec_init().\n+\t * This value is ignored on spec comparisons.\n+\t */\n+\tboolean_t\t\t\tema_v2_is_supported;\n };\n \n #endif /* EFSYS_OPT_MAE */\ndiff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c\nindex 41444e1926..756c35788e 100644\n--- a/drivers/common/sfc_efx/base/efx_mae.c\n+++ b/drivers/common/sfc_efx/base/efx_mae.c\n@@ -1376,6 +1376,7 @@ efx_mae_action_set_spec_init(\n \t__in\t\t\t\tefx_nic_t *enp,\n \t__out\t\t\t\tefx_mae_actions_t **specp)\n {\n+\tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(enp);\n \tefx_mae_actions_t *spec;\n \tefx_rc_t rc;\n \n@@ -1388,6 +1389,12 @@ efx_mae_action_set_spec_init(\n \tspec->ema_rsrc.emar_eh_id.id = EFX_MAE_RSRC_ID_INVALID;\n \tspec->ema_rsrc.emar_counter_id.id = EFX_MAE_RSRC_ID_INVALID;\n \n+\t/*\n+\t * Helpers which populate v2 actions must reject them when v2 is not\n+\t * supported. As they have no EFX NIC argument, save v2 status here.\n+\t */\n+\tspec->ema_v2_is_supported = encp->enc_mae_aset_v2_supported;\n+\n \t*specp = spec;\n \n \treturn (0);\n@@ -1626,6 +1633,9 @@ static const efx_mae_action_desc_t efx_mae_actions[EFX_MAE_NACTIONS] = {\n \t[EFX_MAE_ACTION_VLAN_POP] = {\n \t\t.emad_add = efx_mae_action_set_add_vlan_pop\n \t},\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_VLAN_PUSH] = {\n \t\t.emad_add = efx_mae_action_set_add_vlan_push\n \t},\n@@ -1649,6 +1659,7 @@ static const efx_mae_action_desc_t efx_mae_actions[EFX_MAE_NACTIONS] = {\n static const uint32_t efx_mae_action_ordered_map =\n \t(1U << EFX_MAE_ACTION_DECAP) |\n \t(1U << EFX_MAE_ACTION_VLAN_POP) |\n+\t(1U << EFX_MAE_ACTION_DECR_IP_TTL) |\n \t(1U << EFX_MAE_ACTION_VLAN_PUSH) |\n \t/*\n \t * HW will conduct action COUNT after\n@@ -1767,6 +1778,25 @@ efx_mae_action_set_populate_vlan_pop(\n \t    EFX_MAE_ACTION_VLAN_POP, 0, NULL));\n }\n \n+\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+\tefx_rc_t rc;\n+\n+\tif (spec->ema_v2_is_supported == B_FALSE) {\n+\t\trc = ENOTSUP;\n+\t\tgoto fail1;\n+\t}\n+\n+\treturn (efx_mae_action_set_spec_populate(spec,\n+\t    EFX_MAE_ACTION_DECR_IP_TTL, 0, NULL));\n+\n+fail1:\n+\tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n+\treturn (rc);\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@@ -2542,6 +2572,11 @@ efx_mae_action_set_alloc(\n \tMCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,\n \t    MAE_ACTION_SET_ALLOC_IN_VLAN_POP, spec->ema_n_vlan_tags_to_pop);\n \n+\tif ((spec->ema_actions & (1U << EFX_MAE_ACTION_DECR_IP_TTL)) != 0) {\n+\t\tMCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,\n+\t\t    MAE_ACTION_SET_ALLOC_IN_DO_DECR_IP_TTL, 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 ec862200ab..765ca39332 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -95,6 +95,7 @@ INTERNAL {\n \tefx_mae_action_set_get_nb_count;\n \tefx_mae_action_set_populate_count;\n \tefx_mae_action_set_populate_decap;\n+\tefx_mae_action_set_populate_decr_ip_ttl;\n \tefx_mae_action_set_populate_deliver;\n \tefx_mae_action_set_populate_drop;\n \tefx_mae_action_set_populate_encap;\n",
    "prefixes": [
        "4/5"
    ]
}