get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100949,
    "url": "http://patches.dpdk.org/api/patches/100949/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211010143930.4985-13-ivan.malov@oktetlabs.ru/",
    "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": "<20211010143930.4985-13-ivan.malov@oktetlabs.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211010143930.4985-13-ivan.malov@oktetlabs.ru",
    "date": "2021-10-10T14:39:30",
    "name": "[v3,12/12] net/sfc: support port representor flow item",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dd6baf1bfc104dcc54ee89678334814f6a10326f",
    "submitter": {
        "id": 869,
        "url": "http://patches.dpdk.org/api/people/869/?format=api",
        "name": "Ivan Malov",
        "email": "Ivan.Malov@oktetlabs.ru"
    },
    "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/20211010143930.4985-13-ivan.malov@oktetlabs.ru/mbox/",
    "series": [
        {
            "id": 19490,
            "url": "http://patches.dpdk.org/api/series/19490/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19490",
            "date": "2021-10-10T14:39:18",
            "name": "ethdev: rework transfer flow API",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/19490/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/100949/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/100949/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 7A81CA0C43;\n\tSun, 10 Oct 2021 16:41:14 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 122C741152;\n\tSun, 10 Oct 2021 16:40:22 +0200 (CEST)",
            "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id 26EBF410E1\n for <dev@dpdk.org>; Sun, 10 Oct 2021 16:40:02 +0200 (CEST)",
            "from localhost.localdomain (unknown [5.144.123.197])\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 ESMTPSA id EC8D87F6DF;\n Sun, 10 Oct 2021 17:40:01 +0300 (MSK)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru EC8D87F6DF",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1633876802;\n bh=1lLta6zQBfHCT+WDgb9+6yhx+W8O8aztOUqe3SjcIpM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=qKU2xnW5C4Z+eckmJooDtIAHQnULWKHysLU/0MWIBN/4XsSv8XZbeirWaNCOkk16o\n BlhAz4skwA1f1AAWR4WllfqLC1u72vJVm6gVAsLLdxS3/DxQulUdf+Bm3CNnD0gBSS\n pAv+sX4RVxGp7OC/tyYfJsuU2EXdmj/CEYYAT1nE=",
        "From": "Ivan Malov <ivan.malov@oktetlabs.ru>",
        "To": "dev@dpdk.org",
        "Cc": "Thomas Monjalon <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Date": "Sun, 10 Oct 2021 17:39:30 +0300",
        "Message-Id": "<20211010143930.4985-13-ivan.malov@oktetlabs.ru>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20211010143930.4985-1-ivan.malov@oktetlabs.ru>",
        "References": "<20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru>\n <20211010143930.4985-1-ivan.malov@oktetlabs.ru>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 12/12] net/sfc: support port representor flow\n item",
        "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": "From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n\nAdd support for item PORT_REPRESENTOR which should\nbe used instead of ambiguous item PORT_ID.\n\nSigned-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n doc/guides/nics/sfc_efx.rst |  2 ++\n drivers/net/sfc/sfc_mae.c   | 72 +++++++++++++++++++++++++++++++++++++\n 2 files changed, 74 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst\nindex 163bc2533f..9a9710325f 100644\n--- a/doc/guides/nics/sfc_efx.rst\n+++ b/doc/guides/nics/sfc_efx.rst\n@@ -190,6 +190,8 @@ Supported actions (***non-transfer*** rules):\n \n Supported pattern items (***transfer*** rules):\n \n+- PORT_REPRESENTOR (cannot repeat; conflicts with other traffic source items)\n+\n - PORT_ID (cannot repeat; conflicts with other traffic source items)\n \n - PHY_PORT (cannot repeat; conflicts with other traffic source items)\ndiff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c\nindex 4b520bc619..392f6ec098 100644\n--- a/drivers/net/sfc/sfc_mae.c\n+++ b/drivers/net/sfc/sfc_mae.c\n@@ -1100,6 +1100,66 @@ sfc_mae_rule_parse_item_port_id(const struct rte_flow_item *item,\n \treturn 0;\n }\n \n+static int\n+sfc_mae_rule_parse_item_port_representor(const struct rte_flow_item *item,\n+\t\t\t\t\t struct sfc_flow_parse_ctx *ctx,\n+\t\t\t\t\t struct rte_flow_error *error)\n+{\n+\tstruct sfc_mae_parse_ctx *ctx_mae = ctx->mae;\n+\tconst struct rte_flow_item_ethdev supp_mask = {\n+\t\t.port_id = 0xffff,\n+\t};\n+\tconst void *def_mask = &rte_flow_item_ethdev_mask;\n+\tconst struct rte_flow_item_ethdev *spec = NULL;\n+\tconst struct rte_flow_item_ethdev *mask = NULL;\n+\tefx_mport_sel_t mport_sel;\n+\tint rc;\n+\n+\tif (ctx_mae->match_mport_set) {\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\t\"Can't handle multiple traffic source items\");\n+\t}\n+\n+\trc = sfc_flow_parse_init(item,\n+\t\t\t\t (const void **)&spec, (const void **)&mask,\n+\t\t\t\t (const void *)&supp_mask, def_mask,\n+\t\t\t\t sizeof(struct rte_flow_item_ethdev), error);\n+\tif (rc != 0)\n+\t\treturn rc;\n+\n+\tif (mask->port_id != supp_mask.port_id) {\n+\t\treturn rte_flow_error_set(error, EINVAL,\n+\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\t\"Bad mask in the PORT_REPRESENTOR pattern item\");\n+\t}\n+\n+\t/* If \"spec\" is not set, could be any port ID */\n+\tif (spec == NULL)\n+\t\treturn 0;\n+\n+\trc = sfc_mae_switch_port_by_ethdev(\n+\t\t\tctx_mae->sa->mae.switch_domain_id,\n+\t\t\tspec->port_id, &mport_sel);\n+\tif (rc != 0) {\n+\t\treturn rte_flow_error_set(error, rc,\n+\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\t\"Can't find RTE ethdev by the port ID\");\n+\t}\n+\n+\trc = efx_mae_match_spec_mport_set(ctx_mae->match_spec,\n+\t\t\t\t\t  &mport_sel, NULL);\n+\tif (rc != 0) {\n+\t\treturn rte_flow_error_set(error, rc,\n+\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\t\"Failed to set MPORT for the port ID\");\n+\t}\n+\n+\tctx_mae->match_mport_set = B_TRUE;\n+\n+\treturn 0;\n+}\n+\n static int\n sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item,\n \t\t\t\t struct sfc_flow_parse_ctx *ctx,\n@@ -1995,6 +2055,18 @@ static const struct sfc_flow_item sfc_flow_items[] = {\n \t\t.ctx_type = SFC_FLOW_PARSE_CTX_MAE,\n \t\t.parse = sfc_mae_rule_parse_item_port_id,\n \t},\n+\t{\n+\t\t.type = RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR,\n+\t\t.name = \"PORT_REPRESENTOR\",\n+\t\t/*\n+\t\t * In terms of RTE flow, this item is a META one,\n+\t\t * and its position in the pattern is don't care.\n+\t\t */\n+\t\t.prev_layer = SFC_FLOW_ITEM_ANY_LAYER,\n+\t\t.layer = SFC_FLOW_ITEM_ANY_LAYER,\n+\t\t.ctx_type = SFC_FLOW_PARSE_CTX_MAE,\n+\t\t.parse = sfc_mae_rule_parse_item_port_representor,\n+\t},\n \t{\n \t\t.type = RTE_FLOW_ITEM_TYPE_PHY_PORT,\n \t\t.name = \"PHY_PORT\",\n",
    "prefixes": [
        "v3",
        "12/12"
    ]
}