get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1525716,
    "url": "http://patchwork.ozlabs.org/api/patches/1525716/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/e1b2dbe246d2ecadf39b076ee7e3d059c94ef5f2.1631094144.git.grive@u256.net/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<e1b2dbe246d2ecadf39b076ee7e3d059c94ef5f2.1631094144.git.grive@u256.net>",
    "list_archive_url": null,
    "date": "2021-09-08T09:47:32",
    "name": "[ovs-dev,v5,08/27] dpif-netdev: Rename offload thread structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "aba8b6faef7a93eda42f0d274c42d443148d9e8b",
    "submitter": {
        "id": 78795,
        "url": "http://patchwork.ozlabs.org/api/people/78795/",
        "name": "Gaëtan Rivet",
        "email": "grive@u256.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/e1b2dbe246d2ecadf39b076ee7e3d059c94ef5f2.1631094144.git.grive@u256.net/mbox/",
    "series": [
        {
            "id": 261424,
            "url": "http://patchwork.ozlabs.org/api/series/261424/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=261424",
            "date": "2021-09-08T09:47:24",
            "name": "dpif-netdev: Parallel offload processing",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/261424/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1525716/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1525716/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ovs-dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=u256.net header.i=@u256.net header.a=rsa-sha256\n header.s=fm2 header.b=xR0SXV0P;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=messagingengine.com header.i=@messagingengine.com\n header.a=rsa-sha256 header.s=fm3 header.b=W2S1o97v;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp4.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=u256.net header.b=\"xR0SXV0P\";\n dkim=pass (2048-bit key) header.d=messagingengine.com\n header.b=\"W2S1o97v\""
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H4HQ54HZ4z9sW8\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Sep 2021 19:48:29 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id A520E613CC;\n\tWed,  8 Sep 2021 09:48:26 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n\tby localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id By_X_esoI1eZ; Wed,  8 Sep 2021 09:48:24 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id 1A6ED6073A;\n\tWed,  8 Sep 2021 09:48:22 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id D429CC001C;\n\tWed,  8 Sep 2021 09:48:22 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 16B45C001E\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:21 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id C138240742\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:16 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id MOaw3pD3M9Yb for <ovs-dev@openvswitch.org>;\n Wed,  8 Sep 2021 09:48:14 +0000 (UTC)",
            "from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com\n [64.147.123.19])\n by smtp4.osuosl.org (Postfix) with ESMTPS id EBA66406D5\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:14 +0000 (UTC)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 2685C320099B;\n Wed,  8 Sep 2021 05:48:14 -0400 (EDT)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Wed, 08 Sep 2021 05:48:14 -0400",
            "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 8 Sep 2021 05:48:13 -0400 (EDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=u256.net; h=from\n :to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=eFu29tCvDNqNb\n nSO7TmTw5UngI3gxyhiXwhcaw4Gmm0=; b=xR0SXV0Pc7esqTLXZlPXvW2eretkC\n fEb1Y+Yq/TsOE7k+X0mwhL+royIGPHBiR85uRcqYWHGizUkuNIy/SKCdxSBnsQIV\n vcZwyPZ5OMmBDM39Rc9x74zrfZl/dzd8xNVYEe4OctZjFtsN2ttSzAMJngZSlM5G\n 87VpFndfJX1q7VBKH6+yZfsbaauvP0COemZbDhexxGEaMS3mLm11SCb8CI2r68RR\n VQccdpX4RrS0Ett0COlnYZIM/ZRHQfJHsxRuQP0pSsKovRa/3+b4l9PAy5vNYliu\n oN/u8C7NlXzQKOQkYu3Kqhf7lFq2h3sI3m7TS1XB9GegQiL67B+btesAA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm3; bh=eFu29tCvDNqNbnSO7TmTw5UngI3gxyhiXwhcaw4Gmm0=; b=W2S1o97v\n ZrU9DS6VSCGfAS19O++ETOF7eP70KBDGVegig+v8SLaIibOLxercT+GLGs/9RASj\n Xmiw1KQ+I8n53EUywmSv7vwzt5QJA/5jK69NPEgSdHsZqNieIT719rosnhY2Bflx\n w2VRcjZVAGcJBGVxIO6T6aLE0BuSpjYpLuYv1hfEH0lNknYG+sMLWKB0vrj/f8ye\n O5chAiJe8BKTBdUHjqB7uDgQVuMtNz5Xjr2Fe+8AwrGXscNd6BlCMsaUfBVG7w91\n LkqznVVVxQaJDpLhPLbsXvmXdq45rKZY9Pw7GmVF2s9IByEuO0399v39bwpAzbvC\n q5Ht0oOTU7RFww=="
        ],
        "X-ME-Sender": "<xms:3YY4YXu0xZRvy1sg8GoBcKmrqrnb07Uls9RtvD6Erklua1rDNPnh3A>\n <xme:3YY4YYd2rkusuCLDwHTTkxGIG-ZzbiOc8SoXm3Gxy9YBREj8YdjycowW0PWG56t1e\n qK1aE4t6ax1O0lLOVg>",
        "X-ME-Received": "\n <xmr:3YY4YawZmkUFwBR0PkdhRAQHa1_YRIKuIXYyDG-DPcQsTHg7KZb5Dap0S9cVuHBy48z6KW0gEIYpoXRS-v8fDD0cqg>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedvtddrudefjedgudekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefirggvthgr\n nhcutfhivhgvthcuoehgrhhivhgvsehuvdehiedrnhgvtheqnecuggftrfgrthhtvghrnh\n ephefgveffkeetheetfeeifedvheelfeejfeehveduteejhfekuedtkeeiuedvteehnecu\n vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrihhvvg\n esuhdvheeirdhnvght",
        "X-ME-Proxy": "<xmx:3YY4YWPiIC2Sr5295eWAm3QI234CSr7_z2R8sMXsuttKREDuUlOWqw>\n <xmx:3YY4YX8a7YtCi1QQaJ9l2SKMNzgQbrVsMYPS-oVbHHbsnZN-WkP6pw>\n <xmx:3YY4YWX-vKlL0wRxRvMM-pWHDnkRwdProg4c7b2UtV27m0zXSUqxTA>\n <xmx:3YY4YRm3fo5K05VsL2cDw9A1-AYW-ntcNhb9yAo-9XGm3Y_gVKcT0Q>",
        "From": "Gaetan Rivet <grive@u256.net>",
        "To": "ovs-dev@openvswitch.org",
        "Date": "Wed,  8 Sep 2021 11:47:32 +0200",
        "Message-Id": "\n <e1b2dbe246d2ecadf39b076ee7e3d059c94ef5f2.1631094144.git.grive@u256.net>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<cover.1631094144.git.grive@u256.net>",
        "References": "<cover.1631094144.git.grive@u256.net>",
        "MIME-Version": "1.0",
        "Cc": "Eli Britstein <elibr@nvidia.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[ovs-dev] [PATCH v5 08/27] dpif-netdev: Rename offload thread\n\tstructure",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "The offload management in userspace is done through a separate thread.\nThe naming of the structure holding the objects used for synchronization\nwith the dataplane is generic and nondescript.\n\nClarify the object function by renaming it.\n\nSigned-off-by: Gaetan Rivet <grive@u256.net>\nReviewed-by: Eli Britstein <elibr@nvidia.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/dpif-netdev.c | 52 +++++++++++++++++++++++------------------------\n 1 file changed, 26 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex a36ff9456..36d6a5962 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -337,7 +337,7 @@ enum {\n     DP_NETDEV_FLOW_OFFLOAD_OP_DEL,\n };\n \n-struct dp_flow_offload_item {\n+struct dp_offload_thread_item {\n     struct dp_netdev_pmd_thread *pmd;\n     struct dp_netdev_flow *flow;\n     int op;\n@@ -349,15 +349,15 @@ struct dp_flow_offload_item {\n     struct ovs_list node;\n };\n \n-struct dp_flow_offload {\n+struct dp_offload_thread {\n     struct ovs_mutex mutex;\n     struct ovs_list list;\n     pthread_cond_t cond;\n };\n \n-static struct dp_flow_offload dp_flow_offload = {\n+static struct dp_offload_thread dp_offload_thread = {\n     .mutex = OVS_MUTEX_INITIALIZER,\n-    .list  = OVS_LIST_INITIALIZER(&dp_flow_offload.list),\n+    .list  = OVS_LIST_INITIALIZER(&dp_offload_thread.list),\n };\n \n static struct ovsthread_once offload_thread_once\n@@ -2518,12 +2518,12 @@ mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd,\n     return NULL;\n }\n \n-static struct dp_flow_offload_item *\n+static struct dp_offload_thread_item *\n dp_netdev_alloc_flow_offload(struct dp_netdev_pmd_thread *pmd,\n                              struct dp_netdev_flow *flow,\n                              int op)\n {\n-    struct dp_flow_offload_item *offload;\n+    struct dp_offload_thread_item *offload;\n \n     offload = xzalloc(sizeof(*offload));\n     offload->pmd = pmd;\n@@ -2537,7 +2537,7 @@ dp_netdev_alloc_flow_offload(struct dp_netdev_pmd_thread *pmd,\n }\n \n static void\n-dp_netdev_free_flow_offload(struct dp_flow_offload_item *offload)\n+dp_netdev_free_flow_offload(struct dp_offload_thread_item *offload)\n {\n     dp_netdev_pmd_unref(offload->pmd);\n     dp_netdev_flow_unref(offload->flow);\n@@ -2547,16 +2547,16 @@ dp_netdev_free_flow_offload(struct dp_flow_offload_item *offload)\n }\n \n static void\n-dp_netdev_append_flow_offload(struct dp_flow_offload_item *offload)\n+dp_netdev_append_flow_offload(struct dp_offload_thread_item *offload)\n {\n-    ovs_mutex_lock(&dp_flow_offload.mutex);\n-    ovs_list_push_back(&dp_flow_offload.list, &offload->node);\n-    xpthread_cond_signal(&dp_flow_offload.cond);\n-    ovs_mutex_unlock(&dp_flow_offload.mutex);\n+    ovs_mutex_lock(&dp_offload_thread.mutex);\n+    ovs_list_push_back(&dp_offload_thread.list, &offload->node);\n+    xpthread_cond_signal(&dp_offload_thread.cond);\n+    ovs_mutex_unlock(&dp_offload_thread.mutex);\n }\n \n static int\n-dp_netdev_flow_offload_del(struct dp_flow_offload_item *offload)\n+dp_netdev_flow_offload_del(struct dp_offload_thread_item *offload)\n {\n     return mark_to_flow_disassociate(offload->pmd, offload->flow);\n }\n@@ -2573,7 +2573,7 @@ dp_netdev_flow_offload_del(struct dp_flow_offload_item *offload)\n  * valid, thus only item 2 needed.\n  */\n static int\n-dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload)\n+dp_netdev_flow_offload_put(struct dp_offload_thread_item *offload)\n {\n     struct dp_netdev_pmd_thread *pmd = offload->pmd;\n     struct dp_netdev_flow *flow = offload->flow;\n@@ -2654,22 +2654,22 @@ err_free:\n static void *\n dp_netdev_flow_offload_main(void *data OVS_UNUSED)\n {\n-    struct dp_flow_offload_item *offload;\n+    struct dp_offload_thread_item *offload;\n     struct ovs_list *list;\n     const char *op;\n     int ret;\n \n     for (;;) {\n-        ovs_mutex_lock(&dp_flow_offload.mutex);\n-        if (ovs_list_is_empty(&dp_flow_offload.list)) {\n+        ovs_mutex_lock(&dp_offload_thread.mutex);\n+        if (ovs_list_is_empty(&dp_offload_thread.list)) {\n             ovsrcu_quiesce_start();\n-            ovs_mutex_cond_wait(&dp_flow_offload.cond,\n-                                &dp_flow_offload.mutex);\n+            ovs_mutex_cond_wait(&dp_offload_thread.cond,\n+                                &dp_offload_thread.mutex);\n             ovsrcu_quiesce_end();\n         }\n-        list = ovs_list_pop_front(&dp_flow_offload.list);\n-        offload = CONTAINER_OF(list, struct dp_flow_offload_item, node);\n-        ovs_mutex_unlock(&dp_flow_offload.mutex);\n+        list = ovs_list_pop_front(&dp_offload_thread.list);\n+        offload = CONTAINER_OF(list, struct dp_offload_thread_item, node);\n+        ovs_mutex_unlock(&dp_offload_thread.mutex);\n \n         switch (offload->op) {\n         case DP_NETDEV_FLOW_OFFLOAD_OP_ADD:\n@@ -2702,10 +2702,10 @@ static void\n queue_netdev_flow_del(struct dp_netdev_pmd_thread *pmd,\n                       struct dp_netdev_flow *flow)\n {\n-    struct dp_flow_offload_item *offload;\n+    struct dp_offload_thread_item *offload;\n \n     if (ovsthread_once_start(&offload_thread_once)) {\n-        xpthread_cond_init(&dp_flow_offload.cond, NULL);\n+        xpthread_cond_init(&dp_offload_thread.cond, NULL);\n         ovs_thread_create(\"hw_offload\", dp_netdev_flow_offload_main, NULL);\n         ovsthread_once_done(&offload_thread_once);\n     }\n@@ -2786,14 +2786,14 @@ queue_netdev_flow_put(struct dp_netdev_pmd_thread *pmd,\n                       const struct nlattr *actions, size_t actions_len,\n                       odp_port_t orig_in_port, int op)\n {\n-    struct dp_flow_offload_item *offload;\n+    struct dp_offload_thread_item *offload;\n \n     if (!netdev_is_flow_api_enabled()) {\n         return;\n     }\n \n     if (ovsthread_once_start(&offload_thread_once)) {\n-        xpthread_cond_init(&dp_flow_offload.cond, NULL);\n+        xpthread_cond_init(&dp_offload_thread.cond, NULL);\n         ovs_thread_create(\"hw_offload\", dp_netdev_flow_offload_main, NULL);\n         ovsthread_once_done(&offload_thread_once);\n     }\n",
    "prefixes": [
        "ovs-dev",
        "v5",
        "08/27"
    ]
}