get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86533,
    "url": "http://patches.dpdk.org/api/patches/86533/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210114070743.2377-6-shirik@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": "<20210114070743.2377-6-shirik@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210114070743.2377-6-shirik@nvidia.com",
    "date": "2021-01-14T07:07:39",
    "name": "[v6,5/9] common/mlx5: create GENEVE TLV option object with DevX",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "3f352af4048b3abe41d6b7e767913684f4ab6f57",
    "submitter": {
        "id": 1894,
        "url": "http://patches.dpdk.org/api/people/1894/?format=api",
        "name": "Shiri Kuzin",
        "email": "shirik@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/20210114070743.2377-6-shirik@nvidia.com/mbox/",
    "series": [
        {
            "id": 14717,
            "url": "http://patches.dpdk.org/api/series/14717/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14717",
            "date": "2021-01-14T07:07:34",
            "name": "ethdev: introduce GENEVE header TLV option item",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/14717/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/86533/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/86533/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 CDD05A0A02;\n\tThu, 14 Jan 2021 08:09:02 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4AC9A140CF6;\n\tThu, 14 Jan 2021 08:08:48 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id B4B50140F13\n for <dev@dpdk.org>; Thu, 14 Jan 2021 08:08:46 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n shirik@nvidia.com) with SMTP; 14 Jan 2021 09:08:45 +0200",
            "from nvidia.com (c-141-140-1-007.mtl.labs.mlnx [10.141.140.7])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10E78GjI013095;\n Thu, 14 Jan 2021 09:08:45 +0200"
        ],
        "From": "Shiri Kuzin <shirik@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "viacheslavo@nvidia.com, adrien.mazarguil@6wind.com, orika@nvidia.com,\n ferruh.yigit@intel.com, thomas@monjalon.net, rasland@nvidia.com,\n andrew.rybchenko@oktetlabs.ru",
        "Date": "Thu, 14 Jan 2021 09:07:39 +0200",
        "Message-Id": "<20210114070743.2377-6-shirik@nvidia.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20210114070743.2377-1-shirik@nvidia.com>",
        "References": "<20210112140241.15914-1-shirik@nvidia.com>\n <20210114070743.2377-1-shirik@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 5/9] common/mlx5: create GENEVE TLV option\n object with DevX",
        "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": "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>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n drivers/common/mlx5/mlx5_devx_cmds.c          | 55 +++++++++++++++++++\n drivers/common/mlx5/mlx5_devx_cmds.h          |  5 ++\n .../common/mlx5/rte_common_mlx5_exports.def   |  1 +\n drivers/common/mlx5/version.map               |  1 +\n 4 files changed, 62 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 861f75e47d..d5859c2a26 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -2093,3 +2093,58 @@ mlx5_devx_cmd_alloc_pd(void *ctx)\n \tppd->id = MLX5_GET(alloc_pd_out, out, pd);\n \treturn ppd;\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+}\n+\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 1e0a48d810..bf83a903b1 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -485,6 +485,11 @@ __rte_internal\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/rte_common_mlx5_exports.def b/drivers/common/mlx5/rte_common_mlx5_exports.def\nindex b385d38d1a..fd62b806ca 100644\n--- a/drivers/common/mlx5/rte_common_mlx5_exports.def\n+++ b/drivers/common/mlx5/rte_common_mlx5_exports.def\n@@ -34,6 +34,7 @@ EXPORTS\n \tmlx5_devx_cmd_register_read\n \tmlx5_devx_get_out_command_status\n \tmlx5_devx_cmd_create_flow_hit_aso_obj\n+\tmlx5_devx_cmd_create_geneve_tlv_option\n \n \tmlx5_devx_cq_create\n \tmlx5_devx_cq_destroy\ndiff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map\nindex 00760abece..244b9c7339 100644\n--- a/drivers/common/mlx5/version.map\n+++ b/drivers/common/mlx5/version.map\n@@ -23,6 +23,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": [
        "v6",
        "5/9"
    ]
}