get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/82572/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 82572,
    "url": "https://patches.dpdk.org/api/patches/82572/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1603875616-272798-34-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": "<1603875616-272798-34-git-send-email-suanmingm@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1603875616-272798-34-git-send-email-suanmingm@nvidia.com",
    "date": "2020-10-28T09:00:14",
    "name": "[v5,33/34] net/mlx5: make shared action list thread safe",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "aa753ad32bb6981e64a05edf55abdd3fd8783e01",
    "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/1603875616-272798-34-git-send-email-suanmingm@nvidia.com/mbox/",
    "series": [
        {
            "id": 13411,
            "url": "https://patches.dpdk.org/api/series/13411/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13411",
            "date": "2020-10-28T08:59:42",
            "name": "net/mlx5: support multiple-thread flow operations",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/13411/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/82572/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/82572/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 13FF7A04DD;\n\tWed, 28 Oct 2020 10:11:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5C472C9BA;\n\tWed, 28 Oct 2020 10:03:54 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 44BBDC6C8\n for <dev@dpdk.org>; Wed, 28 Oct 2020 10:02:21 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n suanmingm@nvidia.com) with SMTP; 28 Oct 2020 11:01:47 +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 09S90JmX024495;\n Wed, 28 Oct 2020 11:01:45 +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, rasland@nvidia.com",
        "Date": "Wed, 28 Oct 2020 17:00:14 +0800",
        "Message-Id": "<1603875616-272798-34-git-send-email-suanmingm@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1603875616-272798-1-git-send-email-suanmingm@nvidia.com>",
        "References": "<1601984948-313027-1-git-send-email-suanmingm@nvidia.com>\n <1603875616-272798-1-git-send-email-suanmingm@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v5 33/34] net/mlx5: make shared action list\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 uses spinlock to protect the shared action list in multiple\nthread.\n\nSigned-off-by: Suanming Mou <suanmingm@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_dv.c  | 5 +++++\n 3 files changed, 7 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 5856981..8612cab 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1534,6 +1534,7 @@\n \t\t}\n \t\tpriv->mreg_cp_tbl->ctx = eth_dev;\n \t}\n+\trte_spinlock_init(&priv->shared_act_sl);\n \tmlx5_flow_counter_mode_config(eth_dev);\n \treturn eth_dev;\n error:\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex ac7a026..be21a9a 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -912,6 +912,7 @@ struct mlx5_priv {\n \tuint8_t fdb_def_rule; /* Whether fdb jump to table 1 is configured. */\n \tstruct mlx5_mp_id mp_id; /* ID of a multi-process process */\n \tLIST_HEAD(fdir, mlx5_fdir_flow) fdir_flows; /* fdir flows. */\n+\trte_spinlock_t shared_act_sl; /* Shared actions spinlock. */\n \tLIST_HEAD(shared_action, rte_flow_shared_action) shared_actions;\n \t/* shared actions */\n };\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 08bbc5d..cf48402 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -11191,7 +11191,9 @@ struct mlx5_cache_entry *\n \tif (shared_action) {\n \t\t__atomic_add_fetch(&shared_action->refcnt, 1,\n \t\t\t\t   __ATOMIC_RELAXED);\n+\t\trte_spinlock_lock(&priv->shared_act_sl);\n \t\tLIST_INSERT_HEAD(&priv->shared_actions, shared_action, next);\n+\t\trte_spinlock_unlock(&priv->shared_act_sl);\n \t}\n \treturn shared_action;\n }\n@@ -11218,6 +11220,7 @@ struct mlx5_cache_entry *\n \t\t\t struct rte_flow_shared_action *action,\n \t\t\t struct rte_flow_error *error)\n {\n+\tstruct mlx5_priv *priv = dev->data->dev_private;\n \tint ret;\n \n \tswitch (action->type) {\n@@ -11232,7 +11235,9 @@ struct mlx5_cache_entry *\n \t}\n \tif (ret)\n \t\treturn ret;\n+\trte_spinlock_lock(&priv->shared_act_sl);\n \tLIST_REMOVE(action, next);\n+\trte_spinlock_unlock(&priv->shared_act_sl);\n \trte_free(action);\n \treturn 0;\n }\n",
    "prefixes": [
        "v5",
        "33/34"
    ]
}