get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812660,
    "url": "http://patchwork.ozlabs.org/api/patches/812660/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170911233332.7594-2-xiyou.wangcong@gmail.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170911233332.7594-2-xiyou.wangcong@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-11T23:33:30",
    "name": "[net,v3,1/3] net_sched: get rid of tcfa_rcu",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "88b17f24db4c95563a895e99c7440db908e6c7b2",
    "submitter": {
        "id": 211,
        "url": "http://patchwork.ozlabs.org/api/people/211/?format=api",
        "name": "Cong Wang",
        "email": "xiyou.wangcong@gmail.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170911233332.7594-2-xiyou.wangcong@gmail.com/mbox/",
    "series": [
        {
            "id": 2596,
            "url": "http://patchwork.ozlabs.org/api/series/2596/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=2596",
            "date": "2017-09-11T23:33:29",
            "name": "net_sched: fix filter chain reference counting",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/2596/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812660/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812660/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mJ+ym3+I\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrklT241Hz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 09:33:57 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751144AbdIKXdy (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 19:33:54 -0400",
            "from mail-pf0-f193.google.com ([209.85.192.193]:33769 \"EHLO\n\tmail-pf0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750957AbdIKXdw (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 11 Sep 2017 19:33:52 -0400",
            "by mail-pf0-f193.google.com with SMTP id h4so5522148pfk.0\n\tfor <netdev@vger.kernel.org>; Mon, 11 Sep 2017 16:33:52 -0700 (PDT)",
            "from tw-172-25-30-113.office.twttr.net ([8.25.197.25])\n\tby smtp.gmail.com with ESMTPSA id\n\tf5sm15676526pga.30.2017.09.11.16.33.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 11 Sep 2017 16:33:50 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ATafWyJ6xXo4ACe+NKNF8mWfMPDnfEfp65HhvrrY1wE=;\n\tb=mJ+ym3+IeArB6rUU4PBV5MjGByiVWRkCRatvw1Nnr3XMFnPILK2MsXRmCGT3YscbCw\n\t5W86SpWlXBSTZlYTuOW/Qc633P3NNOpLSiLDD4lJrTyaekozB99ZCh+7WGPHlDPpV75o\n\tTXq9RyzBWQw7WNk2me09kz+PvP3uy7wubVjKfEFRqNjua0rd8eNzlP7iYiTFl883fuCY\n\toE6dfR+ZtLSHbvfIOVO6WI/JYedO+AO20IShO8auvqynNbf7Ubtou5zWpbau/BKQVDng\n\tvXXJnyqBRt2vdVOWexhnJbl3pAZ9Ch9YIqaKNiR13nQS+5Awh4sKk3e9R0AgeWL2GFd1\n\ttIWQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ATafWyJ6xXo4ACe+NKNF8mWfMPDnfEfp65HhvrrY1wE=;\n\tb=lgP5ymAG8UqwdQ6hioBCSoQBnjUs574JJpkMdeggFSDDj4RQxs8sHReYyblNtCf2Zy\n\tfUjbV3EcBSqiaO31ly1jox8+3VR4v5LMpAZcTMmISbQD3NXhoScxOADMxqd+ZUGwUco/\n\t7IBi30oI9fRGhVcVdiyy3pqvTR2pPY3x1KtQK9yj/IX/TR3Wu5LgyFFMfjMJGFUQlxzx\n\tCyr814ISGROzB8NkkdLk2FnUcDt3UMYJU7flcj7ON5YEn3HfrsLB+/qNd+kwMt6jflrX\n\tdgixuJg/YeJ6hE57SPhMkdm2jXjDW84w+2lWObcx3uovIExMstzmcMVBE+k0e9RLL15W\n\tXJYQ==",
        "X-Gm-Message-State": "AHPjjUhN3rVeeUDfyMzvhYOLHC5fUSKgN6XCrh5K19+xnrS/yTTd7kW0\n\tuxjSwNosERJ2+Or6r9E=",
        "X-Google-Smtp-Source": "ADKCNb7oAjgE3bk/d+I33xRu5J8nqTJkvvxx/VlmKnzjme7T9Qu2MTGPresHpTJRKD7J5sEg77G2DA==",
        "X-Received": "by 10.84.132.65 with SMTP id 59mr15522692ple.366.1505172831677; \n\tMon, 11 Sep 2017 16:33:51 -0700 (PDT)",
        "From": "Cong Wang <xiyou.wangcong@gmail.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "jiri@mellanox.com, jakub.kicinski@netronome.com, jhs@mojatatu.com,\n\tCong Wang <xiyou.wangcong@gmail.com>, Eric Dumazet <edumazet@google.com>",
        "Subject": "[Patch net v3 1/3] net_sched: get rid of tcfa_rcu",
        "Date": "Mon, 11 Sep 2017 16:33:30 -0700",
        "Message-Id": "<20170911233332.7594-2-xiyou.wangcong@gmail.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170911233332.7594-1-xiyou.wangcong@gmail.com>",
        "References": "<20170911233332.7594-1-xiyou.wangcong@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "gen estimator has been rewritten in commit 1c0d32fde5bd\n(\"net_sched: gen_estimator: complete rewrite of rate estimators\"),\nthe caller is no longer needed to wait for a grace period.\nSo this patch gets rid of it.\n\nThis also completely closes a race condition between action free\npath and filter chain add/remove path for the following patch.\nBecause otherwise the nested RCU callback can't be caught by\nrcu_barrier().\n\nPlease see also the comments in code.\n\nCc: Jiri Pirko <jiri@mellanox.com>\nCc: Jamal Hadi Salim <jhs@mojatatu.com>\nCc: Eric Dumazet <edumazet@google.com>\nSigned-off-by: Cong Wang <xiyou.wangcong@gmail.com>\n---\n include/net/act_api.h |  2 --\n net/sched/act_api.c   | 17 ++++++++---------\n 2 files changed, 8 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/include/net/act_api.h b/include/net/act_api.h\nindex 8f3d5d8b5ae0..b944e0eb93be 100644\n--- a/include/net/act_api.h\n+++ b/include/net/act_api.h\n@@ -34,7 +34,6 @@ struct tc_action {\n \tstruct gnet_stats_queue\t\ttcfa_qstats;\n \tstruct net_rate_estimator __rcu *tcfa_rate_est;\n \tspinlock_t\t\t\ttcfa_lock;\n-\tstruct rcu_head\t\t\ttcfa_rcu;\n \tstruct gnet_stats_basic_cpu __percpu *cpu_bstats;\n \tstruct gnet_stats_queue __percpu *cpu_qstats;\n \tstruct tc_cookie\t*act_cookie;\n@@ -50,7 +49,6 @@ struct tc_action {\n #define tcf_qstats\tcommon.tcfa_qstats\n #define tcf_rate_est\tcommon.tcfa_rate_est\n #define tcf_lock\tcommon.tcfa_lock\n-#define tcf_rcu\t\tcommon.tcfa_rcu\n \n /* Update lastuse only if needed, to avoid dirtying a cache line.\n  * We use a temp variable to avoid fetching jiffies twice.\ndiff --git a/net/sched/act_api.c b/net/sched/act_api.c\nindex a306974e2fb4..fcd7dc7b807a 100644\n--- a/net/sched/act_api.c\n+++ b/net/sched/act_api.c\n@@ -53,10 +53,13 @@ static void tcf_action_goto_chain_exec(const struct tc_action *a,\n \tres->goto_tp = rcu_dereference_bh(chain->filter_chain);\n }\n \n-static void free_tcf(struct rcu_head *head)\n+/* XXX: For standalone actions, we don't need a RCU grace period either, because\n+ * actions are always connected to filters and filters are already destroyed in\n+ * RCU callbacks, so after a RCU grace period actions are already disconnected\n+ * from filters. Readers later can not find us.\n+ */\n+static void free_tcf(struct tc_action *p)\n {\n-\tstruct tc_action *p = container_of(head, struct tc_action, tcfa_rcu);\n-\n \tfree_percpu(p->cpu_bstats);\n \tfree_percpu(p->cpu_qstats);\n \n@@ -76,11 +79,7 @@ static void tcf_idr_remove(struct tcf_idrinfo *idrinfo, struct tc_action *p)\n \tidr_remove_ext(&idrinfo->action_idr, p->tcfa_index);\n \tspin_unlock_bh(&idrinfo->lock);\n \tgen_kill_estimator(&p->tcfa_rate_est);\n-\t/*\n-\t * gen_estimator est_timer() might access p->tcfa_lock\n-\t * or bstats, wait a RCU grace period before freeing p\n-\t */\n-\tcall_rcu(&p->tcfa_rcu, free_tcf);\n+\tfree_tcf(p);\n }\n \n int __tcf_idr_release(struct tc_action *p, bool bind, bool strict)\n@@ -259,7 +258,7 @@ void tcf_idr_cleanup(struct tc_action *a, struct nlattr *est)\n {\n \tif (est)\n \t\tgen_kill_estimator(&a->tcfa_rate_est);\n-\tcall_rcu(&a->tcfa_rcu, free_tcf);\n+\tfree_tcf(a);\n }\n EXPORT_SYMBOL(tcf_idr_cleanup);\n \n",
    "prefixes": [
        "net",
        "v3",
        "1/3"
    ]
}