get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818096,
    "url": "http://patchwork.ozlabs.org/api/patches/818096/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170925083230.1193-4-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": "<20170925083230.1193-4-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-25T08:32:23",
    "name": "[net-next,03/10] mlxsw: spectrum_router: Keep nexthops in a linked list",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "74d5068892e0c901cf0d401d6814a3bc02027b77",
    "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/20170925083230.1193-4-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 4898,
            "url": "http://patchwork.ozlabs.org/api/series/4898/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4898",
            "date": "2017-09-25T08:32:21",
            "name": "mlxsw: Add router adjacency dpipe table",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4898/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818096/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818096/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=\"Oc+RX2Ce\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0y5z6WMJz9t62\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 18:33:27 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934212AbdIYIdZ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 04:33:25 -0400",
            "from mail-wm0-f66.google.com ([74.125.82.66]:36495 \"EHLO\n\tmail-wm0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S933826AbdIYIce (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 04:32:34 -0400",
            "by mail-wm0-f66.google.com with SMTP id r136so6474990wmf.3\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 01:32:34 -0700 (PDT)",
            "from localhost (ip-89-177-136-69.net.upcbroadband.cz.\n\t[89.177.136.69]) by smtp.gmail.com with ESMTPSA id\n\tb89sm11477246wrd.42.2017.09.25.01.32.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 01:32:33 -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=gnVW+uF43EYT3p2euUBIqk56ybwDGvf/MkGWoZF68mY=;\n\tb=Oc+RX2Cet0hmmLHuvTlSpTcVceUMegcpfq+AQW3JYMNRWbRuj0FBi2RVZ0QSkPv5b6\n\tqilpOoskGaT9u/eSqpssriQcFp1YuU6yyZUjnaAqj7+oF8dwZASHLBkslhCqEs/Ad+Hh\n\taQIBbXoXaJ6p2/yNqGFom9mGUiaonRDnd/KE3sulaWtCq/gVU4AtyGz6inA8VVZblYFa\n\tA3/kqLnkxK3p3bXjG99hYZ3A7scbPhEsNTu7cDeCqL/8YnWdjpNySIVGPRiTu2+8y+UC\n\t2njyxVvsCL/N0CNa3kZfVizTrdvBslXizMhqFs4bJBzPaWnIzBMjEes7fMGr6JVDlFFI\n\tgNUQ==",
        "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=gnVW+uF43EYT3p2euUBIqk56ybwDGvf/MkGWoZF68mY=;\n\tb=HWhkgfSAkJ3pyyHOs4dMp9DW22xxmJYWCnvg3Z5VLfgTnxrnJhDS9u5CgVbnr22hSp\n\tiGmmWD6ivdQrLf+TtlBVuWVf4sT+3K85QaqHYvgquVQVQ4d5lCBCz3ZJ4m0Zlpapy2qN\n\tpPvJtR8jSlJkXXzkQUYOAbXN2pxQunpKIbysNzEPBngYo6tE27NhgNqpf3FmHUDQvT07\n\tGn8IRkO1VvmMGBG7yLHKovKwZkuTX71lHnCeUxz2Uwywrt5IO8w9Rf6JZnSc4/cfoi24\n\tVTcenRmYjFiKtkFQyv3sXJ3YedEDcKtZZggHHwg22AL5+3PR0LgCfA7YJFJogRdloVZW\n\tQTgQ==",
        "X-Gm-Message-State": "AHPjjUhmVHmcmjf6cSKcYzCY3FSRmesD3P4gAL8LRlnWQvOyP7+Vixsc\n\tK8ZtEJKIba/AHouSVYatgrQgDbLQ",
        "X-Google-Smtp-Source": "AOwi7QCK1fPivftQheesuFxFd1txyajYejYMV4H7K3BZrfB8DZsmH/OoezA5AfgEItBCZkNzmPvERg==",
        "X-Received": "by 10.28.38.69 with SMTP id m66mr8888435wmm.34.1506328353547;\n\tMon, 25 Sep 2017 01:32:33 -0700 (PDT)",
        "From": "Jiri Pirko <jiri@resnulli.us>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, arkadis@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com",
        "Subject": "[patch net-next 03/10] mlxsw: spectrum_router: Keep nexthops in a\n\tlinked list",
        "Date": "Mon, 25 Sep 2017 10:32:23 +0200",
        "Message-Id": "<20170925083230.1193-4-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170925083230.1193-1-jiri@resnulli.us>",
        "References": "<20170925083230.1193-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: Arkadi Sharshevsky <arkadis@mellanox.com>\n\nKeep nexthops in a linked list for easy access.\n\nSigned-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 9 +++++++++\n 1 file changed, 9 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex 16c041b..e8c2170 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -80,6 +80,7 @@ struct mlxsw_sp_router {\n \tstruct rhashtable neigh_ht;\n \tstruct rhashtable nexthop_group_ht;\n \tstruct rhashtable nexthop_ht;\n+\tstruct list_head nexthop_list;\n \tstruct {\n \t\tstruct mlxsw_sp_lpm_tree *trees;\n \t\tunsigned int tree_count;\n@@ -2043,6 +2044,7 @@ struct mlxsw_sp_nexthop_key {\n struct mlxsw_sp_nexthop {\n \tstruct list_head neigh_list_node; /* member of neigh entry list */\n \tstruct list_head rif_list_node;\n+\tstruct list_head router_list_node;\n \tstruct mlxsw_sp_nexthop_group *nh_grp; /* pointer back to the group\n \t\t\t\t\t\t* this belongs to\n \t\t\t\t\t\t*/\n@@ -2799,6 +2801,8 @@ static int mlxsw_sp_nexthop4_init(struct mlxsw_sp *mlxsw_sp,\n \tif (err)\n \t\treturn err;\n \n+\tlist_add_tail(&nh->router_list_node, &mlxsw_sp->router->nexthop_list);\n+\n \tif (!dev)\n \t\treturn 0;\n \n@@ -2822,6 +2826,7 @@ static void mlxsw_sp_nexthop4_fini(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t   struct mlxsw_sp_nexthop *nh)\n {\n \tmlxsw_sp_nexthop4_type_fini(mlxsw_sp, nh);\n+\tlist_del(&nh->router_list_node);\n \tmlxsw_sp_nexthop_remove(mlxsw_sp, nh);\n }\n \n@@ -4060,6 +4065,8 @@ static int mlxsw_sp_nexthop6_init(struct mlxsw_sp *mlxsw_sp,\n \tnh->nh_grp = nh_grp;\n \tmemcpy(&nh->gw_addr, &rt->rt6i_gateway, sizeof(nh->gw_addr));\n \n+\tlist_add_tail(&nh->router_list_node, &mlxsw_sp->router->nexthop_list);\n+\n \tif (!dev)\n \t\treturn 0;\n \tnh->ifindex = dev->ifindex;\n@@ -4071,6 +4078,7 @@ static void mlxsw_sp_nexthop6_fini(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t   struct mlxsw_sp_nexthop *nh)\n {\n \tmlxsw_sp_nexthop6_type_fini(mlxsw_sp, nh);\n+\tlist_del(&nh->router_list_node);\n }\n \n static bool mlxsw_sp_rt6_is_gateway(const struct mlxsw_sp *mlxsw_sp,\n@@ -6178,6 +6186,7 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp)\n \tif (err)\n \t\tgoto err_nexthop_group_ht_init;\n \n+\tINIT_LIST_HEAD(&mlxsw_sp->router->nexthop_list);\n \terr = mlxsw_sp_lpm_init(mlxsw_sp);\n \tif (err)\n \t\tgoto err_lpm_init;\n",
    "prefixes": [
        "net-next",
        "03/10"
    ]
}