get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73118,
    "url": "http://patches.dpdk.org/api/patches/73118/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1593941027-86651-8-git-send-email-orika@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": "<1593941027-86651-8-git-send-email-orika@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1593941027-86651-8-git-send-email-orika@mellanox.com",
    "date": "2020-07-05T09:23:34",
    "name": "[07/20] common/mlx5: add rxp database set cmd",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "97f3b96ae0da1bc55ed2695da84d484c1b52b45a",
    "submitter": {
        "id": 795,
        "url": "http://patches.dpdk.org/api/people/795/?format=api",
        "name": "Ori Kam",
        "email": "orika@mellanox.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1593941027-86651-8-git-send-email-orika@mellanox.com/mbox/",
    "series": [
        {
            "id": 10792,
            "url": "http://patches.dpdk.org/api/series/10792/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10792",
            "date": "2020-07-05T09:23:27",
            "name": "add Mellanox RegEx PMD",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10792/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/73118/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/73118/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 61433A00C5;\n\tSun,  5 Jul 2020 11:25:27 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E4F181DAFF;\n\tSun,  5 Jul 2020 11:24:45 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id D43E61DAF3\n for <dev@dpdk.org>; Sun,  5 Jul 2020 11:24:42 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n orika@mellanox.com) with SMTP; 5 Jul 2020 12:24:40 +0300",
            "from pegasus04.mtr.labs.mlnx. (pegasus04.mtr.labs.mlnx\n [10.210.16.126])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0659OC3r028191;\n Sun, 5 Jul 2020 12:24:40 +0300"
        ],
        "From": "Ori Kam <orika@mellanox.com>",
        "To": "jerinj@marvell.com, xiang.w.wang@intel.com, matan@mellanox.com,\n viacheslavo@mellanox.com, Shahaf Shuler <shahafs@mellanox.com>,\n Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>",
        "Cc": "guyk@marvell.com, dev@dpdk.org, pbhagavatula@marvell.com,\n hemant.agrawal@nxp.com, opher@mellanox.com, alexr@mellanox.com,\n dovrat@marvell.com, pkapoor@marvell.com, nipun.gupta@nxp.com,\n bruce.richardson@intel.com, yang.a.hong@intel.com,\n harry.chang@intel.com, gu.jian1@zte.com.cn, shanjiangh@chinatelecom.cn,\n zhangy.yun@chinatelecom.cn, lixingfu@huachentel.com,\n wushuai@inspur.com, yuyingxia@yxlink.com, fanchenggang@sunyainfo.com,\n davidfgao@tencent.com, liuzhong1@chinaunicom.cn, zhaoyong11@huawei.com,\n oc@yunify.com, jim@netgate.com, hongjun.ni@intel.com, deri@ntop.org,\n fc@napatech.com, arthur.su@lionic.com, thomas@monjalon.net,\n orika@mellanox.com, rasland@mellanox.com",
        "Date": "Sun,  5 Jul 2020 09:23:34 +0000",
        "Message-Id": "<1593941027-86651-8-git-send-email-orika@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1593941027-86651-1-git-send-email-orika@mellanox.com>",
        "References": "<1593941027-86651-1-git-send-email-orika@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 07/20] common/mlx5: add rxp database set cmd",
        "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 commit adds the database set command for the RXP engine.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\n---\n drivers/common/mlx5/mlx5_devx_cmds.c            | 104 ++++++++++++++++++++++++\n drivers/common/mlx5/mlx5_devx_cmds.h            |   8 +-\n drivers/common/mlx5/rte_common_mlx5_version.map |   3 +\n 3 files changed, 114 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 74df035..f8760e6 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -1616,3 +1616,107 @@ struct mlx5_devx_obj *\n \t\t\t\t\tinvalid_buffer);\n \treturn ret;\n }\n+\n+/**\n+ * Issue the RXP stop database command.\n+ *\n+ * @param[in] ctx\n+ *   Context returned from mlx5 open_device() glue function.\n+ * @param[in] engine\n+ *   The engine to stop.\n+ *\n+ * @return\n+ *   0 on success, a negative errno value otherwise and rte_errno is set.\n+ */\n+int\n+mlx5_devx_regex_database_stop(void *ctx, uint8_t engine)\n+{\n+\tuint32_t out[DEVX_ST_SZ_DW(set_regexp_params_out)] = {};\n+\tuint32_t in[DEVX_ST_SZ_DW(set_regexp_params_in)] = {};\n+\tint ret;\n+\n+\tDEVX_SET(set_regexp_params_in, in, opcode, MLX5_CMD_SET_REGEX_PARAMS);\n+\tDEVX_SET(set_regexp_params_in, in, engine_id, engine);\n+\tDEVX_SET(set_regexp_params_in, in, regexp_params.stop_engine, 1);\n+\tDEVX_SET(set_regexp_params_in, in, field_select.stop_engine, 1);\n+\tret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out,\n+\t\t\t\t\t  sizeof(out));\n+\tif (ret) {\n+\t\tDRV_LOG(ERR, \"Database stop failed %d\", ret);\n+\t\trte_errno = errno;\n+\t\treturn -errno;\n+\t}\n+\treturn 0;\n+}\n+\n+/**\n+ * Issue the RXP resume database command.\n+ *\n+ * @param[in] ctx\n+ *   Context returned from mlx5 open_device() glue function.\n+ * @param[in] engine\n+ *   The engine to start.\n+ *\n+ * @return\n+ *   0 on success, a negative errno value otherwise and rte_errno is set.\n+ */\n+int\n+mlx5_devx_regex_database_resume(void *ctx, uint8_t engine)\n+{\n+\tuint32_t out[DEVX_ST_SZ_DW(set_regexp_params_out)] = {};\n+\tuint32_t in[DEVX_ST_SZ_DW(set_regexp_params_in)] = {};\n+\tint ret;\n+\n+\tDEVX_SET(set_regexp_params_in, in, opcode, MLX5_CMD_SET_REGEX_PARAMS);\n+\tDEVX_SET(set_regexp_params_in, in, engine_id, engine);\n+\tDEVX_SET(set_regexp_params_in, in, regexp_params.stop_engine, 0);\n+\tDEVX_SET(set_regexp_params_in, in, field_select.stop_engine, 1);\n+\tret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out,\n+\t\t\t\t\t  sizeof(out));\n+\tif (ret) {\n+\t\tDRV_LOG(ERR, \"Database start failed %d\", ret);\n+\t\trte_errno = errno;\n+\t\treturn -errno;\n+\t}\n+\treturn 0;\n+}\n+\n+/**\n+ * Issue the RXP program database command.\n+ *\n+ * @param[in] ctx\n+ *   Context returned from mlx5 open_device() glue function.\n+ * @param[in] engine\n+ *   The engine to program.\n+ * @param[in] umem_id\n+ *   The umem id to use.\n+ * @param[in] umem_offset\n+ *   The offset in the umem to start copying from.\n+ *\n+ * @return\n+ *   0 on success, a negative errno value otherwise and rte_errno is set.\n+ */\n+int\n+mlx5_devx_regex_database_program(void *ctx, uint8_t engine, uint32_t umem_id,\n+\t\t\t\t uint64_t umem_offset)\n+{\n+\tuint32_t out[DEVX_ST_SZ_DW(set_regexp_params_out)] = {};\n+\tuint32_t in[DEVX_ST_SZ_DW(set_regexp_params_in)] = {};\n+\tint ret;\n+\n+\tDEVX_SET(set_regexp_params_in, in, opcode, MLX5_CMD_SET_REGEX_PARAMS);\n+\tDEVX_SET(set_regexp_params_in, in, engine_id, engine);\n+\tDEVX_SET(set_regexp_params_in, in, regexp_params.db_umem_id, umem_id);\n+\tDEVX_SET64(set_regexp_params_in, in, regexp_params.db_umem_offset,\n+\t\t   umem_offset);\n+\tDEVX_SET(set_regexp_params_in, in, field_select.db_umem_id, 1);\n+\tret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out,\n+\t\t\t\t\t  sizeof(out));\n+\tif (ret) {\n+\t\tDRV_LOG(ERR, \"Database program failed %d\", ret);\n+\t\trte_errno = errno;\n+\t\treturn -errno;\n+\t}\n+\treturn 0;\n+}\n+\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex bb14ca5..655e31f 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -401,5 +401,11 @@ int mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,\n __rte_internal\n int mlx5_devx_cmd_query_virtio_q_counters(struct mlx5_devx_obj *couners_obj,\n \t\t\t\t  struct mlx5_devx_virtio_q_couners_attr *attr);\n-\n+__rte_internal\n+int mlx5_devx_regex_database_stop(void *ctx, uint8_t engine);\n+__rte_internal\n+int mlx5_devx_regex_database_resume(void *ctx, uint8_t engine);\n+__rte_internal\n+int mlx5_devx_regex_database_program(void *ctx, uint8_t engine,\n+\t\t\t\t     uint32_t umem_id, uint64_t umem_offset);\n #endif /* RTE_PMD_MLX5_DEVX_CMDS_H_ */\ndiff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map\nindex ae57ebd..6054d39 100644\n--- a/drivers/common/mlx5/rte_common_mlx5_version.map\n+++ b/drivers/common/mlx5/rte_common_mlx5_version.map\n@@ -35,6 +35,9 @@ INTERNAL {\n \tmlx5_devx_cmd_query_virtio_q_counters;\n \tmlx5_devx_cmd_query_virtq;\n \tmlx5_devx_get_out_command_status;\n+\tmlx5_devx_regex_database_program;\n+\tmlx5_devx_regex_database_resume;\n+\tmlx5_devx_regex_database_stop;\n \n \tmlx5_get_ifname_sysfs;\n \tmlx5_get_dbr;\n",
    "prefixes": [
        "07/20"
    ]
}