Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80178/?format=api
http://patches.dpdk.org/api/patches/80178/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1602251436-269694-7-git-send-email-jiaweiw@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": "<1602251436-269694-7-git-send-email-jiaweiw@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1602251436-269694-7-git-send-email-jiaweiw@nvidia.com", "date": "2020-10-09T13:50:32", "name": "[06/10] common/mlx5: add glue function for mirroring", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0753080405d2f321fea4cb6c1fa96c7f1a614cff", "submitter": { "id": 1939, "url": "http://patches.dpdk.org/api/people/1939/?format=api", "name": "Jiawei Wang", "email": "jiaweiw@nvidia.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/1602251436-269694-7-git-send-email-jiaweiw@nvidia.com/mbox/", "series": [ { "id": 12829, "url": "http://patches.dpdk.org/api/series/12829/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12829", "date": "2020-10-09T13:50:28", "name": "Add sampling and mirroring support in MLX5 PMD", "version": 1, "mbox": "http://patches.dpdk.org/series/12829/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/80178/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/80178/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 8964CA04BC;\n\tFri, 9 Oct 2020 15:52:08 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E8D081D688;\n\tFri, 9 Oct 2020 15:50:50 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 006831D678\n for <dev@dpdk.org>; Fri, 9 Oct 2020 15:50:42 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n jiaweiw@nvidia.com) with SMTP; 9 Oct 2020 16:50:36 +0300", "from nvidia.com (gen-l-vrt-280.mtl.labs.mlnx [10.237.45.1])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 099Doadh013303;\n Fri, 9 Oct 2020 16:50:36 +0300" ], "From": "Jiawei Wang <jiaweiw@nvidia.com>", "To": "orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com,\n thomas@monjalon.net", "Cc": "dev@dpdk.org, rasland@nvidia.com, asafp@nvidia.com", "Date": "Fri, 9 Oct 2020 16:50:32 +0300", "Message-Id": "<1602251436-269694-7-git-send-email-jiaweiw@nvidia.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1602251436-269694-1-git-send-email-jiaweiw@nvidia.com>", "References": "<1601187539-112694-1-git-send-email-jiaweiw@nvidia.com>\n <1602251436-269694-1-git-send-email-jiaweiw@nvidia.com>", "Subject": "[dpdk-dev] [PATCH 06/10] common/mlx5: add glue function for\n\tmirroring", "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": "The new DR destination array action is supported since the\nrdma-core version v32.\n\nDestination array action is used group DR actions to a single action,\nAnd it can be used for mirroring packet and forward to every\ndestination (port or queue) in the array.\n\nSigned-off-by: Jiawei Wang <jiaweiw@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n drivers/common/mlx5/linux/meson.build | 2 ++\n drivers/common/mlx5/linux/mlx5_glue.c | 26 ++++++++++++++++++++++++--\n drivers/common/mlx5/linux/mlx5_glue.h | 22 ++++++++++++++++++++++\n 3 files changed, 48 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build\nindex 1aa137d..9ef8e18 100644\n--- a/drivers/common/mlx5/linux/meson.build\n+++ b/drivers/common/mlx5/linux/meson.build\n@@ -176,6 +176,8 @@ has_sym_args = [\n \t'mlx5dv_dr_action_create_flow_sampler'],\n \t[ 'HAVE_MLX5DV_DR_MEM_RECLAIM', 'infiniband/mlx5dv.h',\n \t'mlx5dv_dr_domain_set_reclaim_device_memory'],\n+\t[ 'HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY', 'infiniband/mlx5dv.h',\n+\t'mlx5dv_dr_action_create_dest_array'],\n \t[ 'HAVE_DEVLINK', 'linux/devlink.h', 'DEVLINK_GENL_NAME' ],\n ]\n config = configuration_data()\ndiff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c\nindex 771a47c..47b7e98 100644\n--- a/drivers/common/mlx5/linux/mlx5_glue.c\n+++ b/drivers/common/mlx5/linux/mlx5_glue.c\n@@ -1064,8 +1064,8 @@\n }\n \n static void *\n-mlx5_glue_dr_create_flow_action_sampler(\n-\t\t\tstruct mlx5dv_dr_flow_sampler_attr *attr)\n+mlx5_glue_dr_create_flow_action_sampler\n+\t\t\t(struct mlx5dv_dr_flow_sampler_attr *attr)\n {\n #ifdef HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE\n \treturn mlx5dv_dr_action_create_flow_sampler(attr);\n@@ -1076,6 +1076,26 @@\n #endif\n }\n \n+static void *\n+mlx5_glue_dr_action_create_dest_array\n+\t\t\t(void *domain,\n+\t\t\t size_t num_dest,\n+\t\t\t struct mlx5dv_dr_action_dest_attr *dests[])\n+{\n+#ifdef HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY\n+\treturn mlx5dv_dr_action_create_dest_array\n+\t\t\t\t(domain,\n+\t\t\t\tnum_dest,\n+\t\t\t\tdests);\n+#else\n+\t(void)domain;\n+\t(void)num_dest;\n+\t(void)dests;\n+\terrno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+}\n+\n static int\n mlx5_glue_devx_query_eqn(struct ibv_context *ctx, uint32_t cpus,\n \t\t\t uint32_t *eqn)\n@@ -1354,6 +1374,8 @@\n \t.dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,\n \t.dr_create_flow_action_sampler =\n \t\tmlx5_glue_dr_create_flow_action_sampler,\n+\t.dr_create_flow_action_dest_array =\n+\t\tmlx5_glue_dr_action_create_dest_array,\n \t.devx_query_eqn = mlx5_glue_devx_query_eqn,\n \t.devx_create_event_channel = mlx5_glue_devx_create_event_channel,\n \t.devx_destroy_event_channel = mlx5_glue_devx_destroy_event_channel,\ndiff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h\nindex a77d239..42b2f61 100644\n--- a/drivers/common/mlx5/linux/mlx5_glue.h\n+++ b/drivers/common/mlx5/linux/mlx5_glue.h\n@@ -98,6 +98,24 @@ struct mlx5dv_dr_flow_sampler_attr {\n };\n #endif\n \n+#ifndef HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY\n+enum mlx5dv_dr_action_dest_type {\n+\tMLX5DV_DR_ACTION_DEST,\n+\tMLX5DV_DR_ACTION_DEST_REFORMAT,\n+};\n+struct mlx5dv_dr_action_dest_reformat {\n+\tstruct mlx5dv_dr_action *reformat;\n+\tstruct mlx5dv_dr_action *dest;\n+};\n+struct mlx5dv_dr_action_dest_attr {\n+\tenum mlx5dv_dr_action_dest_type type;\n+\tunion {\n+\t\tstruct mlx5dv_dr_action *dest;\n+\t\tstruct mlx5dv_dr_action_dest_reformat *dest_reformat;\n+\t};\n+};\n+#endif\n+\n #ifndef HAVE_IBV_DEVX_EVENT\n struct mlx5dv_devx_event_channel { int fd; };\n struct mlx5dv_devx_async_event_hdr;\n@@ -322,6 +340,10 @@ struct mlx5_glue {\n \tvoid (*dv_free_pp)(struct mlx5dv_pp *pp);\n \tvoid *(*dr_create_flow_action_sampler)\n \t\t\t(struct mlx5dv_dr_flow_sampler_attr *attr);\n+\tvoid *(*dr_create_flow_action_dest_array)\n+\t\t\t(void *domain,\n+\t\t\t size_t num_dest,\n+\t\t\t struct mlx5dv_dr_action_dest_attr *dests[]);\n };\n \n extern const struct mlx5_glue *mlx5_glue;\n", "prefixes": [ "06/10" ] }{ "id": 80178, "url": "