get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81547,
    "url": "http://patches.dpdk.org/api/patches/81547/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1603185222-14831-33-git-send-email-arybchenko@solarflare.com/",
    "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": "<1603185222-14831-33-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1603185222-14831-33-git-send-email-arybchenko@solarflare.com",
    "date": "2020-10-20T09:13:12",
    "name": "[v2,32/62] common/sfc_efx/base: support adding MARK action to a set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4bedd9d668b2d7e23210bb6e4e4d0331c4cb493f",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "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/1603185222-14831-33-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 13137,
            "url": "http://patches.dpdk.org/api/series/13137/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13137",
            "date": "2020-10-20T09:12:44",
            "name": "net/sfc: support flow API transfer rules",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/13137/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/81547/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/81547/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BC9F2A04DD;\n\tTue, 20 Oct 2020 11:33:20 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6A5BAFC60;\n\tTue, 20 Oct 2020 11:15:35 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id EE925C838\n for <dev@dpdk.org>; Tue, 20 Oct 2020 11:14:14 +0200 (CEST)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.65.60])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n 6C4866007F for <dev@dpdk.org>; Tue, 20 Oct 2020 09:14:13 +0000 (UTC)",
            "from us4-mdac16-49.ut7.mdlocal (unknown [10.7.66.16])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 6C9662009A\n for <dev@dpdk.org>; Tue, 20 Oct 2020 09:14:13 +0000 (UTC)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.66.34])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n E9D221C0053\n for <dev@dpdk.org>; Tue, 20 Oct 2020 09:14:12 +0000 (UTC)",
            "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 9F30060005B\n for <dev@dpdk.org>; Tue, 20 Oct 2020 09:14:12 +0000 (UTC)",
            "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Tue, 20 Oct 2020 10:14:00 +0100",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Tue, 20 Oct 2020 10:14:00 +0100",
            "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09K9E0A5028435;\n Tue, 20 Oct 2020 10:14:00 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 8B8B91613A9;\n Tue, 20 Oct 2020 10:14:00 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Ivan Malov <ivan.malov@oktetlabs.ru>",
        "Date": "Tue, 20 Oct 2020 10:13:12 +0100",
        "Message-ID": "<1603185222-14831-33-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1603185222-14831-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1603183709-23420-1-git-send-email-arybchenko@solarflare.com>\n <1603185222-14831-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25736.003",
        "X-TM-AS-Result": "No-2.082000-8.000000-10",
        "X-TMASE-MatchedRID": "pX1c04mAgVEZ7Z5t6RByKcbr3d9/yP1kaeMaKzvXUpljLp8Cm8vwF12O\n RX0B8+qTT1fsjZmF+qzm9S/0eIQUb+ox2xGkyLxhPwKTD1v8YV5SDnPEI8clbdjMMV3eZDNhrWm\n yq7PauHmer62Ni/rU6K1TSd3U5mjSWELDcKwGO24Pe5gzF3TVt1xo0H+7nJCrijbNm22YqDBnj1\n T6aiJbiTxOxTEbgyTygDLqnrRlXrZ8nn9tnqel2MZW5ai5WKlyLI9Rj5e/2rM7mylLNWg91tRwX\n o/6srg5M3VnBiT32oTeccuulHjnOrASsnG6FVMG3uJICNR8ChGK5URknflp4R5N9Xn7Fnyp8Oyc\n cFNBL2TKhETi2//sjuP9Cb59K8ACZrS+A8PszW/U9h9N881NSQ==",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--2.082000-8.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25736.003",
        "X-MDID": "1603185253-Wx-ZYMMHx0O4",
        "X-PPE-DISP": "1603185253;Wx-ZYMMHx0O4",
        "Subject": "[dpdk-dev] [PATCH v2 32/62] common/sfc_efx/base: support adding\n\tMARK action to a set",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "From: Ivan Malov <ivan.malov@oktetlabs.ru>\n\nThis action can be added at any point before DELIVER.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/efx.h             |  6 ++\n drivers/common/sfc_efx/base/efx_impl.h        |  2 +\n drivers/common/sfc_efx/base/efx_mae.c         | 58 ++++++++++++++++++-\n .../sfc_efx/rte_common_sfc_efx_version.map    |  1 +\n 4 files changed, 65 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex e03da22c3b..1d2987653b 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -4183,6 +4183,12 @@ extern\t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_populate_flag(\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_mark(\n+\t__in\t\t\t\tefx_mae_actions_t *spec,\n+\t__in\t\t\t\tuint32_t mark_value);\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_impl.h b/drivers/common/sfc_efx/base/efx_impl.h\nindex bffd4c6ce8..db68cc7b24 100644\n--- a/drivers/common/sfc_efx/base/efx_impl.h\n+++ b/drivers/common/sfc_efx/base/efx_impl.h\n@@ -1711,6 +1711,7 @@ typedef enum efx_mae_action_e {\n \t * in the end of the enumeration (before DELIVER).\n \t */\n \tEFX_MAE_ACTION_FLAG,\n+\tEFX_MAE_ACTION_MARK,\n \n \t/* DELIVER is always the last action. */\n \tEFX_MAE_ACTION_DELIVER,\n@@ -1737,6 +1738,7 @@ typedef struct efx_mae_actions_s {\n \tunsigned int\t\t\temass_n_vlan_tags_to_push;\n \tefx_mae_action_vlan_push_t\temass_vlan_push_descs[\n \t    EFX_MAE_VLAN_PUSH_MAX_NTAGS];\n+\tuint32_t\t\t\temass_mark_value;\n \tefx_mport_sel_t\t\t\temass_deliver_mport;\n } efx_mae_actions_t;\n \ndiff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c\nindex 93fd02f6d2..880336a7d9 100644\n--- a/drivers/common/sfc_efx/base/efx_mae.c\n+++ b/drivers/common/sfc_efx/base/efx_mae.c\n@@ -746,6 +746,35 @@ efx_mae_action_set_add_flag(\n \treturn (rc);\n }\n \n+static\t__checkReturn\t\t\tefx_rc_t\n+efx_mae_action_set_add_mark(\n+\t__in\t\t\t\tefx_mae_actions_t *spec,\n+\t__in\t\t\t\tsize_t arg_size,\n+\t__in_bcount(arg_size)\t\tconst uint8_t *arg)\n+{\n+\tefx_rc_t rc;\n+\n+\tif (arg_size != sizeof (spec->emass_mark_value)) {\n+\t\trc = EINVAL;\n+\t\tgoto fail1;\n+\t}\n+\n+\tif (arg == NULL) {\n+\t\trc = EINVAL;\n+\t\tgoto fail2;\n+\t}\n+\n+\tmemcpy(&spec->emass_mark_value, arg, arg_size);\n+\n+\treturn (0);\n+\n+fail2:\n+\tEFSYS_PROBE(fail2);\n+fail1:\n+\tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n+\treturn (rc);\n+}\n+\n static\t__checkReturn\t\t\tefx_rc_t\n efx_mae_action_set_add_deliver(\n \t__in\t\t\t\tefx_mae_actions_t *spec,\n@@ -791,6 +820,9 @@ static const efx_mae_action_desc_t efx_mae_actions[EFX_MAE_NACTIONS] = {\n \t[EFX_MAE_ACTION_FLAG] = {\n \t\t.emad_add = efx_mae_action_set_add_flag\n \t},\n+\t[EFX_MAE_ACTION_MARK] = {\n+\t\t.emad_add = efx_mae_action_set_add_mark\n+\t},\n \t[EFX_MAE_ACTION_DELIVER] = {\n \t\t.emad_add = efx_mae_action_set_add_deliver\n \t}\n@@ -800,6 +832,7 @@ static const uint32_t efx_mae_action_ordered_map =\n \t(1U << EFX_MAE_ACTION_VLAN_POP) |\n \t(1U << EFX_MAE_ACTION_VLAN_PUSH) |\n \t(1U << EFX_MAE_ACTION_FLAG) |\n+\t(1U << EFX_MAE_ACTION_MARK) |\n \t(1U << EFX_MAE_ACTION_DELIVER);\n \n /*\n@@ -808,7 +841,8 @@ static const uint32_t efx_mae_action_ordered_map =\n  * strictly ordered actions.\n  */\n static const uint32_t efx_mae_action_nonstrict_map =\n-\t(1U << EFX_MAE_ACTION_FLAG);\n+\t(1U << EFX_MAE_ACTION_FLAG) |\n+\t(1U << EFX_MAE_ACTION_MARK);\n \n static const uint32_t efx_mae_action_repeat_map =\n \t(1U << EFX_MAE_ACTION_VLAN_POP) |\n@@ -836,7 +870,8 @@ efx_mae_action_set_spec_populate(\n \t    (sizeof (efx_mae_action_repeat_map) * 8));\n \n \tEFX_STATIC_ASSERT(EFX_MAE_ACTION_DELIVER + 1 == EFX_MAE_NACTIONS);\n-\tEFX_STATIC_ASSERT(EFX_MAE_ACTION_FLAG + 1 == EFX_MAE_ACTION_DELIVER);\n+\tEFX_STATIC_ASSERT(EFX_MAE_ACTION_FLAG + 1 == EFX_MAE_ACTION_MARK);\n+\tEFX_STATIC_ASSERT(EFX_MAE_ACTION_MARK + 1 == EFX_MAE_ACTION_DELIVER);\n \n \tif (type >= EFX_ARRAY_SIZE(efx_mae_actions)) {\n \t\trc = EINVAL;\n@@ -920,6 +955,17 @@ efx_mae_action_set_populate_flag(\n \t    EFX_MAE_ACTION_FLAG, 0, NULL));\n }\n \n+\t__checkReturn\t\t\tefx_rc_t\n+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+\tconst uint8_t *arg = (const uint8_t *)&mark_value;\n+\n+\treturn (efx_mae_action_set_spec_populate(spec,\n+\t    EFX_MAE_ACTION_MARK, sizeof (mark_value), arg));\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,\n@@ -1117,6 +1163,14 @@ efx_mae_action_set_alloc(\n \t\t    MAE_ACTION_SET_ALLOC_IN_FLAG, 1);\n \t}\n \n+\tif ((spec->emass_actions & (1U << EFX_MAE_ACTION_MARK)) != 0) {\n+\t\tMCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,\n+\t\t    MAE_ACTION_SET_ALLOC_IN_MARK, 1);\n+\n+\t\tMCDI_IN_SET_DWORD(req,\n+\t\t    MAE_ACTION_SET_ALLOC_IN_MARK_VALUE, spec->emass_mark_value);\n+\t}\n+\n \tMCDI_IN_SET_DWORD(req,\n \t    MAE_ACTION_SET_ALLOC_IN_DELIVER, spec->emass_deliver_mport.sel);\n \ndiff --git a/drivers/common/sfc_efx/rte_common_sfc_efx_version.map b/drivers/common/sfc_efx/rte_common_sfc_efx_version.map\nindex f57f4a3a8f..6ed412ee39 100644\n--- a/drivers/common/sfc_efx/rte_common_sfc_efx_version.map\n+++ b/drivers/common/sfc_efx/rte_common_sfc_efx_version.map\n@@ -91,6 +91,7 @@ INTERNAL {\n \tefx_mae_action_set_free;\n \tefx_mae_action_set_populate_deliver;\n \tefx_mae_action_set_populate_flag;\n+\tefx_mae_action_set_populate_mark;\n \tefx_mae_action_set_populate_vlan_pop;\n \tefx_mae_action_set_populate_vlan_push;\n \tefx_mae_action_set_spec_fini;\n",
    "prefixes": [
        "v2",
        "32/62"
    ]
}