get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85238,
    "url": "https://patches.dpdk.org/api/patches/85238/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1608123735-3662-5-git-send-email-shirik@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1608123735-3662-5-git-send-email-shirik@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1608123735-3662-5-git-send-email-shirik@nvidia.com",
    "date": "2020-12-16T13:02:11",
    "name": "[RFC,v3,4/8] common/mlx5: create GENEVE TLV option object with DevX",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "07a390047dbc88bc772ad59f706ae3b0e1e5fba0",
    "submitter": {
        "id": 1894,
        "url": "https://patches.dpdk.org/api/people/1894/?format=api",
        "name": "Shiri Kuzin",
        "email": "shirik@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1608123735-3662-5-git-send-email-shirik@nvidia.com/mbox/",
    "series": [
        {
            "id": 14330,
            "url": "https://patches.dpdk.org/api/series/14330/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14330",
            "date": "2020-12-16T13:02:07",
            "name": "ethdev: introduce GENEVE header TLV option item",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/14330/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85238/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85238/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 71EB5A09EF;\n\tWed, 16 Dec 2020 14:03:49 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 785CEC9DE;\n\tWed, 16 Dec 2020 14:02:54 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 1FE69C9CA\n for <dev@dpdk.org>; Wed, 16 Dec 2020 14:02:50 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n shirik@nvidia.com) with SMTP; 16 Dec 2020 15:02:46 +0200",
            "from nvidia.com (nps-server-11.mtl.labs.mlnx [10.7.12.71])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BGD2M1D011463;\n Wed, 16 Dec 2020 15:02:46 +0200"
        ],
        "From": "Shiri Kuzin <shirik@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "viacheslavo@nvidia.com, adrien.mazarguil@6wind.com, rasland@nvidia.com",
        "Date": "Wed, 16 Dec 2020 15:02:11 +0200",
        "Message-Id": "<1608123735-3662-5-git-send-email-shirik@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1608123735-3662-1-git-send-email-shirik@nvidia.com>",
        "References": "<1599118768-13265-1-git-send-email-shirik@nvidia.com>\n <1608123735-3662-1-git-send-email-shirik@nvidia.com>",
        "Subject": "[dpdk-dev] [RFC v3 4/8] common/mlx5: create GENEVE TLV option\n\tobject with DevX",
        "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": "TLV object is a special firmware maintained entity used\nto support match on GENEVE header extension option.\n\nThe TLV object is created with DevX API and accepts\nthe option class, type and lehgth fields.\n\nThe class type and length fields are set using MLX5_SET\nand the Devx object is created using mlx5 glue function.\n\nSigned-off-by: Shiri Kuzin <shirik@nvidia.com>\n---\n drivers/common/mlx5/mlx5_devx_cmds.c | 54 ++++++++++++++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_devx_cmds.h |  5 ++++\n drivers/common/mlx5/version.map      |  1 +\n 3 files changed, 60 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex a6d052d..b5808a9 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -2051,3 +2051,57 @@ struct mlx5_devx_obj *\n \tflow_hit_aso_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);\n \treturn flow_hit_aso_obj;\n }\n+\n+/**\n+ * Create general object of type GENEVE TLV option using DevX API.\n+ *\n+ * @param[in] ctx\n+ *   Context returned from mlx5 open_device() glue function.\n+ * @param [in] class\n+ *   TLV option variable value of class\n+ * @param [in] type\n+ *   TLV option variable value of type\n+ * @param [in] len\n+ *   TLV option variable value of len\n+ *\n+ * @return\n+ *   The DevX object created, NULL otherwise and rte_errno is set.\n+ */\n+struct mlx5_devx_obj *\n+mlx5_devx_cmd_create_geneve_tlv_option(void *ctx,\n+\t\tuint16_t class, uint8_t type, uint8_t len)\n+{\n+\tuint32_t in[MLX5_ST_SZ_DW(create_geneve_tlv_option_in)] = {0};\n+\tuint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};\n+\tstruct mlx5_devx_obj *geneve_tlv_opt_obj = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t\t\t\t\t   sizeof(*geneve_tlv_opt_obj),\n+\t\t\t\t\t\t   0, SOCKET_ID_ANY);\n+\n+\tif (!geneve_tlv_opt_obj) {\n+\t\tDRV_LOG(ERR, \"Failed to allocate geneve tlv option object.\");\n+\t\trte_errno = ENOMEM;\n+\t\treturn NULL;\n+\t}\n+\tvoid *hdr = MLX5_ADDR_OF(create_geneve_tlv_option_in, in, hdr);\n+\tvoid *opt = MLX5_ADDR_OF(create_geneve_tlv_option_in, in,\n+\t\t\tgeneve_tlv_opt);\n+\tMLX5_SET(general_obj_in_cmd_hdr, hdr, opcode,\n+\t\t\tMLX5_CMD_OP_CREATE_GENERAL_OBJECT);\n+\tMLX5_SET(general_obj_in_cmd_hdr, hdr, obj_type,\n+\t\t\tMLX5_OBJ_TYPE_GENEVE_TLV_OPT);\n+\tMLX5_SET(geneve_tlv_option, opt, option_class,\n+\t\t\trte_be_to_cpu_16(class));\n+\tMLX5_SET(geneve_tlv_option, opt, option_type, type);\n+\tMLX5_SET(geneve_tlv_option, opt, option_data_length, len);\n+\tgeneve_tlv_opt_obj->obj = mlx5_glue->devx_obj_create(ctx, in,\n+\t\t\t\t\tsizeof(in), out, sizeof(out));\n+\tif (!geneve_tlv_opt_obj->obj) {\n+\t\trte_errno = errno;\n+\t\tDRV_LOG(ERR, \"Failed to create Geneve tlv option \"\n+\t\t\t\t\"Obj using DevX.\");\n+\t\tmlx5_free(geneve_tlv_opt_obj);\n+\t\treturn NULL;\n+\t}\n+\tgeneve_tlv_opt_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);\n+\treturn geneve_tlv_opt_obj;\n+}\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 58e619f..73c1dfd 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -473,6 +473,11 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_flex_parser(void *ctx,\n int mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id,\n \t\t\t\tuint32_t arg, uint32_t *data, uint32_t dw_cnt);\n \n+__rte_internal\n+struct mlx5_devx_obj *\n+mlx5_devx_cmd_create_geneve_tlv_option(void *ctx,\n+\t\tuint16_t class, uint8_t type, uint8_t len);\n+\n /**\n  * Create virtio queue counters object DevX API.\n  *\ndiff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map\nindex 17dd11f..3c403d2 100644\n--- a/drivers/common/mlx5/version.map\n+++ b/drivers/common/mlx5/version.map\n@@ -22,6 +22,7 @@ INTERNAL {\n \tmlx5_devx_cmd_create_virtio_q_counters;\n \tmlx5_devx_cmd_create_virtq;\n         mlx5_devx_cmd_create_flow_hit_aso_obj;\n+\tmlx5_devx_cmd_create_geneve_tlv_option;\n \tmlx5_devx_cmd_destroy;\n \tmlx5_devx_cmd_flow_counter_alloc;\n \tmlx5_devx_cmd_flow_counter_query;\n",
    "prefixes": [
        "RFC",
        "v3",
        "4/8"
    ]
}