get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 46415,
    "url": "http://patches.dpdk.org/api/patches/46415/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1539113137-4914-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": "<1539113137-4914-2-git-send-email-dekelp@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1539113137-4914-2-git-send-email-dekelp@mellanox.com",
    "date": "2018-10-09T19:25:34",
    "name": "[v3,1/4] net/mlx5: add flow action functions to glue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "59ef5d803d2f1d078c676d6f2d2e1b5d69806411",
    "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/1539113137-4914-2-git-send-email-dekelp@mellanox.com/mbox/",
    "series": [
        {
            "id": 1739,
            "url": "http://patches.dpdk.org/api/series/1739/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1739",
            "date": "2018-10-07T14:25:04",
            "name": "add support of Direct Verbs encap and decap actions",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1739/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/46415/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/46415/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 766361B51D;\n\tTue,  9 Oct 2018 22:08:46 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id DF1811B1D9\n\tfor <dev@dpdk.org>; Tue,  9 Oct 2018 22:08:42 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tdekelp@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 9 Oct 2018 21:30:37 +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 w99JPkpA019407;\n\tTue, 9 Oct 2018 22:25:48 +0300"
        ],
        "From": "Dekel Peled <dekelp@mellanox.com>",
        "To": "yskoh@mellanox.com, shahafs@mellanox.com",
        "Cc": "dev@dpdk.org, orika@mellanox.com",
        "Date": "Tue,  9 Oct 2018 22:25:34 +0300",
        "Message-Id": "<1539113137-4914-2-git-send-email-dekelp@mellanox.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "In-Reply-To": "<1538922308-9516-1-git-send-email-dekelp@mellanox.com>",
        "References": "<1538922308-9516-1-git-send-email-dekelp@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/4] net/mlx5: add flow action functions to\n\tglue",
        "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\nThe new operations depend on HAVE_IBV_FLOW_ACTION_DV_SUPPORT.\n\nSigned-off-by: Dekel Peled <dekelp@mellanox.com>\n---\n drivers/net/mlx5/Makefile    |  5 +++++\n drivers/net/mlx5/meson.build |  2 ++\n drivers/net/mlx5/mlx5_glue.c | 38 ++++++++++++++++++++++++++++++++++++++\n drivers/net/mlx5/mlx5_glue.h | 13 +++++++++++++\n 4 files changed, 58 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile\nindex 92bae9d..474ad42 100644\n--- a/drivers/net/mlx5/Makefile\n+++ b/drivers/net/mlx5/Makefile\n@@ -142,6 +142,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh\n \t\tenum MLX5DV_FLOW_ACTION_TAG \\\n \t\t$(AUTOCONF_OUTPUT)\n \t$Q sh -- '$<' '$@' \\\n+\t\tHAVE_IBV_FLOW_ACTION_DV_SUPPORT \\\n+\t\tinfiniband/mlx5dv.h \\\n+\t\tfunc mlx5dv_create_flow_action_packet_reformat \\\n+\t\t$(AUTOCONF_OUTPUT)\n+\t$Q sh -- '$<' '$@' \\\n \t\tHAVE_ETHTOOL_LINK_MODE_25G \\\n \t\t/usr/include/linux/ethtool.h \\\n \t\tenum ETHTOOL_LINK_MODE_25000baseCR_Full_BIT \\\ndiff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build\nindex 6966248..d555c3c 100644\n--- a/drivers/net/mlx5/meson.build\n+++ b/drivers/net/mlx5/meson.build\n@@ -96,6 +96,8 @@ if build\n \t\t'MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP' ],\n \t\t[ 'HAVE_IBV_FLOW_DV_SUPPORT', 'infiniband/mlx5dv.h',\n \t\t'MLX5DV_FLOW_ACTION_TAG' ],\n+\t\t[ 'HAVE_IBV_FLOW_ACTION_DV_SUPPORT', 'infiniband/mlx5dv.h',\n+\t\t'mlx5dv_create_flow_action_packet_reformat' ],\n \t\t[ 'HAVE_IBV_DEVICE_MPLS_SUPPORT', 'infiniband/verbs.h',\n \t\t'IBV_FLOW_SPEC_MPLS' ],\n \t\t[ 'HAVE_IBV_WQ_FLAG_RX_END_PADDING', 'infiniband/verbs.h',\ndiff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c\nindex 48590df..63fbab1 100644\n--- a/drivers/net/mlx5/mlx5_glue.c\n+++ b/drivers/net/mlx5/mlx5_glue.c\n@@ -174,6 +174,17 @@\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+#ifdef HAVE_IBV_FLOW_ACTION_DV_SUPPORT\n+\treturn ibv_destroy_flow_action(action);\n+#else\n+\t(void)action;\n+\treturn NULL;\n+#endif\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 +399,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_ACTION_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 +449,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 +473,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..071a650 100644\n--- a/drivers/net/mlx5/mlx5_glue.h\n+++ b/drivers/net/mlx5/mlx5_glue.h\n@@ -46,6 +46,12 @@\n struct mlx5dv_flow_match_parameters;\n #endif\n \n+#ifndef HAVE_IBV_FLOW_ACTION_DV_SUPPORT\n+struct ibv_flow_action;\n+enum mlx5dv_flow_action_packet_reformat_type { type = 0, };\n+enum mlx5dv_flow_table_type { type = 0, };\n+#endif\n+\n /* LIB_GLUE_VERSION must be updated every time this structure is modified. */\n struct mlx5_glue {\n \tconst char *version;\n@@ -85,6 +91,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 +144,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": [
        "v3",
        "1/4"
    ]
}