Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82294/?format=api
https://patches.dpdk.org/api/patches/82294/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1603801650-442376-9-git-send-email-suanmingm@nvidia.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": "<1603801650-442376-9-git-send-email-suanmingm@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1603801650-442376-9-git-send-email-suanmingm@nvidia.com", "date": "2020-10-27T12:27:03", "name": "[v3,08/34] net/mlx5: make VLAN network interface thread safe", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c39da7ac754eba73b2acbaf394ff89347765e004", "submitter": { "id": 1887, "url": "https://patches.dpdk.org/api/people/1887/?format=api", "name": "Suanming Mou", "email": "suanmingm@nvidia.com" }, "delegate": { "id": 3268, "url": "https://patches.dpdk.org/api/users/3268/?format=api", "username": "rasland", "first_name": "Raslan", "last_name": "Darawsheh", "email": "rasland@nvidia.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1603801650-442376-9-git-send-email-suanmingm@nvidia.com/mbox/", "series": [ { "id": 13372, "url": "https://patches.dpdk.org/api/series/13372/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13372", "date": "2020-10-27T12:26:55", "name": "net/mlx5: support multiple-thread flow operations", "version": 3, "mbox": "https://patches.dpdk.org/series/13372/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/82294/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/82294/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 EC525A04B5;\n\tTue, 27 Oct 2020 13:30:07 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 78B044C9B;\n\tTue, 27 Oct 2020 13:28:07 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 1228F2C27\n for <dev@dpdk.org>; Tue, 27 Oct 2020 13:27:53 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n suanmingm@nvidia.com) with SMTP; 27 Oct 2020 14:27:51 +0200", "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 09RCRZ76024637;\n Tue, 27 Oct 2020 14:27:49 +0200" ], "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": "Tue, 27 Oct 2020 20:27:03 +0800", "Message-Id": "<1603801650-442376-9-git-send-email-suanmingm@nvidia.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1603801650-442376-1-git-send-email-suanmingm@nvidia.com>", "References": "<1601984948-313027-1-git-send-email-suanmingm@nvidia.com>\n <1603801650-442376-1-git-send-email-suanmingm@nvidia.com>", "Subject": "[dpdk-dev] [PATCH v3 08/34] 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": [ "v3", "08/34" ] }{ "id": 82294, "url": "