Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81876/?format=api
http://patches.dpdk.org/api/patches/81876/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1603437295-119083-9-git-send-email-suanmingm@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": "<1603437295-119083-9-git-send-email-suanmingm@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1603437295-119083-9-git-send-email-suanmingm@nvidia.com", "date": "2020-10-23T07:14:38", "name": "[v2,08/25] net/mlx5: make VLAN network interface thread safe", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c39da7ac754eba73b2acbaf394ff89347765e004", "submitter": { "id": 1887, "url": "http://patches.dpdk.org/api/people/1887/?format=api", "name": "Suanming Mou", "email": "suanmingm@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/1603437295-119083-9-git-send-email-suanmingm@nvidia.com/mbox/", "series": [ { "id": 13250, "url": "http://patches.dpdk.org/api/series/13250/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13250", "date": "2020-10-23T07:14:30", "name": "*net/mlx5: support multiple-thread flow operations", "version": 2, "mbox": "http://patches.dpdk.org/series/13250/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/81876/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/81876/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 13711A04DE;\n\tFri, 23 Oct 2020 09:18:09 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 447F3A8E6;\n\tFri, 23 Oct 2020 09:15:49 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 2C8D572E3\n for <dev@dpdk.org>; Fri, 23 Oct 2020 09:15:20 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n suanmingm@nvidia.com) with SMTP; 23 Oct 2020 10:15:18 +0300", "from nvidia.com (mtbc-r640-04.mtbc.labs.mlnx [10.75.70.9])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09N7F2LR026736;\n Fri, 23 Oct 2020 10:15:17 +0300" ], "From": "Suanming Mou <suanmingm@nvidia.com>", "To": "Matan Azrad <matan@nvidia.com>, Shahaf Shuler <shahafs@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>", "Cc": "dev@dpdk.org", "Date": "Fri, 23 Oct 2020 15:14:38 +0800", "Message-Id": "<1603437295-119083-9-git-send-email-suanmingm@nvidia.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1603437295-119083-1-git-send-email-suanmingm@nvidia.com>", "References": "<1601984948-313027-1-git-send-email-suanmingm@nvidia.com>\n <1603437295-119083-1-git-send-email-suanmingm@nvidia.com>", "Subject": "[dpdk-dev] [PATCH v2 08/25] net/mlx5: make VLAN network interface\n\tthread safe", "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 protects the VLAN VM workaround area using a spinlock\nin multiple-thread flow insertion to make it thread safe.\n\nSigned-off-by: Suanming Mou <suanmingm@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/common/mlx5/linux/mlx5_nl.h | 1 +\n drivers/net/mlx5/linux/mlx5_vlan_os.c | 5 +++++\n 2 files changed, 6 insertions(+)", "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_nl.h b/drivers/common/mlx5/linux/mlx5_nl.h\nindex 53021e1..15129ff 100644\n--- a/drivers/common/mlx5/linux/mlx5_nl.h\n+++ b/drivers/common/mlx5/linux/mlx5_nl.h\n@@ -25,6 +25,7 @@ struct mlx5_nl_vlan_dev {\n struct mlx5_nl_vlan_vmwa_context {\n \tint nl_socket;\n \tuint32_t vf_ifindex;\n+\trte_spinlock_t sl;\n \tstruct mlx5_nl_vlan_dev vlan_dev[4096];\n };\n \ndiff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c\nindex 92fc17d..40e895e 100644\n--- a/drivers/net/mlx5/linux/mlx5_vlan_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c\n@@ -44,12 +44,14 @@\n \tif (!vlan->created || !vmwa)\n \t\treturn;\n \tvlan->created = 0;\n+\trte_spinlock_lock(&vmwa->sl);\n \tMLX5_ASSERT(vlan_dev[vlan->tag].refcnt);\n \tif (--vlan_dev[vlan->tag].refcnt == 0 &&\n \t vlan_dev[vlan->tag].ifindex) {\n \t\tmlx5_nl_vlan_vmwa_delete(vmwa, vlan_dev[vlan->tag].ifindex);\n \t\tvlan_dev[vlan->tag].ifindex = 0;\n \t}\n+\trte_spinlock_unlock(&vmwa->sl);\n }\n \n /**\n@@ -72,6 +74,7 @@\n \tMLX5_ASSERT(priv->vmwa_context);\n \tif (vlan->created || !vmwa)\n \t\treturn;\n+\trte_spinlock_lock(&vmwa->sl);\n \tif (vlan_dev[vlan->tag].refcnt == 0) {\n \t\tMLX5_ASSERT(!vlan_dev[vlan->tag].ifindex);\n \t\tvlan_dev[vlan->tag].ifindex =\n@@ -82,6 +85,7 @@\n \t\tvlan_dev[vlan->tag].refcnt++;\n \t\tvlan->created = 1;\n \t}\n+\trte_spinlock_unlock(&vmwa->sl);\n }\n \n /*\n@@ -131,6 +135,7 @@\n \t\t\t\" for VLAN workaround context\");\n \t\treturn NULL;\n \t}\n+\trte_spinlock_init(&vmwa->sl);\n \tvmwa->nl_socket = mlx5_nl_init(NETLINK_ROUTE);\n \tif (vmwa->nl_socket < 0) {\n \t\tDRV_LOG(WARNING,\n", "prefixes": [ "v2", "08/25" ] }{ "id": 81876, "url": "