get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818088,
    "url": "http://patchwork.ozlabs.org/api/patches/818088/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170925083230.1193-8-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-8-jiri@resnulli.us>",
    "list_archive_url": null,
    "date": "2017-09-25T08:32:27",
    "name": "[net-next,07/10] mlxsw: reg: Add support for counters on RATR",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "25fe0fad4c5ad8a94f623627820f5693022fe342",
    "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-8-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/818088/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818088/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=\"zS069d7h\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0y583nd5z9t62\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 18:32:44 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934297AbdIYIcl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 04:32:41 -0400",
            "from mail-wr0-f195.google.com ([209.85.128.195]:38822 \"EHLO\n\tmail-wr0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932617AbdIYIch (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 04:32:37 -0400",
            "by mail-wr0-f195.google.com with SMTP id p37so1436192wrb.5\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 01:32:37 -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\tt8sm3519247wra.52.2017.09.25.01.32.36\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 01:32:36 -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=XhSAapmAE9d6yTfbqKGSKG4Rq5eFl8LGMcTgTMa+myA=;\n\tb=zS069d7hIRgd01MIm7VncZ8DyPp/agzimWyra+yOAZQRQGshKyliwznETJ3fo9VazO\n\tyg6djiODS6YiK54ChwkyfnusPZv38ueyRJ4JD3zZ7U7Bx+FzFd6cuwu9DmD1LUxsaZFn\n\tqwa/Il4BZqr363QUVTR1ShVIHJy6d6atKOPorH2x4alTmRlK0NqMwANl+91E/sopHLOc\n\tVsZ+SUgM1YN/uGLAU/zp/pUndKTfVZ8ceQCiGDa5ij3ONZrW5laXqj1wTsY6+XfkHORs\n\tYsfEYXnW/GeCyL5Ur3dewiW0Qi1SdIvoJLFHydA2/J2f3MnjAwyhxoxZYsMg6zoIok9W\n\tig/g==",
        "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=XhSAapmAE9d6yTfbqKGSKG4Rq5eFl8LGMcTgTMa+myA=;\n\tb=gvXdliHQxXIZZJOku6AXWhi0+Q1o11Cm+qK8U1dHWHJSuqs80PI04vYwvMElfe4UKx\n\tZZ2tKE8Fp3ov84pmYQDqJoNguBJPnvGOk76ejOaebZxH0aw4Ik3RuAmyF1UzKJVKeHYj\n\tYzOEzXs8OxUSrxiTjDCOegyCHJyJyO9eb33JKjWRUYgbr77pa1WFDlFOG5TDeCIUnaKq\n\t8viYxzHAZnN93EYTHJylGh5x28KmymmRzWWpEv+SZYvaqTsQoCinxRWURTMHSOEu5g5S\n\tCZcwYihII6ws7J3CgNG1GeUj1iAIGFsf3hQC1MOapzfTIJFpwvIYAr9fpuhOeCHgznzw\n\tTHrQ==",
        "X-Gm-Message-State": "AHPjjUgAk2PsRWQPrM/A+qzOwEAxiQVWxkQsdF/kczyc8JYfVaOwU/Jl\n\tdGg0adVCIZpxbqKaBoaPvmLP12ew",
        "X-Google-Smtp-Source": "AOwi7QDaAOKDKGqCLv80GF0yoTyuXOormMmgbOXg5mLODm6bX2fjA6rTu3bbvuvmVKBDwptGMblPaw==",
        "X-Received": "by 10.223.161.194 with SMTP id v2mr5349632wrv.45.1506328356728; \n\tMon, 25 Sep 2017 01:32:36 -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 07/10] mlxsw: reg: Add support for counters on RATR",
        "Date": "Mon, 25 Sep 2017 10:32:27 +0200",
        "Message-Id": "<20170925083230.1193-8-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\nIn order to add the ability for setting counters on nexthops the RATR\nregister should be extended.\n\nSigned-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlxsw/reg.h | 44 ++++++++++++++++++++++++-------\n 1 file changed, 35 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h\nindex 17eba19..d44e673 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h\n@@ -4549,6 +4549,27 @@ MLXSW_ITEM32(reg, ratr, ipip_ipv4_udip, 0x18, 0, 32);\n  */\n MLXSW_ITEM32(reg, ratr, ipip_ipv6_ptr, 0x1C, 0, 24);\n \n+enum mlxsw_reg_flow_counter_set_type {\n+\t/* No count */\n+\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_NO_COUNT = 0x00,\n+\t/* Count packets and bytes */\n+\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS_BYTES = 0x03,\n+\t/* Count only packets */\n+\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS = 0x05,\n+};\n+\n+/* reg_ratr_counter_set_type\n+ * Counter set type for flow counters\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, counter_set_type, 0x28, 24, 8);\n+\n+/* reg_ratr_counter_index\n+ * Counter index for flow counters\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, counter_index, 0x28, 0, 24);\n+\n static inline void\n mlxsw_reg_ratr_pack(char *payload,\n \t\t    enum mlxsw_reg_ratr_op op, bool valid,\n@@ -4576,6 +4597,20 @@ static inline void mlxsw_reg_ratr_ipip4_entry_pack(char *payload, u32 ipv4_udip)\n \tmlxsw_reg_ratr_ipip_ipv4_udip_set(payload, ipv4_udip);\n }\n \n+static inline void mlxsw_reg_ratr_counter_pack(char *payload, u64 counter_index,\n+\t\t\t\t\t       bool counter_enable)\n+{\n+\tenum mlxsw_reg_flow_counter_set_type set_type;\n+\n+\tif (counter_enable)\n+\t\tset_type = MLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS_BYTES;\n+\telse\n+\t\tset_type = MLXSW_REG_FLOW_COUNTER_SET_TYPE_NO_COUNT;\n+\n+\tmlxsw_reg_ratr_counter_index_set(payload, counter_index);\n+\tmlxsw_reg_ratr_counter_set_type_set(payload, set_type);\n+}\n+\n /* RICNT - Router Interface Counter Register\n  * -----------------------------------------\n  * The RICNT register retrieves per port performance counters\n@@ -5297,15 +5332,6 @@ enum mlxsw_reg_rauht_trap_id {\n  */\n MLXSW_ITEM32(reg, rauht, trap_id, 0x60, 0, 9);\n \n-enum mlxsw_reg_flow_counter_set_type {\n-\t/* No count */\n-\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_NO_COUNT = 0x00,\n-\t/* Count packets and bytes */\n-\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS_BYTES = 0x03,\n-\t/* Count only packets */\n-\tMLXSW_REG_FLOW_COUNTER_SET_TYPE_PACKETS = 0x05,\n-};\n-\n /* reg_rauht_counter_set_type\n  * Counter set type for flow counters\n  * Access: RW\n",
    "prefixes": [
        "net-next",
        "07/10"
    ]
}