Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81875/?format=api
http://patches.dpdk.org/api/patches/81875/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1603437295-119083-7-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-7-git-send-email-suanmingm@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1603437295-119083-7-git-send-email-suanmingm@nvidia.com", "date": "2020-10-23T07:14:36", "name": "[v2,06/25] net/mlx5: make rte flow list thread safe", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c549bae5d830e923cf33a962ab92ed7f1d2d1037", "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-7-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/81875/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/81875/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 1984CA04DE;\n\tFri, 23 Oct 2020 09:17:53 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A8AE79AFE;\n\tFri, 23 Oct 2020 09:15:47 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 22EF26CCB\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:15 +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 09N7F2LP026736;\n Fri, 23 Oct 2020 10:15:13 +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, Xueming Li <xuemingl@nvidia.com>", "Date": "Fri, 23 Oct 2020 15:14:36 +0800", "Message-Id": "<1603437295-119083-7-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 06/25] net/mlx5: make rte flow list thread 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": "From: Xueming Li <xuemingl@nvidia.com>\n\nTo support multi-thread flow operations, this patch introduces list lock\nfor the rte_flow list manages all the rte_flow handlers.\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/linux/mlx5_os.c | 1 +\n drivers/net/mlx5/mlx5.h | 1 +\n drivers/net/mlx5/mlx5_flow.c | 10 ++++++++--\n 3 files changed, 10 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 7e90de4..287ed13 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1340,6 +1340,7 @@\n \t\t\t\t MLX5_MAX_MAC_ADDRESSES);\n \tpriv->flows = 0;\n \tpriv->ctrl_flows = 0;\n+\trte_spinlock_init(&priv->flow_list_lock);\n \tTAILQ_INIT(&priv->flow_meters);\n \tTAILQ_INIT(&priv->flow_meter_profiles);\n \t/* Hint libmlx5 to use PMD allocator for data plane resources */\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex fafbb5c..62b3ee0 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -838,6 +838,7 @@ struct mlx5_priv {\n \tstruct mlx5_drop drop_queue; /* Flow drop queues. */\n \tuint32_t flows; /* RTE Flow rules. */\n \tuint32_t ctrl_flows; /* Control flow rules. */\n+\trte_spinlock_t flow_list_lock;\n \tstruct mlx5_obj_ops obj_ops; /* HW objects operations. */\n \tLIST_HEAD(rxq, mlx5_rxq_ctrl) rxqsctrl; /* DPDK Rx queues. */\n \tLIST_HEAD(rxqobj, mlx5_rxq_obj) rxqsobj; /* Verbs/DevX Rx queues. */\ndiff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex aa748a4..c6d3cc4 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -5217,9 +5217,12 @@ struct mlx5_flow_tunnel_info {\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \t}\n-\tif (list)\n+\tif (list) {\n+\t\trte_spinlock_lock(&priv->flow_list_lock);\n \t\tILIST_INSERT(priv->sh->ipool[MLX5_IPOOL_RTE_FLOW], list, idx,\n \t\t\t flow, next);\n+\t\trte_spinlock_unlock(&priv->flow_list_lock);\n+\t}\n \tflow_rxq_flags_set(dev, flow);\n \t/* Nested flow creation index recovery. */\n \twks->flow_idx = wks->flow_nested_idx;\n@@ -5375,9 +5378,12 @@ struct rte_flow *\n \tif (dev->data->dev_started)\n \t\tflow_rxq_flags_trim(dev, flow);\n \tflow_drv_destroy(dev, flow);\n-\tif (list)\n+\tif (list) {\n+\t\trte_spinlock_lock(&priv->flow_list_lock);\n \t\tILIST_REMOVE(priv->sh->ipool[MLX5_IPOOL_RTE_FLOW], list,\n \t\t\t flow_idx, flow, next);\n+\t\trte_spinlock_unlock(&priv->flow_list_lock);\n+\t}\n \tflow_mreg_del_copy_action(dev, flow);\n \tif (flow->fdir) {\n \t\tLIST_FOREACH(priv_fdir_flow, &priv->fdir_flows, next) {\n", "prefixes": [ "v2", "06/25" ] }{ "id": 81875, "url": "