get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77009,
    "url": "http://patches.dpdk.org/api/patches/77009/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1599634114-148013-13-git-send-email-jiaweiw@nvidia.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": "<1599634114-148013-13-git-send-email-jiaweiw@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1599634114-148013-13-git-send-email-jiaweiw@nvidia.com",
    "date": "2020-09-09T06:48:34",
    "name": "[v6,12/12] net/mlx5: support the native port id actions for mirroring",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a299066f17f9980c5e58a62d3021aed3d655fcc0",
    "submitter": {
        "id": 1939,
        "url": "http://patches.dpdk.org/api/people/1939/?format=api",
        "name": "Jiawei Wang",
        "email": "jiaweiw@nvidia.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/1599634114-148013-13-git-send-email-jiaweiw@nvidia.com/mbox/",
    "series": [
        {
            "id": 12045,
            "url": "http://patches.dpdk.org/api/series/12045/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12045",
            "date": "2020-09-09T06:48:29",
            "name": "support the flow-based traffic sampling",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/12045/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77009/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/77009/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 97FCEA04B1;\n\tWed,  9 Sep 2020 08:50:24 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5B2FF1C197;\n\tWed,  9 Sep 2020 08:48:51 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id A6ACC1C0CE\n for <dev@dpdk.org>; Wed,  9 Sep 2020 08:48:36 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n jiaweiw@nvidia.com) with SMTP; 9 Sep 2020 09:48:34 +0300",
            "from nvidia.com (gen-l-vrt-280.mtl.labs.mlnx [10.237.45.1])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0896mYG7029471;\n Wed, 9 Sep 2020 09:48:34 +0300"
        ],
        "From": "Jiawei Wang <jiaweiw@nvidia.com>",
        "To": "orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com,\n thomas@monjalon.net, ferruh.yigit@intel.com, marko.kovacevic@intel.com,\n arybchenko@solarflare.com",
        "Cc": "dev@dpdk.org, rasland@nvidia.com, ian.stokes@intel.com, fbl@redhat.com,\n asafp@nvidia.com",
        "Date": "Wed,  9 Sep 2020 09:48:34 +0300",
        "Message-Id": "<1599634114-148013-13-git-send-email-jiaweiw@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1599634114-148013-1-git-send-email-jiaweiw@nvidia.com>",
        "References": "<1598540492-406340-1-git-send-email-jiaweiw@nvidia.com>\n <1599634114-148013-1-git-send-email-jiaweiw@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v6 12/12] net/mlx5: support the native port id\n\tactions for mirroring",
        "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": "This patch to support the mirroring with native port id action\neven without the sample action in the flow.\nThe flow would be like:\n\tflow create 0 ingress transfer pattern eth / end actions\n\t\t\tport_id id 1 / port_id id 2 / end\nIngress packet match from uplink, send to VF1 but also mirror to VF2.\n\nWhile PMD parse a e-switch rule and found the multiple port actions,\nthen will create a new multiple destination DR action and add it\ninto the flow instead of two port id action.\n\nSigned-off-by: Jiawei Wang <jiaweiw@nvidia.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 25 +++++++++++++++++++++++--\n 1 file changed, 23 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex cf85780..8c195d4 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -3738,7 +3738,8 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t  \"port id action parameters must be\"\n \t\t\t\t\t  \" specified\");\n \tif (action_flags & (MLX5_FLOW_FATE_ACTIONS |\n-\t\t\t    MLX5_FLOW_FATE_ESWITCH_ACTIONS))\n+\t\t\t    (MLX5_FLOW_FATE_ESWITCH_ACTIONS &\n+\t\t\t     ~MLX5_FLOW_ACTION_PORT_ID)))\n \t\treturn rte_flow_error_set(error, EINVAL,\n \t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ACTION, NULL,\n \t\t\t\t\t  \"can have only one fate actions in\"\n@@ -9007,6 +9008,7 @@ struct field_modify_info modify_tcp[] = {\n \tstruct mlx5_flow_dv_sample_resource sample_res;\n \tvoid *sample_actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS] = {0};\n \tstruct mlx5_flow_sub_actions_list *sample_act;\n+\tstruct mlx5_flow_sub_actions_list *mirror_act;\n \tuint32_t sample_act_pos = UINT32_MAX;\n \tuint32_t num_of_dest = 0;\n \tint tmp_actions_n = 0;\n@@ -9056,7 +9058,21 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t\t\t     &port_id, error))\n \t\t\t\treturn -rte_errno;\n \t\t\tport_id_resource.port_id = port_id;\n-\t\t\tMLX5_ASSERT(!handle->rix_port_id_action);\n+\t\t\tif (handle->rix_port_id_action) {\n+\t\t\t\t// update for native mirror port id action\n+\t\t\t\tstruct mlx5_flow_sub_actions_idx *mirror_idx =\n+\t\t\t\t\t&sample_res.sample_idx;\n+\t\t\t\tmirror_act = &sample_res.sample_act;\n+\t\t\t\tmirror_act->dr_port_id_action =\n+\t\t\t\t\tdev_flow->dv.port_id_action->action;\n+\t\t\t\tmirror_idx->rix_port_id_action =\n+\t\t\t\t\tdev_flow->handle->rix_port_id_action;\n+\t\t\t\tsample_actions[mirror_act->actions_num++] =\n+\t\t\t\t\t\tmirror_act->dr_port_id_action;\n+\t\t\t\tmirror_act->action_flags |=\n+\t\t\t\t\t\tMLX5_FLOW_ACTION_PORT_ID;\n+\t\t\t\taction_flags |= MLX5_FLOW_ACTION_SAMPLE;\n+\t\t\t}\n \t\t\tif (flow_dv_port_id_action_resource_register\n \t\t\t    (dev, &port_id_resource, dev_flow, error))\n \t\t\t\treturn -rte_errno;\n@@ -9523,6 +9539,8 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION,\n \t\t\t\t\t\tNULL,\n \t\t\t\t\t\t\"cannot create sample action\");\n+\t\t\t\tif (sample_act_pos == UINT32_MAX)\n+\t\t\t\t\tsample_act_pos = actions_n++;\n \t\t\t\tif (num_of_dest > 1) {\n \t\t\t\t\tdev_flow->dv.actions[sample_act_pos] =\n \t\t\t\t\tdev_flow->dv.multi_dest_res->action;\n@@ -9555,6 +9573,9 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\tdev_flow->dv.actions[i]) ||\n \t\t\t\t(sample_act->dr_port_id_action &&\n \t\t\t\tsample_act->dr_port_id_action ==\n+\t\t\t\tdev_flow->dv.actions[i]) ||\n+\t\t\t\t(mirror_act->dr_port_id_action &&\n+\t\t\t\tmirror_act->dr_port_id_action ==\n \t\t\t\tdev_flow->dv.actions[i]))\n \t\t\t\tcontinue;\n \t\t\ttemp_actions[tmp_actions_n++] = dev_flow->dv.actions[i];\n",
    "prefixes": [
        "v6",
        "12/12"
    ]
}