get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816701,
    "url": "http://patchwork.ozlabs.org/api/patches/816701/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170921064338.1282-5-jiri@resnulli.us/",
    "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": "<20170921064338.1282-5-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-21T06:43:30",
    "name": "[net-next,04/12] ipmr: Send FIB notifications on MFC and VIF entries",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "54ba431d3610402cb77970f00c9cde58f1b6bda1",
    "submitter": {
        "id": 15321,
        "url": "http://patchwork.ozlabs.org/api/people/15321/?format=api",
        "name": "Jiri Pirko",
        "email": "jiri@resnulli.us"
    },
    "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/20170921064338.1282-5-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 4309,
            "url": "http://patchwork.ozlabs.org/api/series/4309/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4309",
            "date": "2017-09-21T06:43:26",
            "name": "mlxsw: Add support for offloading IPv4 multicast routes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4309/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816701/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816701/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=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"bcj3jNqv\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyRt4389Nz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 16:44:28 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751693AbdIUGo0 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 02:44:26 -0400",
            "from mail-wm0-f67.google.com ([74.125.82.67]:35171 \"EHLO\n\tmail-wm0-f67.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751892AbdIUGnn (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 02:43:43 -0400",
            "by mail-wm0-f67.google.com with SMTP id e64so4294862wmi.2\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 23:43:43 -0700 (PDT)",
            "from localhost (ip-89-177-125-82.net.upcbroadband.cz.\n\t[89.177.125.82]) by smtp.gmail.com with ESMTPSA id\n\tc46sm507874wrg.92.2017.09.20.23.43.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Sep 2017 23:43:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=hlhVAAgawPsjKJKRnWIm3o8/PlJKkHGAkp69arpkm7Y=;\n\tb=bcj3jNqvKHy5ERqvVrN4k7GhFRvq8PrR2qFvEmvqlVqhQsKfCfXqshK50W3lJ/Hsav\n\tagca19DqPurTOviy8X1KXv7+IkQz7PI6MIzMZpr9xK8p9NiZ92q38iJo6dU2c4bEr5Kj\n\tWK04UchuqYprZw81iG1FOPfCyr86bcwWvlM4R36ap/4ilrMew1y6NTsES1SaehsT/6jO\n\tmIEb9D5/ml/d2aCO4QdWE5VfeU7eiWodW7Ae47Qx21vWUlv5N3LZmmKjuYv9/oaikdbK\n\tVOj7YFAqrEY/zSwNNMF8cngTfRt4e5NI7XBDnqW8QfqSFQB1wKJnKloncdMc4QgLgWgZ\n\tAuAA==",
        "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=hlhVAAgawPsjKJKRnWIm3o8/PlJKkHGAkp69arpkm7Y=;\n\tb=uZDpuqDSz3CUbHDcfxN8skP6OxzKNXB+rxzjPokSN6wMP9zw5ELW1RCMJw6FLUY9Dl\n\t4tuNG5f9DqRhIfUXR3lHakT83MNxQwsw/33H0GUO9Ji9ERTe/viKBpUkDrX5YwCIv219\n\tVRuCyrN0OVrkS9KXjGSxbL61bfcvPlLh1c++4IiW8W+FTNd1qVx9h+VLuQqb39/+c0m1\n\tng3KCslZyAKSSdftbYJKlawlxknDwLsqP6p3XuElOhJ1cTG3ldhgUzG3tuWcTcSPnFfL\n\tUxyrOZMkLGWz7WMKRd0g5RDw/mzp/mHsiD40gYnzMXRRgX26Fhs9WhFcJRlsGpASUG7D\n\tmrNQ==",
        "X-Gm-Message-State": "AHPjjUitSG5Vd4VplXhTUQ9DHmI9CrmUMsVa95wkIKmnHyhL+OovsXcO\n\t2ek2HpJ+Er9wOigVw1R04IOb96gZ",
        "X-Google-Smtp-Source": "AOwi7QDduQYhrKhPnBPftLPgk7BDamKGbGTyQAMACJ91yNDMwr0Ac5rQpQbv4ZVuXdIU0y9jjIW40A==",
        "X-Received": "by 10.28.47.200 with SMTP id v191mr5722392wmv.31.1505976222351; \n\tWed, 20 Sep 2017 23:43:42 -0700 (PDT)",
        "From": "Jiri Pirko <jiri@resnulli.us>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com",
        "Subject": "[patch net-next 04/12] ipmr: Send FIB notifications on MFC and VIF\n\tentries",
        "Date": "Thu, 21 Sep 2017 08:43:30 +0200",
        "Message-Id": "<20170921064338.1282-5-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170921064338.1282-1-jiri@resnulli.us>",
        "References": "<20170921064338.1282-1-jiri@resnulli.us>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Yotam Gigi <yotamg@mellanox.com>\n\nUse the newly introduced notification chain to send events upon VIF and MFC\naddition and deletion. The MFC notifications are sent only on resolved MFC\nentries, as unresolved cannot be offloaded.\n\nSigned-off-by: Yotam Gigi <yotamg@mellanox.com>\nReviewed-by: Ido Schimmel <idosch@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n net/ipv4/ipmr.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 53 insertions(+)",
    "diff": "diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\nindex 9d331a74..7891d95 100644\n--- a/net/ipv4/ipmr.c\n+++ b/net/ipv4/ipmr.c\n@@ -627,6 +627,27 @@ static int call_ipmr_vif_entry_notifier(struct notifier_block *nb,\n \treturn call_fib_notifier(nb, net, event_type, &info.info);\n }\n \n+static int call_ipmr_vif_entry_notifiers(struct net *net,\n+\t\t\t\t\t enum fib_event_type event_type,\n+\t\t\t\t\t struct vif_device *vif,\n+\t\t\t\t\t vifi_t vif_index, u32 tb_id)\n+{\n+\tstruct vif_entry_notifier_info info = {\n+\t\t.info = {\n+\t\t\t.family = RTNL_FAMILY_IPMR,\n+\t\t\t.net = net,\n+\t\t},\n+\t\t.dev = vif->dev,\n+\t\t.vif_index = vif_index,\n+\t\t.vif_flags = vif->flags,\n+\t\t.tb_id = tb_id,\n+\t};\n+\n+\tASSERT_RTNL();\n+\tnet->ipv4.ipmr_seq++;\n+\treturn call_fib_notifiers(net, event_type, &info.info);\n+}\n+\n static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n \t\t\t\t\tstruct net *net,\n \t\t\t\t\tenum fib_event_type event_type,\n@@ -644,6 +665,24 @@ static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n \treturn call_fib_notifier(nb, net, event_type, &info.info);\n }\n \n+static int call_ipmr_mfc_entry_notifiers(struct net *net,\n+\t\t\t\t\t enum fib_event_type event_type,\n+\t\t\t\t\t struct mfc_cache *mfc, u32 tb_id)\n+{\n+\tstruct mfc_entry_notifier_info info = {\n+\t\t.info = {\n+\t\t\t.family = RTNL_FAMILY_IPMR,\n+\t\t\t.net = net,\n+\t\t},\n+\t\t.mfc = mfc,\n+\t\t.tb_id = tb_id\n+\t};\n+\n+\tASSERT_RTNL();\n+\tnet->ipv4.ipmr_seq++;\n+\treturn call_fib_notifiers(net, event_type, &info.info);\n+}\n+\n /**\n  *\tvif_delete - Delete a VIF entry\n  *\t@notify: Set to 1, if the caller is a notifier_call\n@@ -651,6 +690,7 @@ static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n static int vif_delete(struct mr_table *mrt, int vifi, int notify,\n \t\t      struct list_head *head)\n {\n+\tstruct net *net = read_pnet(&mrt->net);\n \tstruct vif_device *v;\n \tstruct net_device *dev;\n \tstruct in_device *in_dev;\n@@ -660,6 +700,10 @@ static int vif_delete(struct mr_table *mrt, int vifi, int notify,\n \n \tv = &mrt->vif_table[vifi];\n \n+\tif (VIF_EXISTS(mrt, vifi))\n+\t\tcall_ipmr_vif_entry_notifiers(net, FIB_EVENT_VIF_DEL, v, vifi,\n+\t\t\t\t\t      mrt->id);\n+\n \twrite_lock_bh(&mrt_lock);\n \tdev = v->dev;\n \tv->dev = NULL;\n@@ -909,6 +953,7 @@ static int vif_add(struct net *net, struct mr_table *mrt,\n \tif (vifi+1 > mrt->maxvif)\n \t\tmrt->maxvif = vifi+1;\n \twrite_unlock_bh(&mrt_lock);\n+\tcall_ipmr_vif_entry_notifiers(net, FIB_EVENT_VIF_ADD, v, vifi, mrt->id);\n \treturn 0;\n }\n \n@@ -1209,6 +1254,7 @@ static int ipmr_cache_unresolved(struct mr_table *mrt, vifi_t vifi,\n \n static int ipmr_mfc_delete(struct mr_table *mrt, struct mfcctl *mfc, int parent)\n {\n+\tstruct net *net = read_pnet(&mrt->net);\n \tstruct mfc_cache *c;\n \n \t/* The entries are added/deleted only under RTNL */\n@@ -1220,6 +1266,7 @@ static int ipmr_mfc_delete(struct mr_table *mrt, struct mfcctl *mfc, int parent)\n \t\treturn -ENOENT;\n \trhltable_remove(&mrt->mfc_hash, &c->mnode, ipmr_rht_params);\n \tlist_del_rcu(&c->list);\n+\tcall_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, c, mrt->id);\n \tmroute_netlink_event(mrt, c, RTM_DELROUTE);\n \tipmr_cache_put(c);\n \n@@ -1248,6 +1295,8 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,\n \t\tif (!mrtsock)\n \t\t\tc->mfc_flags |= MFC_STATIC;\n \t\twrite_unlock_bh(&mrt_lock);\n+\t\tcall_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_REPLACE, c,\n+\t\t\t\t\t      mrt->id);\n \t\tmroute_netlink_event(mrt, c, RTM_NEWROUTE);\n \t\treturn 0;\n \t}\n@@ -1297,6 +1346,7 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,\n \t\tipmr_cache_resolve(net, mrt, uc, c);\n \t\tipmr_cache_free(uc);\n \t}\n+\tcall_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_ADD, c, mrt->id);\n \tmroute_netlink_event(mrt, c, RTM_NEWROUTE);\n \treturn 0;\n }\n@@ -1304,6 +1354,7 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,\n /* Close the multicast socket, and clear the vif tables etc */\n static void mroute_clean_tables(struct mr_table *mrt, bool all)\n {\n+\tstruct net *net = read_pnet(&mrt->net);\n \tstruct mfc_cache *c, *tmp;\n \tLIST_HEAD(list);\n \tint i;\n@@ -1322,6 +1373,8 @@ static void mroute_clean_tables(struct mr_table *mrt, bool all)\n \t\t\tcontinue;\n \t\trhltable_remove(&mrt->mfc_hash, &c->mnode, ipmr_rht_params);\n \t\tlist_del_rcu(&c->list);\n+\t\tcall_ipmr_mfc_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, c,\n+\t\t\t\t\t      mrt->id);\n \t\tmroute_netlink_event(mrt, c, RTM_DELROUTE);\n \t\tipmr_cache_put(c);\n \t}\n",
    "prefixes": [
        "net-next",
        "04/12"
    ]
}