Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62716/?format=api
http://patches.dpdk.org/api/patches/62716/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1573184965-49691-10-git-send-email-suanmingm@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": "<1573184965-49691-10-git-send-email-suanmingm@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1573184965-49691-10-git-send-email-suanmingm@mellanox.com", "date": "2019-11-08T03:49:15", "name": "[v2,09/19] net/mlx5: add meter action creation to the glue", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "6542371babef46ee2e7ee2e1264e4f9d465712f5", "submitter": { "id": 1358, "url": "http://patches.dpdk.org/api/people/1358/?format=api", "name": "Suanming Mou", "email": "suanmingm@mellanox.com" }, "delegate": { "id": 3268, "url": "http://patches.dpdk.org/api/users/3268/?format=api", "username": "rasland", "first_name": "Raslan", "last_name": "Darawsheh", "email": "rasland@nvidia.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1573184965-49691-10-git-send-email-suanmingm@mellanox.com/mbox/", "series": [ { "id": 7343, "url": "http://patches.dpdk.org/api/series/7343/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7343", "date": "2019-11-08T03:49:07", "name": "net/mlx5: support meter", "version": 2, "mbox": "http://patches.dpdk.org/series/7343/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/62716/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/62716/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 A1070A04AB;\n\tFri, 8 Nov 2019 04:50:15 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 164131BF9B;\n\tFri, 8 Nov 2019 04:49:45 +0100 (CET)", "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 243F51BF5A\n for <dev@dpdk.org>; Fri, 8 Nov 2019 04:49:33 +0100 (CET)" ], "From": "Suanming Mou <suanmingm@mellanox.com>", "To": "viacheslavo@mellanox.com,\n\tmatan@mellanox.com", "Cc": "orika@mellanox.com,\n\trasland@mellanox.com,\n\tdev@dpdk.org", "Date": "Fri, 8 Nov 2019 05:49:15 +0200", "Message-Id": "<1573184965-49691-10-git-send-email-suanmingm@mellanox.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1573184965-49691-1-git-send-email-suanmingm@mellanox.com>", "References": "<1573053090-179521-1-git-send-email-suanmingm@mellanox.com>\n <1573184965-49691-1-git-send-email-suanmingm@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v2 09/19] net/mlx5: add meter action creation to\n\tthe glue", "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 add the meter action creation to the glue code.\n\nSigned-off-by: Suanming Mou <suanmingm@mellanox.com>\n---\n drivers/net/mlx5/mlx5_glue.c | 30 ++++++++++++++++++++++++++++++\n drivers/net/mlx5/mlx5_glue.h | 9 +++++++++\n 2 files changed, 39 insertions(+)", "diff": "diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c\nindex 58c9a82..15197cf 100644\n--- a/drivers/net/mlx5/mlx5_glue.c\n+++ b/drivers/net/mlx5/mlx5_glue.c\n@@ -765,6 +765,34 @@\n \treturn NULL;\n }\n \n+static void *\n+mlx5_glue_dv_create_flow_action_meter(struct mlx5dv_dr_flow_meter_attr *attr)\n+{\n+#if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER)\n+\treturn mlx5dv_dr_action_create_flow_meter(attr);\n+#else\n+\t(void)attr;\n+\terrno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+}\n+\n+static int\n+mlx5_glue_dv_modify_flow_action_meter(void *action,\n+\t\t\t\t struct mlx5dv_dr_flow_meter_attr *attr,\n+\t\t\t\t uint64_t modify_bits)\n+{\n+#if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER)\n+\treturn mlx5dv_dr_action_modify_flow_meter(action, attr, modify_bits);\n+#else\n+\t(void)action;\n+\t(void)attr;\n+\t(void)modify_bits;\n+\terrno = ENOTSUP;\n+\treturn errno;\n+#endif\n+}\n+\n static int\n mlx5_glue_dv_destroy_flow(void *flow_id)\n {\n@@ -1084,6 +1112,8 @@\n \t.dv_create_flow_action_packet_reformat =\n \t\tmlx5_glue_dv_create_flow_action_packet_reformat,\n \t.dv_create_flow_action_tag = mlx5_glue_dv_create_flow_action_tag,\n+\t.dv_create_flow_action_meter = mlx5_glue_dv_create_flow_action_meter,\n+\t.dv_modify_flow_action_meter = mlx5_glue_dv_modify_flow_action_meter,\n \t.dv_destroy_flow = mlx5_glue_dv_destroy_flow,\n \t.dv_destroy_flow_matcher = mlx5_glue_dv_destroy_flow_matcher,\n \t.dv_open_device = mlx5_glue_dv_open_device,\ndiff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h\nindex 7fa8349..7ad6379 100644\n--- a/drivers/net/mlx5/mlx5_glue.h\n+++ b/drivers/net/mlx5/mlx5_glue.h\n@@ -52,6 +52,7 @@\n struct mlx5dv_flow_matcher_attr;\n struct mlx5dv_flow_action_attr;\n struct mlx5dv_flow_match_parameters;\n+struct mlx5dv_dr_flow_meter_attr;\n struct ibv_flow_action;\n enum mlx5dv_flow_action_packet_reformat_type { packet_reformat_type = 0, };\n enum mlx5dv_flow_table_type { flow_table_type = 0, };\n@@ -80,6 +81,10 @@\n struct mlx5dv_devx_port;\n #endif\n \n+#ifndef HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER\n+struct mlx5dv_dr_flow_meter_attr;\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@@ -209,6 +214,10 @@ struct mlx5_glue {\n \t\t struct mlx5dv_dr_domain *domain,\n \t\t uint32_t flags, size_t data_sz, void *data);\n \tvoid *(*dv_create_flow_action_tag)(uint32_t tag);\n+\tvoid *(*dv_create_flow_action_meter)\n+\t\t(struct mlx5dv_dr_flow_meter_attr *attr);\n+\tint (*dv_modify_flow_action_meter)(void *action,\n+\t\tstruct mlx5dv_dr_flow_meter_attr *attr, uint64_t modify_bits);\n \tint (*dv_destroy_flow)(void *flow);\n \tint (*dv_destroy_flow_matcher)(void *matcher);\n \tstruct ibv_context *(*dv_open_device)(struct ibv_device *device);\n", "prefixes": [ "v2", "09/19" ] }{ "id": 62716, "url": "