get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45537,
    "url": "http://patches.dpdk.org/api/patches/45537/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1538059845-35896-2-git-send-email-dekelp@mellanox.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": "<1538059845-35896-2-git-send-email-dekelp@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1538059845-35896-2-git-send-email-dekelp@mellanox.com",
    "date": "2018-09-27T14:50:42",
    "name": "[1/4] net/mlx5: add flow action functions to glue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1b9fcb50980ea5300ac7aceede077f4bae7d8da2",
    "submitter": {
        "id": 1082,
        "url": "http://patches.dpdk.org/api/people/1082/?format=api",
        "name": "Dekel Peled",
        "email": "dekelp@mellanox.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1538059845-35896-2-git-send-email-dekelp@mellanox.com/mbox/",
    "series": [
        {
            "id": 1555,
            "url": "http://patches.dpdk.org/api/series/1555/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1555",
            "date": "2018-09-27T14:50:41",
            "name": "support DV encap and decap actions",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1555/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45537/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45537/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9367C1B4FF;\n\tThu, 27 Sep 2018 16:52:28 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 8A06C1B4DC\n\tfor <dev@dpdk.org>; Thu, 27 Sep 2018 16:52:15 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tdekelp@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 27 Sep 2018 16:56:45 +0200",
            "from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx\n\t[10.128.130.87])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w8REq7gJ013802;\n\tThu, 27 Sep 2018 17:52:09 +0300"
        ],
        "From": "Dekel Peled <dekelp@mellanox.com>",
        "To": "dev@dpdk.org, shahafs@mellanox.com, yskoh@mellanox.com",
        "Cc": "orika@mellanox.com",
        "Date": "Thu, 27 Sep 2018 17:50:42 +0300",
        "Message-Id": "<1538059845-35896-2-git-send-email-dekelp@mellanox.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "In-Reply-To": "<1538059845-35896-1-git-send-email-dekelp@mellanox.com>",
        "References": "<1538059845-35896-1-git-send-email-dekelp@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 1/4] net/mlx5: add flow action functions to glue",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch adds glue functions for operations:\n- Create packet reformat (encap/decap) flow action.\n- Destroy flow action.\n\nSigned-off-by: Dekel Peled <dekelp@mellanox.com>\n---\n drivers/net/mlx5/mlx5_glue.c | 33 +++++++++++++++++++++++++++++++++\n drivers/net/mlx5/mlx5_glue.h |  7 +++++++\n 2 files changed, 40 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c\nindex 48590df..caa4c34 100644\n--- a/drivers/net/mlx5/mlx5_glue.c\n+++ b/drivers/net/mlx5/mlx5_glue.c\n@@ -174,6 +174,12 @@\n \treturn ibv_destroy_flow(flow_id);\n }\n \n+static int\n+mlx5_glue_destroy_flow_action(struct ibv_flow_action *action)\n+{\n+\treturn ibv_destroy_flow_action(action);\n+}\n+\n static struct ibv_qp *\n mlx5_glue_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr)\n {\n@@ -388,6 +394,30 @@\n #endif\n }\n \n+static struct ibv_flow_action *\n+mlx5_glue_dv_create_flow_action_packet_reformat\n+\t\t(struct ibv_context *ctx,\n+\t\t size_t data_sz,\n+\t\t void *data,\n+\t\t enum mlx5dv_flow_action_packet_reformat_type reformat_type,\n+\t\t enum mlx5dv_flow_table_type ft_type)\n+{\n+#ifdef HAVE_IBV_FLOW_DV_SUPPORT\n+\treturn mlx5dv_create_flow_action_packet_reformat(ctx,\n+\t\t\t\t\t\t\t data_sz,\n+\t\t\t\t\t\t\t data,\n+\t\t\t\t\t\t\t reformat_type,\n+\t\t\t\t\t\t\t ft_type);\n+#else\n+\t(void)ctx;\n+\t(void)data_sz;\n+\t(void)data;\n+\t(void)reformat_type;\n+\t(void)ft_type;\n+\treturn NULL;\n+#endif\n+}\n+\n alignas(RTE_CACHE_LINE_SIZE)\n const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){\n \t.version = MLX5_GLUE_VERSION,\n@@ -414,6 +444,7 @@\n \t.modify_wq = mlx5_glue_modify_wq,\n \t.create_flow = mlx5_glue_create_flow,\n \t.destroy_flow = mlx5_glue_destroy_flow,\n+\t.destroy_flow_action = mlx5_glue_destroy_flow_action,\n \t.create_qp = mlx5_glue_create_qp,\n \t.create_qp_ex = mlx5_glue_create_qp_ex,\n \t.destroy_qp = mlx5_glue_destroy_qp,\n@@ -437,4 +468,6 @@\n \t.dv_create_flow_matcher = mlx5_glue_dv_create_flow_matcher,\n \t.dv_destroy_flow_matcher = mlx5_glue_dv_destroy_flow_matcher,\n \t.dv_create_flow = mlx5_glue_dv_create_flow,\n+\t.dv_create_flow_action_packet_reformat =\n+\t\t\tmlx5_glue_dv_create_flow_action_packet_reformat,\n };\ndiff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h\nindex f6e4e38..7431f58 100644\n--- a/drivers/net/mlx5/mlx5_glue.h\n+++ b/drivers/net/mlx5/mlx5_glue.h\n@@ -85,6 +85,7 @@ struct mlx5_glue {\n \tstruct ibv_flow *(*create_flow)(struct ibv_qp *qp,\n \t\t\t\t\tstruct ibv_flow_attr *flow);\n \tint (*destroy_flow)(struct ibv_flow *flow_id);\n+\tint (*destroy_flow_action)(struct ibv_flow_action *action);\n \tstruct ibv_qp *(*create_qp)(struct ibv_pd *pd,\n \t\t\t\t    struct ibv_qp_init_attr *qp_init_attr);\n \tstruct ibv_qp *(*create_qp_ex)\n@@ -137,6 +138,12 @@ struct mlx5_glue {\n \t\t\t  struct mlx5dv_flow_match_parameters *match_value,\n \t\t\t  size_t num_actions,\n \t\t\t  struct mlx5dv_flow_action_attr *actions_attr);\n+\tstruct ibv_flow_action *(*dv_create_flow_action_packet_reformat)\n+\t\t(struct ibv_context *ctx,\n+\t\t size_t data_sz,\n+\t\t void *data,\n+\t\t enum mlx5dv_flow_action_packet_reformat_type reformat_type,\n+\t\t enum mlx5dv_flow_table_type ft_type);\n };\n \n const struct mlx5_glue *mlx5_glue;\n",
    "prefixes": [
        "1/4"
    ]
}