Show a patch.

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

{
    "id": 74464,
    "url": "https://patches.dpdk.org/api/patches/74464/",
    "web_url": "https://patches.dpdk.org/patch/74464/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1595226378-81144-5-git-send-email-orika@mellanox.com>",
    "date": "2020-07-20T06:26:08",
    "name": "[v6,04/13] regex/mlx5: add get info function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a17160fae9efb58d8b66c42eb6da20470424bfb1",
    "submitter": {
        "id": 795,
        "url": "https://patches.dpdk.org/api/people/795/",
        "name": "Ori Kam",
        "email": "orika@mellanox.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/patch/74464/mbox/",
    "series": [
        {
            "id": 11159,
            "url": "https://patches.dpdk.org/api/series/11159/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11159",
            "date": "2020-07-20T06:26:04",
            "name": "add Mellanox RegEx PMD",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/11159/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74464/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74464/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "References": "<1593941027-86651-1-git-send-email-orika@mellanox.com>\n <1595226378-81144-1-git-send-email-orika@mellanox.com>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v6 04/13] regex/mlx5: add get info function",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Ori Kam <orika@mellanox.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4FB4EA0540;\n\tMon, 20 Jul 2020 08:27:17 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C91EC2C6E;\n\tMon, 20 Jul 2020 08:26:45 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 458311BED3\n for <dev@dpdk.org>; Mon, 20 Jul 2020 08:26:38 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n orika@mellanox.com) with SMTP; 20 Jul 2020 09:26:35 +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 06K6QKug008177;\n Mon, 20 Jul 2020 09:26:35 +0300"
        ],
        "To": "jerinj@marvell.com, xiang.w.wang@intel.com, matan@mellanox.com,\n viacheslavo@mellanox.com",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Mon, 20 Jul 2020 06:26:08 +0000",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "In-Reply-To": "<1595226378-81144-1-git-send-email-orika@mellanox.com>",
        "Cc": "guyk@marvell.com, dev@dpdk.org, pbhagavatula@marvell.com,\n shahafs@mellanox.com, hemant.agrawal@nxp.com, opher@mellanox.com,\n alexr@mellanox.com, dovrat@marvell.com, pkapoor@marvell.com,\n nipun.gupta@nxp.com, 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",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<1595226378-81144-5-git-send-email-orika@mellanox.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "This commit adds the get info function.\n\nSigned-off-by: Ori Kam <orika@mellanox.com>\n---\n drivers/regex/mlx5/Makefile     |  1 +\n drivers/regex/mlx5/meson.build  |  1 +\n drivers/regex/mlx5/mlx5_regex.c |  4 +++-\n drivers/regex/mlx5/mlx5_regex.h |  5 +++++\n drivers/regex/mlx5/mlx5_rxp.c   | 29 +++++++++++++++++++++++++++++\n 5 files changed, 39 insertions(+), 1 deletion(-)\n create mode 100644 drivers/regex/mlx5/mlx5_rxp.c",
    "diff": "diff --git a/drivers/regex/mlx5/Makefile b/drivers/regex/mlx5/Makefile\nindex 1bddf21..8fe61f8 100644\n--- a/drivers/regex/mlx5/Makefile\n+++ b/drivers/regex/mlx5/Makefile\n@@ -8,6 +8,7 @@ LIB = librte_pmd_mlx5_regex.a\n \n # Sources.\n SRCS-$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD) += mlx5_regex.c\n+SRCS-$(CONFIG_RTE_LIBRTE_MLX5_REGEX_PMD) += mlx5_rxp.c\n \n # Basic CFLAGS.\n CFLAGS += -O3\ndiff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build\nindex 27bb0ad..bfb25e2 100644\n--- a/drivers/regex/mlx5/meson.build\n+++ b/drivers/regex/mlx5/meson.build\n@@ -11,6 +11,7 @@ fmt_name = 'mlx5_regex'\n deps += ['common_mlx5', 'bus_pci', 'bus_mlx5_pci', 'eal', 'regexdev']\n sources = files(\n \t'mlx5_regex.c',\n+\t'mlx5_rxp.c',\n )\n cflags_options = [\n \t'-std=c11',\ndiff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c\nindex fe44429..1f4d967 100644\n--- a/drivers/regex/mlx5/mlx5_regex.c\n+++ b/drivers/regex/mlx5/mlx5_regex.c\n@@ -22,7 +22,9 @@\n \n int mlx5_regex_logtype;\n \n-static const struct rte_regexdev_ops mlx5_regexdev_ops = {0};\n+const struct rte_regexdev_ops mlx5_regexdev_ops = {\n+\t.dev_info_get = mlx5_regex_info_get,\n+};\n \n static struct ibv_device *\n mlx5_regex_get_ib_device_match(struct rte_pci_addr *addr)\ndiff --git a/drivers/regex/mlx5/mlx5_regex.h b/drivers/regex/mlx5/mlx5_regex.h\nindex 0ce1e4d..9d0fc16 100644\n--- a/drivers/regex/mlx5/mlx5_regex.h\n+++ b/drivers/regex/mlx5/mlx5_regex.h\n@@ -11,4 +11,9 @@ struct mlx5_regex_priv {\n \tstruct rte_pci_device *pci_dev;\n \tstruct rte_regexdev *regexdev; /* Pointer to the RegEx dev. */\n };\n+\n+/* mlx5_rxp.c */\n+int mlx5_regex_info_get(struct rte_regexdev *dev,\n+\t\t\tstruct rte_regexdev_info *info);\n+\n #endif /* MLX5_REGEX_H */\ndiff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c\nnew file mode 100644\nindex 0000000..a5a6f15\n--- /dev/null\n+++ b/drivers/regex/mlx5/mlx5_rxp.c\n@@ -0,0 +1,29 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2020 Mellanox Technologies, Ltd\n+ */\n+\n+#include <rte_log.h>\n+#include <rte_errno.h>\n+#include <rte_regexdev.h>\n+#include <rte_regexdev_core.h>\n+#include <rte_regexdev_driver.h>\n+\n+#include \"mlx5_regex.h\"\n+\n+#define MLX5_REGEX_MAX_MATCHES 255\n+#define MLX5_REGEX_MAX_PAYLOAD_SIZE UINT16_MAX\n+#define MLX5_REGEX_MAX_RULES_PER_GROUP UINT16_MAX\n+#define MLX5_REGEX_MAX_GROUPS UINT16_MAX\n+\n+int\n+mlx5_regex_info_get(struct rte_regexdev *dev __rte_unused,\n+\t\t  struct rte_regexdev_info *info)\n+{\n+\tinfo->max_matches = MLX5_REGEX_MAX_MATCHES;\n+\tinfo->max_payload_size = MLX5_REGEX_MAX_PAYLOAD_SIZE;\n+\tinfo->max_rules_per_group = MLX5_REGEX_MAX_RULES_PER_GROUP;\n+\tinfo->max_groups = MLX5_REGEX_MAX_GROUPS;\n+\tinfo->regexdev_capa = RTE_REGEXDEV_SUPP_PCRE_GREEDY_F;\n+\tinfo->rule_flags = 0;\n+\treturn 0;\n+}\n",
    "prefixes": [
        "v6",
        "04/13"
    ]
}