get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1525725,
    "url": "http://patchwork.ozlabs.org/api/patches/1525725/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/3bc979319eaccca8db3e7f8d2d486d72de72c076.1631094144.git.grive@u256.net/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "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": "<3bc979319eaccca8db3e7f8d2d486d72de72c076.1631094144.git.grive@u256.net>",
    "list_archive_url": null,
    "date": "2021-09-08T09:47:41",
    "name": "[ovs-dev,v5,17/27] dpif-netdev: Use id-fpool for mark allocation",
    "commit_ref": "73ecf098d2d221df5b9ecbaa00480fc87053a3f4",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9fdc49ae30b7e69d6222960362cdfda814281f48",
    "submitter": {
        "id": 78795,
        "url": "http://patchwork.ozlabs.org/api/people/78795/?format=api",
        "name": "Gaetan Rivet",
        "email": "grive@u256.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/3bc979319eaccca8db3e7f8d2d486d72de72c076.1631094144.git.grive@u256.net/mbox/",
    "series": [
        {
            "id": 261424,
            "url": "http://patchwork.ozlabs.org/api/series/261424/?format=api",
            "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/1525725/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1525725/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=lo1BjAtY;\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=NyRvLP6t;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)"
        ],
        "Received": [
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4H4HRL2qB7z9sW8\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Sep 2021 19:49:34 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 0179A425B9;\n\tWed,  8 Sep 2021 09:49:31 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n\tby localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Vw_OPlODiBXZ; Wed,  8 Sep 2021 09:49:31 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id D2EC74259B;\n\tWed,  8 Sep 2021 09:49:29 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 8CB75C001C;\n\tWed,  8 Sep 2021 09:49:29 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 74635C000D\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:49:28 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id F4027407D7\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:29 +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 N_8cQgSOxh34 for <ovs-dev@openvswitch.org>;\n Wed,  8 Sep 2021 09:48:29 +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 63B31407BD\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:29 +0000 (UTC)",
            "from compute4.internal (compute4.nyi.internal [10.202.2.44])\n by mailout.west.internal (Postfix) with ESMTP id C6FF332009E1;\n Wed,  8 Sep 2021 05:48:28 -0400 (EDT)",
            "from mailfrontend2 ([10.202.2.163])\n by compute4.internal (MEProxy); Wed, 08 Sep 2021 05:48:29 -0400",
            "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 8 Sep 2021 05:48:27 -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=ncMjWzHB3E5/C\n M17hZAkjTObFhL9N3Q07N8juc090XI=; b=lo1BjAtYf7XIyPpjoAjnGf6e0/RjL\n W4YjUvM5MnurNb3NsHdYb3vrHp+LUxMKyg/i2bfh1/8xAuop4cUzCo+SSs8hPVGs\n YVBGDMloa7c18A/Zg6ioMK7AXQ8sdcWakwVM7rJIUYpdruOH8KxOyQq9EW3Oj2m9\n i6HTYlpHKhqqj9F2oh9HaKORazAacSGcJrcamYo6WHejvwHfvLLeG4QZBz23HHnh\n U55iSsCVWRKRLBwT9QCVV/7GtANNJ6iAtGtt0xrTdCcpdg7x/PGwBoW9tf8IFtxA\n lLU3VmudVyucKz6RUAS2Ljbb+p5BDCi5PUhtYpH7Y0O2zFqbIEvifHFeA==",
            "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=ncMjWzHB3E5/CM17hZAkjTObFhL9N3Q07N8juc090XI=; b=NyRvLP6t\n Sx706Brpw4aGjNVDzqhVe9Sl7QvSe6mkdvklH0JhKQmEAjlxT+k5qyjeg9onr3nB\n bdOYlt+MUGvMNV9UhGTyOzixa9d/8E9CjRIyPVxMTIpeOBH71VRLwCK5/7naJEp0\n giC53/OT/tCyERXF/gov38VEaPFXngOxWym+0oGRrglL1B0LEQ6BY5FBDRo0WDfR\n LQOF1AnBqxxZeeEM1lvN1PKGUj5cab98YQbwStOLCRqJFOrjpTLNjnqeJQqze39Z\n 8Ems/C/38B+gEnh0s5sALBdbj87a3nyoWI17rnxR89MSiiOcDPBdxUvTv0rGHnzE\n IXZWLCEnMIJuxQ=="
        ],
        "X-ME-Sender": "<xms:7IY4YQIxHkTmzzpGLpX8TH5nNRdgEhUAhse6cvgJJbAOCrwrw2oriA>\n <xme:7IY4YQLGsFIJDM6n1Bdn9wO6oZSYcCqLP_mfpOwFJ86QdDb_4lkdG3mNLbqIJMqi3\n JuvI4ijRHBfbZ0v2MQ>",
        "X-ME-Received": "\n <xmr:7IY4YQtzYkS6vKRsk94YjqFjLU9VKvc1WyTbsqurkpoZ4v-uzQhpTJwFZG0tc7T36UZlCnbpZgrtow_bMv06P_9Snw>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedvtddrudefjedgudekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefirggvthgr\n nhcutfhivhgvthcuoehgrhhivhgvsehuvdehiedrnhgvtheqnecuggftrfgrthhtvghrnh\n ephefgveffkeetheetfeeifedvheelfeejfeehveduteejhfekuedtkeeiuedvteehnecu\n vehluhhsthgvrhfuihiivgepfeenucfrrghrrghmpehmrghilhhfrhhomhepghhrihhvvg\n esuhdvheeirdhnvght",
        "X-ME-Proxy": "<xmx:7IY4YdZJTm6zO-hy7cis52gdrby58WR9HjIdn_siCoMU6WuEijSG8g>\n <xmx:7IY4YXZ4Ny-F8D_N3NwaBWe1rCGBY4ChHPCaDExa00o7wosdNNJJ_w>\n <xmx:7IY4YZDqhtKRhsTnm19LBLKwNQPjlEeAHcIHzS1iCBIN20npljXnXA>\n <xmx:7IY4Yex5OInagosxzltAi8XXrWvhTNqcE4eUkNyu37eULwgRU-TGHw>",
        "From": "Gaetan Rivet <grive@u256.net>",
        "To": "ovs-dev@openvswitch.org",
        "Date": "Wed,  8 Sep 2021 11:47:41 +0200",
        "Message-Id": "\n <3bc979319eaccca8db3e7f8d2d486d72de72c076.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 17/27] dpif-netdev: Use id-fpool for mark\n\tallocation",
        "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": "Use the netdev-offload multithread API to allow multiple thread\nallocating marks concurrently.\n\nInitialize only once the pool in a multithread context by using\nthe ovsthread_once type.\n\nUse the id-fpool module for faster concurrent ID allocation.\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 | 17 ++++++++++++-----\n 1 file changed, 12 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex c3d211858..24ecaa0a8 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -51,6 +51,7 @@\n #include \"fat-rwlock.h\"\n #include \"flow.h\"\n #include \"hmapx.h\"\n+#include \"id-fpool.h\"\n #include \"id-pool.h\"\n #include \"ipf.h\"\n #include \"mov-avg.h\"\n@@ -2349,7 +2350,7 @@ struct megaflow_to_mark_data {\n struct flow_mark {\n     struct cmap megaflow_to_mark;\n     struct cmap mark_to_flow;\n-    struct id_pool *pool;\n+    struct id_fpool *pool;\n };\n \n static struct flow_mark flow_mark = {\n@@ -2360,14 +2361,18 @@ static struct flow_mark flow_mark = {\n static uint32_t\n flow_mark_alloc(void)\n {\n+    static struct ovsthread_once pool_init = OVSTHREAD_ONCE_INITIALIZER;\n+    unsigned int tid = netdev_offload_thread_id();\n     uint32_t mark;\n \n-    if (!flow_mark.pool) {\n+    if (ovsthread_once_start(&pool_init)) {\n         /* Haven't initiated yet, do it here */\n-        flow_mark.pool = id_pool_create(1, MAX_FLOW_MARK);\n+        flow_mark.pool = id_fpool_create(netdev_offload_thread_nb(),\n+                                         1, MAX_FLOW_MARK);\n+        ovsthread_once_done(&pool_init);\n     }\n \n-    if (id_pool_alloc_id(flow_mark.pool, &mark)) {\n+    if (id_fpool_new_id(flow_mark.pool, tid, &mark)) {\n         return mark;\n     }\n \n@@ -2377,7 +2382,9 @@ flow_mark_alloc(void)\n static void\n flow_mark_free(uint32_t mark)\n {\n-    id_pool_free_id(flow_mark.pool, mark);\n+    unsigned int tid = netdev_offload_thread_id();\n+\n+    id_fpool_free_id(flow_mark.pool, tid, mark);\n }\n \n /* associate megaflow with a mark, which is a 1:1 mapping */\n",
    "prefixes": [
        "ovs-dev",
        "v5",
        "17/27"
    ]
}