Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51461/?format=api
https://patches.dpdk.org/api/patches/51461/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1553155888-27498-15-git-send-email-viacheslavo@mellanox.com/", "project": { "id": 1, "url": "https://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": "<1553155888-27498-15-git-send-email-viacheslavo@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1553155888-27498-15-git-send-email-viacheslavo@mellanox.com", "date": "2019-03-21T08:11:28", "name": "[14/14] net/mlx5: add source vport match to the ingress rules", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e6c327e812fe93500524f14921f53f84bad6099d", "submitter": { "id": 1102, "url": "https://patches.dpdk.org/api/people/1102/?format=api", "name": "Slava Ovsiienko", "email": "viacheslavo@mellanox.com" }, "delegate": { "id": 6624, "url": "https://patches.dpdk.org/api/users/6624/?format=api", "username": "shahafs", "first_name": "Shahaf", "last_name": "Shuler", "email": "shahafs@mellanox.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1553155888-27498-15-git-send-email-viacheslavo@mellanox.com/mbox/", "series": [ { "id": 3842, "url": "https://patches.dpdk.org/api/series/3842/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3842", "date": "2019-03-21T08:11:18", "name": "net/mlx5: add support for multiport IB devices", "version": 1, "mbox": "https://patches.dpdk.org/series/3842/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/51461/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/51461/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 91B6E1B4A4;\n\tThu, 21 Mar 2019 09:12:16 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id B87921B44B\n\tfor <dev@dpdk.org>; Thu, 21 Mar 2019 09:11:42 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tviacheslavo@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 21 Mar 2019 10:11:37 +0200", "from pegasus12.mtr.labs.mlnx. (pegasus12.mtr.labs.mlnx\n\t[10.210.17.40])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x2L8BaiC003643;\n\tThu, 21 Mar 2019 10:11:37 +0200" ], "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>", "To": "dev@dpdk.org", "Cc": "shahafs@mellanox.com", "Date": "Thu, 21 Mar 2019 08:11:28 +0000", "Message-Id": "<1553155888-27498-15-git-send-email-viacheslavo@mellanox.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1553155888-27498-1-git-send-email-viacheslavo@mellanox.com>", "References": "<1551376985-11096-1-git-send-email-viacheslavo@mellanox.com>\n\t<1553155888-27498-1-git-send-email-viacheslavo@mellanox.com>", "Subject": "[dpdk-dev] [PATCH 14/14] net/mlx5: add source vport match to the\n\tingress rules", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "For E-Switch configurations over multiport Infiniband devices\nwe should add source vport match to correctly distribute\ntraffic between representors.\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 38 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 38 insertions(+)", "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex b8943da..489b3bd 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -3095,6 +3095,29 @@ struct field_modify_info modify_tcp[] = {\n }\n \n /**\n+ * Add source vport match to the specified matcher.\n+ *\n+ * @param[in, out] matcher\n+ * Flow matcher.\n+ * @param[in, out] key\n+ * Flow matcher value.\n+ * @param[in] port\n+ * Source vport value to match\n+ * @param[in] mask\n+ * Mask\n+ */\n+static void\n+flow_dv_translate_source_vport(void *matcher, void *key,\n+\t\t\t int16_t port, uint16_t mask)\n+{\n+\tvoid *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);\n+\tvoid *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);\n+\n+\tMLX5_SET(fte_match_set_misc, misc_m, source_port, mask);\n+\tMLX5_SET(fte_match_set_misc, misc_v, source_port, port);\n+}\n+\n+/**\n * Fill the flow with DV spec.\n *\n * @param[in] dev\n@@ -3389,6 +3412,21 @@ struct field_modify_info modify_tcp[] = {\n \t}\n \tdev_flow->dv.actions_n = actions_n;\n \tflow->actions = action_flags;\n+\tif (attr->ingress && !attr->transfer &&\n+\t (priv->representor || priv->master)) {\n+\t\t/* It was validated - we support unidirections flows only. */\n+\t\tassert(!attr->egress);\n+\t\t/*\n+\t\t * Add matching on source vport index only\n+\t\t * for ingress rules in E-Switch configurations.\n+\t\t */\n+\t\tflow_dv_translate_source_vport(matcher.mask.buf,\n+\t\t\t\t\t dev_flow->dv.value.buf,\n+\t\t\t\t\t priv->representor_id < 0 ?\n+\t\t\t\t\t priv->representor_id :\n+\t\t\t\t\t priv->representor_id + 1,\n+\t\t\t\t\t 0xffff);\n+\t}\n \tfor (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {\n \t\tint tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);\n \t\tvoid *match_mask = matcher.mask.buf;\n", "prefixes": [ "14/14" ] }{ "id": 51461, "url": "