get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818946,
    "url": "http://patchwork.ozlabs.org/api/patches/818946/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170927062322.5476-7-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": "<20170927062322.5476-7-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-27T06:23:16",
    "name": "[net-next,v3,06/12] net: mroute: Check if rule is a default rule",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "60a0ad68d78b07b1bf54d7189a1b8d5b67b836f0",
    "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/20170927062322.5476-7-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 5290,
            "url": "http://patchwork.ozlabs.org/api/series/5290/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=5290",
            "date": "2017-09-27T06:23:12",
            "name": "mlxsw: Add support for offloading IPv4 multicast routes",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/5290/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818946/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818946/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=\"mEeT1lCf\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y277X6d2Tz9sBW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 16:23:52 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751909AbdI0GXl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 02:23:41 -0400",
            "from mail-wr0-f193.google.com ([209.85.128.193]:37623 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751521AbdI0GXa (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 02:23:30 -0400",
            "by mail-wr0-f193.google.com with SMTP id u48so3581789wrf.4\n\tfor <netdev@vger.kernel.org>; Tue, 26 Sep 2017 23:23:30 -0700 (PDT)",
            "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tw4sm15490370wrc.78.2017.09.26.23.23.28\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 26 Sep 2017 23:23:29 -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=rizOjhvf2sALsKBVyOhVulYodIxD6O+ttxXhQOVaFYY=;\n\tb=mEeT1lCfyfNCrJEe3TDDDYMxewdl3gwEegqQiKj4JKT61KictFCDmGvE+TxsldT6V6\n\tEAd+jQG5ciZqiNwHKPQ296tkb0GMJlpZSkfC3EAPxg/RB/IMwsv4yAnarGCAbZyAGdFE\n\t5csOk4Oq3MV5CaQTbTY271bLVbIBX+BgQVWtXGLVH7s3/Xk85Q6fr6WCpnOQV8PBpQ8d\n\ty8nDlVoiHui3QROptji1h8bHPjA3r8i4YkdMBH3aPjuXPDpsJ/8RagAn4enR7+Dm6fVW\n\tluMbHswNVwpgZwJncnQPQZh2OON16cnj9EAaeCE0iYFfeWqSCcnB2igpNaaHFJ7Hkona\n\tQTjA==",
        "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=rizOjhvf2sALsKBVyOhVulYodIxD6O+ttxXhQOVaFYY=;\n\tb=hpefbmwLWJ6R0JhIhcN1E3BDoLGmQq3h/hJy7gcI8k8JSlwO83z5erDZXDQHe0GLnp\n\t2NDoEUhGTQobtfdObooI0rsNpRpFsifLAZJYIrdJu0R4FUVMXBo2x+wom7rQmcsKmVEe\n\tfESv6F9XS//X9uqKQAC8wd6KMo29Ryeks/MIOmltOy0dq4gZRniMXoLqIEo0oQkKbqfE\n\t8sNFU4eVVwJpTMgJBnjKeFzL7F2PMB9U696+tFyeL7RSpGXQm22GePzPZoskA64es0Ka\n\tsg7jGsGpxgNjzMZXlmDMxNdYEwGVZa5+2UQyK7MWev7MznCr4dcA9DUfqueTsx+kDkci\n\tEeFw==",
        "X-Gm-Message-State": "AHPjjUju+AYPxJyUe99lcnETBWY7nuES6XJc2g0jjdQx7rYrndxTnmlt\n\tkd1tRuCEpST569Mu74ta9Gj22zyU",
        "X-Google-Smtp-Source": "AOwi7QD8eJqHRVLruPAwUkGfSKmtWNvqYtKQ5WW9yzyBsmannExeNWO8OWlJ+xDRUcRz6gdJRHBVRg==",
        "X-Received": "by 10.223.160.46 with SMTP id k43mr376804wrk.113.1506493409392; \n\tTue, 26 Sep 2017 23:23:29 -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, nikolay@cumulusnetworks.com, andrew@lunn.ch,\n\tlinyunsheng@huawei.com",
        "Subject": "[patch net-next v3 06/12] net: mroute: Check if rule is a default\n\trule",
        "Date": "Wed, 27 Sep 2017 08:23:16 +0200",
        "Message-Id": "<20170927062322.5476-7-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170927062322.5476-1-jiri@resnulli.us>",
        "References": "<20170927062322.5476-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\nWhen the ipmr starts, it adds one default FIB rule that matches all packets\nand sends them to the DEFAULT (multicast) FIB table. A more complex rule\ncan be added by user to specify that for a specific interface, a packet\nshould be look up at either an arbitrary table or according to the l3mdev\nof the interface.\n\nFor drivers willing to offload the ipmr logic into a hardware but don't\nwant to offload all the FIB rules functionality, provide a function that\ncan indicate whether the FIB rule is the default multicast rule, thus only\none routing table is needed.\n\nThis way, a driver can register to the FIB notification chain, get\nnotifications about FIB rules added and trigger some kind of an internal\nabort mechanism when a non default rule is added by the user.\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---\nv2->v3:\n - Use the already existing ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES\nv1->v2:\n - Update the lastuse MFC entry field too, in addition to packets an bytes.\n---\n include/linux/mroute.h |  7 +++++++\n net/ipv4/ipmr.c        | 12 ++++++++++++\n 2 files changed, 19 insertions(+)",
    "diff": "diff --git a/include/linux/mroute.h b/include/linux/mroute.h\nindex 5566580..b072a84 100644\n--- a/include/linux/mroute.h\n+++ b/include/linux/mroute.h\n@@ -5,6 +5,7 @@\n #include <linux/pim.h>\n #include <linux/rhashtable.h>\n #include <net/sock.h>\n+#include <net/fib_rules.h>\n #include <net/fib_notifier.h>\n #include <uapi/linux/mroute.h>\n \n@@ -19,6 +20,7 @@ int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);\n int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);\n int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);\n int ip_mr_init(void);\n+bool ipmr_rule_default(const struct fib_rule *rule);\n #else\n static inline int ip_mroute_setsockopt(struct sock *sock, int optname,\n \t\t\t\t       char __user *optval, unsigned int optlen)\n@@ -46,6 +48,11 @@ static inline int ip_mroute_opt(int opt)\n {\n \treturn 0;\n }\n+\n+static inline bool ipmr_rule_default(const struct fib_rule *rule)\n+{\n+\treturn true;\n+}\n #endif\n \n struct vif_device {\ndiff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\nindex 2a795d2..292a8e8 100644\n--- a/net/ipv4/ipmr.c\n+++ b/net/ipv4/ipmr.c\n@@ -274,6 +274,12 @@ static unsigned int ipmr_rules_seq_read(struct net *net)\n {\n \treturn fib_rules_seq_read(net, RTNL_FAMILY_IPMR);\n }\n+\n+bool ipmr_rule_default(const struct fib_rule *rule)\n+{\n+\treturn fib_rule_matchall(rule) && rule->table == RT_TABLE_DEFAULT;\n+}\n+EXPORT_SYMBOL(ipmr_rule_default);\n #else\n #define ipmr_for_each_table(mrt, net) \\\n \tfor (mrt = net->ipv4.mrt; mrt; mrt = NULL)\n@@ -318,6 +324,12 @@ static unsigned int ipmr_rules_seq_read(struct net *net)\n {\n \treturn 0;\n }\n+\n+bool ipmr_rule_default(const struct fib_rule *rule)\n+{\n+\treturn true;\n+}\n+EXPORT_SYMBOL(ipmr_rule_default);\n #endif\n \n static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg,\n",
    "prefixes": [
        "net-next",
        "v3",
        "06/12"
    ]
}