get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808292,
    "url": "http://patchwork.ozlabs.org/api/patches/808292/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170831155919.1366-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": "<20170831155919.1366-4-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-08-31T15:59:14",
    "name": "[net-next,repost,3/8] mlxsw: spectrum_dpipe: Add IPv6 host table initial support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e58ec4d2f9de59835486eb99567420968b3e1451",
    "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/20170831155919.1366-4-jiri@resnulli.us/mbox/",
    "series": [
        {
            "id": 863,
            "url": "http://patchwork.ozlabs.org/api/series/863/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=863",
            "date": "2017-08-31T15:59:11",
            "name": "mlxsw: Add IPv6 host dpipe table",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/863/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808292/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808292/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=\"09pVaYPi\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjnBD6W6qz9sD9\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 01:59:32 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751804AbdHaP7a (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 11:59:30 -0400",
            "from mail-wr0-f193.google.com ([209.85.128.193]:34675 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751583AbdHaP72 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 11:59:28 -0400",
            "by mail-wr0-f193.google.com with SMTP id z91so29436wrc.1\n\tfor <netdev@vger.kernel.org>; Thu, 31 Aug 2017 08:59:27 -0700 (PDT)",
            "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id 7sm63027wrd.22.2017.08.31.08.59.25\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 31 Aug 2017 08:59:25 -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=iBjJ/WtfN8A6X/1fUR8OTwpoT5wToiTl6IljQ4+At/g=;\n\tb=09pVaYPizJKW1VaPtHV9++3GF2hIf4F4mGuGB6fCHPUEaRVZ+Un2Q9ta7gzkgS4O04\n\tBX2kS1IvViYX4cCjOZ1pznF8REBsb37fHSxEYroZXW7VYuq48tQOPHjKexbDFIzGPlKy\n\t5/jelHOpnZmrsD04iPB6h+052lREHVnNWMzrLiULdHdaECjH9Q5fvyCTQ6Tu5ctw2nNa\n\tk7Vfv78UR1b6nmesWERJmuXbu0wcwNtsXV/MhDJPwRi8ZF602BUv1iRuz/edXbe3IU9f\n\tdhd8CE9B77HFW+exkHoQvxtFsS5HIzmqwrr0j4y4A9+FhfKXHz1oFi04i3Rn5MPG4pJi\n\tgw1w==",
        "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=iBjJ/WtfN8A6X/1fUR8OTwpoT5wToiTl6IljQ4+At/g=;\n\tb=MHDfu+gp6WZX/4sfnqIaOQUmW95vVGs9AHdT59kQOOePy1CdmkNQDJi4lIxWNIeYNh\n\tcL4YPUm4+TZVBw2lLR8AtxeBo976D4eARgKMF81TyyddIjzp6A/yhDaiEJnFvqJby/yz\n\tMgot5zxqQM9LhYTeel76lbbA+6gr2QPQJ0jUFymhClGyZEcCD2+igrJgFlFEKqD+ozXz\n\t+1Srxmv3YJhZ+NToXxze0V0gqoR9cG0e53i2EWadQsSjWZP2bhL7N4gBUOglgUC/Z1Zk\n\tP6yCHJeUJdB4pgHdjxOqqMw7EQg5gPesPof/gJftLiz5jp4KDCZ9/bGW3bOHtt3uigKz\n\t7MJQ==",
        "X-Gm-Message-State": "AHYfb5iOZ+BI+GVhAc5dGk6J4ojgdDyIo93/IANIj8RFzC9U+XfG43PE\n\tgZKKryRYzpBqlbT8/ew=",
        "X-Google-Smtp-Source": "ADKCNb5zM6K66m/3uzaG/gzkSTII8iHS2RmzWFLOynItn9/OaZfJb23e6BYfodv486UcD7ssv4OqlQ==",
        "X-Received": "by 10.223.143.49 with SMTP id p46mr3356421wrb.31.1504195166380; \n\tThu, 31 Aug 2017 08:59:26 -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 repost 3/8] mlxsw: spectrum_dpipe: Add IPv6 host\n\ttable initial support",
        "Date": "Thu, 31 Aug 2017 17:59:14 +0200",
        "Message-Id": "<20170831155919.1366-4-jiri@resnulli.us>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170831155919.1366-1-jiri@resnulli.us>",
        "References": "<20170831155919.1366-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 IPv6 host table initial support. The action behavior for both IPv4/6\ntables is the same, thus the same action dump op is used. Neighbors with\nlink local address are ignored.\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   | 76 ++++++++++++++++++++--\n .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h   |  1 +\n 2 files changed, 71 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\nindex 3ea1314..93ba6a6 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c\n@@ -76,6 +76,7 @@ static struct devlink_dpipe_header *mlxsw_dpipe_headers[] = {\n \t&mlxsw_sp_dpipe_header_metadata,\n \t&devlink_dpipe_header_ethernet,\n \t&devlink_dpipe_header_ipv4,\n+\t&devlink_dpipe_header_ipv6,\n };\n \n static struct devlink_dpipe_headers mlxsw_sp_dpipe_headers = {\n@@ -328,9 +329,21 @@ static int mlxsw_sp_dpipe_table_host_matches_dump(struct sk_buff *skb, int type)\n \tif (err)\n \t\treturn err;\n \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.type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;\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.type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;\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 -EINVAL;\n+\t}\n \n \treturn devlink_dpipe_match_put(skb, &match);\n }\n@@ -342,7 +355,7 @@ mlxsw_sp_dpipe_table_host4_matches_dump(void *priv, struct sk_buff *skb)\n }\n \n static int\n-mlxsw_sp_dpipe_table_host4_actions_dump(void *priv, struct sk_buff *skb)\n+mlxsw_sp_dpipe_table_host_actions_dump(void *priv, struct sk_buff *skb)\n {\n \tstruct devlink_dpipe_action action = {0};\n \n@@ -648,8 +661,15 @@ mlxsw_sp_dpipe_table_host_size_get(struct mlxsw_sp *mlxsw_sp, int type)\n \t\tif (!rif)\n \t\t\tcontinue;\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\tsize++;\n \t\t}\n \t}\n@@ -667,7 +687,7 @@ static u64 mlxsw_sp_dpipe_table_host4_size_get(void *priv)\n \n static struct devlink_dpipe_table_ops mlxsw_sp_host4_ops = {\n \t.matches_dump = mlxsw_sp_dpipe_table_host4_matches_dump,\n-\t.actions_dump = mlxsw_sp_dpipe_table_host4_actions_dump,\n+\t.actions_dump = mlxsw_sp_dpipe_table_host_actions_dump,\n \t.entries_dump = mlxsw_sp_dpipe_table_host4_entries_dump,\n \t.counters_set_update = mlxsw_sp_dpipe_table_host4_counters_update,\n \t.size_get = mlxsw_sp_dpipe_table_host4_size_get,\n@@ -691,6 +711,43 @@ static void mlxsw_sp_dpipe_host4_table_fini(struct mlxsw_sp *mlxsw_sp)\n \t\t\t\t       MLXSW_SP_DPIPE_TABLE_NAME_HOST4);\n }\n \n+static int\n+mlxsw_sp_dpipe_table_host6_matches_dump(void *priv, struct sk_buff *skb)\n+{\n+\treturn mlxsw_sp_dpipe_table_host_matches_dump(skb, 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+\n+\treturn mlxsw_sp_dpipe_table_host_size_get(mlxsw_sp, AF_INET6);\n+}\n+\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.size_get = mlxsw_sp_dpipe_table_host6_size_get,\n+};\n+\n+static int mlxsw_sp_dpipe_host6_table_init(struct mlxsw_sp *mlxsw_sp)\n+{\n+\tstruct devlink *devlink = priv_to_devlink(mlxsw_sp->core);\n+\n+\treturn devlink_dpipe_table_register(devlink,\n+\t\t\t\t\t    MLXSW_SP_DPIPE_TABLE_NAME_HOST6,\n+\t\t\t\t\t    &mlxsw_sp_host6_ops,\n+\t\t\t\t\t    mlxsw_sp, false);\n+}\n+\n+static void mlxsw_sp_dpipe_host6_table_fini(struct mlxsw_sp *mlxsw_sp)\n+{\n+\tstruct devlink *devlink = priv_to_devlink(mlxsw_sp->core);\n+\n+\tdevlink_dpipe_table_unregister(devlink,\n+\t\t\t\t       MLXSW_SP_DPIPE_TABLE_NAME_HOST6);\n+}\n+\n int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp)\n {\n \tstruct devlink *devlink = priv_to_devlink(mlxsw_sp->core);\n@@ -707,8 +764,14 @@ int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp)\n \terr = mlxsw_sp_dpipe_host4_table_init(mlxsw_sp);\n \tif (err)\n \t\tgoto err_host4_table_init;\n+\n+\terr = mlxsw_sp_dpipe_host6_table_init(mlxsw_sp);\n+\tif (err)\n+\t\tgoto err_host6_table_init;\n \treturn 0;\n \n+err_host6_table_init:\n+\tmlxsw_sp_dpipe_host4_table_fini(mlxsw_sp);\n err_host4_table_init:\n \tmlxsw_sp_dpipe_erif_table_fini(mlxsw_sp);\n err_erif_table_init:\n@@ -720,6 +783,7 @@ void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp)\n {\n \tstruct devlink *devlink = priv_to_devlink(mlxsw_sp->core);\n \n+\tmlxsw_sp_dpipe_host6_table_fini(mlxsw_sp);\n \tmlxsw_sp_dpipe_host4_table_fini(mlxsw_sp);\n \tmlxsw_sp_dpipe_erif_table_fini(mlxsw_sp);\n \tdevlink_dpipe_headers_unregister(devlink);\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h\nindex c56a3d9..283fde4 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h\n@@ -55,5 +55,6 @@ static inline void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp)\n \n #define MLXSW_SP_DPIPE_TABLE_NAME_ERIF \"mlxsw_erif\"\n #define MLXSW_SP_DPIPE_TABLE_NAME_HOST4 \"mlxsw_host4\"\n+#define MLXSW_SP_DPIPE_TABLE_NAME_HOST6 \"mlxsw_host6\"\n \n #endif /* _MLXSW_PIPELINE_H_*/\n",
    "prefixes": [
        "net-next",
        "repost",
        "3/8"
    ]
}