get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807618,
    "url": "http://patchwork.ozlabs.org/api/patches/807618/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170830120306.6128-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": "<20170830120306.6128-7-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-08-30T12:03:04",
    "name": "[net-next,6/8] mlxsw: spectrum_dpipe: Add support for IPv6 host table dump",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "801162869d4ac6b3d1ae6ae893e196d32f78afe4",
    "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/20170830120306.6128-7-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 604,
            "url": "http://patchwork.ozlabs.org/api/series/604/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=604",
            "date": "2017-08-30T12:02:58",
            "name": "mlxsw: Add IPv6 host dpipe table",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/604/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807618/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807618/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=\"O4VEaQFb\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xj40V0WWwz9sQl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 22:03:38 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751463AbdH3MDg (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 08:03:36 -0400",
            "from mail-wr0-f195.google.com ([209.85.128.195]:37473 \"EHLO\n\tmail-wr0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751323AbdH3MDX (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 08:03:23 -0400",
            "by mail-wr0-f195.google.com with SMTP id k9so1289466wre.4\n\tfor <netdev@vger.kernel.org>; Wed, 30 Aug 2017 05:03:22 -0700 (PDT)",
            "from localhost (ip-89-177-136-28.net.upcbroadband.cz.\n\t[89.177.136.28]) by smtp.gmail.com with ESMTPSA id\n\tm128sm3393693wmd.23.2017.08.30.05.03.20\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 30 Aug 2017 05:03:20 -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=9X48KYDZ9fJf3VtnPwt97gXu2blmlZ9RJJ8yzBMK6L0=;\n\tb=O4VEaQFbPMaTBtUH1Os+hypkPCk/v1/OykiJGuHwZz7Ha5ovhZDr8hCGqDYX3HJt3t\n\t/viG22koqEHtbT6uFoc9sQFCg6i1j3WyWTVSffTFjpuEAwGk3wfiFCIOFO/DQBMS2ZbE\n\tty7KMpLLa1p2YzDwZvPdFLIkCWInjICo4x2EEHx3WNH+ublK4JeUkaD/wrgtq2cm/A6S\n\t//CUdDg5P+tiprgWxJLBuU5ore09rzvI+HDIkOHHx/D2hNUFQH5yj+uLDPK/IlJK9PIg\n\tbY0qrIdl78A/zmZlHi9+RQE+c9ImEZf1wD6Xs4qPGyfHaPRmMlOYLt/rAApyTCKxoc+z\n\t+cDw==",
        "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=9X48KYDZ9fJf3VtnPwt97gXu2blmlZ9RJJ8yzBMK6L0=;\n\tb=S53gxNqgPAPVpPeKF22H76jxU1PVcQh9py9Y4haG57gE15bdw0ibiU0MTNzrMEur4/\n\thVwz4Yl/fhWhaZm1/yWdp23NANFmQoGv4hcEBJOH7FxJqw8SyRhotWPe03y9DYOcmA7j\n\tZELw8UdC2y14T+YZsphlFARviL4kNZbKJVwOaLcQ4Zz/REEwzPMPKxDXNcYHiuqEv04u\n\ttH4I7gJTQNZzittcBE9pX5vEIZUMB3ClPXEldEJyluzcvTGQr6C4JjyZiA2oy/O5M9qI\n\tofXHpJ6qwsx7bwhh4/Ne+NDFDC55xFtnBMxb8b3TXWZJ2K3IHUivYS4vXS7dFdYmK1lh\n\tWHpQ==",
        "X-Gm-Message-State": "AHYfb5i0p1/pbPUmMbOiNZdsXf8GEkIo1m+1DSdOkaEZhedC94eW3YWh\n\t++WWPBmNwnyiz2Wq2yY=",
        "X-Received": "by 10.223.135.114 with SMTP id 47mr891294wrz.112.1504094601418; \n\tWed, 30 Aug 2017 05:03:21 -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 6/8] mlxsw: spectrum_dpipe: Add support for IPv6\n\thost table dump",
        "Date": "Wed, 30 Aug 2017 14:03:04 +0200",
        "Message-Id": "<20170830120306.6128-7-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170830120306.6128-1-jiri@resnulli.us>",
        "References": "<20170830120306.6128-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\nAdd support for IPv6 host table dump.\n\nSigned-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c   | 75 ++++++++++++++++++++--\n 1 file changed, 70 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\nindex 5924e97..75da2ef 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\n@@ -386,8 +386,19 @@ mlxsw_sp_dpipe_table_host_match_action_prepare(struct devlink_dpipe_match *match\n \n \tmatch = &matches[MLXSW_SP_DPIPE_TABLE_HOST_MATCH_DIP];\n \tmatch->type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;\n-\tmatch->header = &devlink_dpipe_header_ipv4;\n-\tmatch->field_id = DEVLINK_DPIPE_FIELD_IPV4_DST_IP;\n+\tswitch (type) {\n+\tcase AF_INET:\n+\t\tmatch->header = &devlink_dpipe_header_ipv4;\n+\t\tmatch->field_id = DEVLINK_DPIPE_FIELD_IPV4_DST_IP;\n+\t\tbreak;\n+\tcase AF_INET6:\n+\t\tmatch->header = &devlink_dpipe_header_ipv6;\n+\t\tmatch->field_id = DEVLINK_DPIPE_FIELD_IPV6_DST_IP;\n+\t\tbreak;\n+\tdefault:\n+\t\tWARN_ON(1);\n+\t\treturn;\n+\t}\n \n \taction->type = DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY;\n \taction->header = &devlink_dpipe_header_ethernet;\n@@ -424,7 +435,18 @@ mlxsw_sp_dpipe_table_host_entry_prepare(struct devlink_dpipe_entry *entry,\n \tmatch_value = &match_values[MLXSW_SP_DPIPE_TABLE_HOST_MATCH_DIP];\n \n \tmatch_value->match = match;\n-\tmatch_value->value_size = sizeof(u32);\n+\tswitch (type) {\n+\tcase AF_INET:\n+\t\tmatch_value->value_size = sizeof(u32);\n+\t\tbreak;\n+\tcase AF_INET6:\n+\t\tmatch_value->value_size = sizeof(struct in6_addr);\n+\t\tbreak;\n+\tdefault:\n+\t\tWARN_ON(1);\n+\t\treturn -EINVAL;\n+\t}\n+\n \tmatch_value->value = kmalloc(match_value->value_size, GFP_KERNEL);\n \tif (!match_value->value)\n \t\treturn -ENOMEM;\n@@ -479,6 +501,20 @@ mlxsw_sp_dpipe_table_host4_entry_fill(struct devlink_dpipe_entry *entry,\n }\n \n static void\n+mlxsw_sp_dpipe_table_host6_entry_fill(struct devlink_dpipe_entry *entry,\n+\t\t\t\t      struct mlxsw_sp_neigh_entry *neigh_entry,\n+\t\t\t\t      struct mlxsw_sp_rif *rif)\n+{\n+\tstruct in6_addr *dip;\n+\tunsigned char *ha;\n+\n+\tha = mlxsw_sp_neigh_entry_ha(neigh_entry);\n+\tdip = mlxsw_sp_neigh6_entry_dip(neigh_entry);\n+\n+\t__mlxsw_sp_dpipe_table_host_entry_fill(entry, rif, ha, dip);\n+}\n+\n+static void\n mlxsw_sp_dpipe_table_host_entry_fill(struct mlxsw_sp *mlxsw_sp,\n \t\t\t\t     struct devlink_dpipe_entry *entry,\n \t\t\t\t     struct mlxsw_sp_neigh_entry *neigh_entry,\n@@ -487,7 +523,18 @@ mlxsw_sp_dpipe_table_host_entry_fill(struct mlxsw_sp *mlxsw_sp,\n {\n \tint err;\n \n-\tmlxsw_sp_dpipe_table_host4_entry_fill(entry, neigh_entry, rif);\n+\tswitch (type) {\n+\tcase AF_INET:\n+\t\tmlxsw_sp_dpipe_table_host4_entry_fill(entry, neigh_entry, rif);\n+\t\tbreak;\n+\tcase AF_INET6:\n+\t\tmlxsw_sp_dpipe_table_host6_entry_fill(entry, neigh_entry, rif);\n+\t\tbreak;\n+\tdefault:\n+\t\tWARN_ON(1);\n+\t\treturn;\n+\t}\n+\n \terr = mlxsw_sp_neigh_counter_get(mlxsw_sp, neigh_entry,\n \t\t\t\t\t &entry->counter);\n \tif (!err)\n@@ -526,7 +573,13 @@ mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp,\n \n \t\trif_neigh_count = 0;\n \t\tmlxsw_sp_rif_neigh_for_each(neigh_entry, rif) {\n-\t\t\tif (mlxsw_sp_neigh_entry_type(neigh_entry) != type)\n+\t\t\tint neigh_type = mlxsw_sp_neigh_entry_type(neigh_entry);\n+\n+\t\t\tif (neigh_type != type)\n+\t\t\t\tcontinue;\n+\n+\t\t\tif (neigh_type == AF_INET6 &&\n+\t\t\t    mlxsw_sp_neigh_ipv6_ignore(neigh_entry))\n \t\t\t\tcontinue;\n \n \t\t\tif (rif_neigh_count < rif_neigh_skip)\n@@ -714,6 +767,17 @@ mlxsw_sp_dpipe_table_host6_matches_dump(void *priv, struct sk_buff *skb)\n \treturn mlxsw_sp_dpipe_table_host_matches_dump(skb, AF_INET6);\n }\n \n+static int\n+mlxsw_sp_dpipe_table_host6_entries_dump(void *priv, bool counters_enabled,\n+\t\t\t\t\tstruct devlink_dpipe_dump_ctx *dump_ctx)\n+{\n+\tstruct mlxsw_sp *mlxsw_sp = priv;\n+\n+\treturn mlxsw_sp_dpipe_table_host_entries_dump(mlxsw_sp,\n+\t\t\t\t\t\t      counters_enabled,\n+\t\t\t\t\t\t      dump_ctx, AF_INET6);\n+}\n+\n static u64 mlxsw_sp_dpipe_table_host6_size_get(void *priv)\n {\n \tstruct mlxsw_sp *mlxsw_sp = priv;\n@@ -724,6 +788,7 @@ static u64 mlxsw_sp_dpipe_table_host6_size_get(void *priv)\n static struct devlink_dpipe_table_ops mlxsw_sp_host6_ops = {\n \t.matches_dump = mlxsw_sp_dpipe_table_host6_matches_dump,\n \t.actions_dump = mlxsw_sp_dpipe_table_host_actions_dump,\n+\t.entries_dump = mlxsw_sp_dpipe_table_host6_entries_dump,\n \t.size_get = mlxsw_sp_dpipe_table_host6_size_get,\n };\n \n",
    "prefixes": [
        "net-next",
        "6/8"
    ]
}