get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 815257,
    "url": "http://patchwork.ozlabs.org/api/patches/815257/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170919021947.8971-12-f.fainelli@gmail.com/",
    "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": "<20170919021947.8971-12-f.fainelli@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-19T02:19:46",
    "name": "[net-next,v2,11/12] net: dsa: bcm_sf2: Use SF2_NUM_EGRESS_QUEUES for CFP",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b88d86936db49ee051f84983817f881a3e48afdc",
    "submitter": {
        "id": 2800,
        "url": "http://patchwork.ozlabs.org/api/people/2800/?format=api",
        "name": "Florian Fainelli",
        "email": "f.fainelli@gmail.com"
    },
    "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/20170919021947.8971-12-f.fainelli@gmail.com/mbox/",
    "series": [
        {
            "id": 3767,
            "url": "http://patchwork.ozlabs.org/api/series/3767/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=3767",
            "date": "2017-09-19T02:19:35",
            "name": "net: dsa: b53/bcm_sf2 cleanups",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/3767/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/815257/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/815257/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=gmail.com header.i=@gmail.com\n\theader.b=\"gbYCS8w3\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xx6FD2Dddz9s4s\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 12:26:24 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751370AbdISC0W (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 18 Sep 2017 22:26:22 -0400",
            "from mail-wm0-f68.google.com ([74.125.82.68]:37869 \"EHLO\n\tmail-wm0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750789AbdISC0V (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 18 Sep 2017 22:26:21 -0400",
            "by mail-wm0-f68.google.com with SMTP id f4so2491779wmh.4\n\tfor <netdev@vger.kernel.org>; Mon, 18 Sep 2017 19:26:20 -0700 (PDT)",
            "from fainelli-desktop.broadcom.com ([192.19.255.250])\n\tby smtp.gmail.com with ESMTPSA id\n\tq19sm9332458wrb.17.2017.09.18.19.20.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 18 Sep 2017 19:20:19 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=yb9QPKJpYOzVP0H+HI4wkGrEk5L1nOYwPUiRYKN1A7g=;\n\tb=gbYCS8w3fGpPfWSKxusL6zlNZGrjgIVQ7ux3MDCneu1xmEB9RCA2hzGrhhnkTSkvn9\n\t9WC3HGnS+jhpM1NmwEta7uhNtAHcCJZnUTx1pYBiagZCjzY413r+Me1XrDHWTgogmlj8\n\twruP65NGf+6xwuWg2N/b1nU19Yx4VBfAfEJasiHNK/hW8rvuq9X3kRc2EkK4qyiwIiXj\n\tSd72j+Vy2ocvcXLKn9KGh3Vx8KIa4MxLgh5i6B2MvAdatrsvXyYnATVYqnaA8moi0JDX\n\tOSWYTzuRH2VTtbQdLRSdeOTuLVvuMCOWUAMGP857HiZsRymomWxI606KHFx0ILj/zHxm\n\tfaDA==",
        "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=yb9QPKJpYOzVP0H+HI4wkGrEk5L1nOYwPUiRYKN1A7g=;\n\tb=WaUPCY3N+6CxEwoRh3Xf49SbjciIGrgDbqZM8Tn2CntLCWkbCZNbwCv6zF9gTUrwRe\n\tTGVFG7bLG25j8k5bBNgnKQiqhH/5r0x/sEfOzFz4CyeJfANKJ/XjN20aeoxXsaKDHiAN\n\tvlzfr+9JVoZyiuL0VgUoYi3gm+PCMiO0NjnVOGQMSEBxaSFpCb5OIJqSF25hj60z56XU\n\tNH9tGwBKTN5rHCAmZE0ltw3Z4qcwsUrla6AD8n0xBX2+KMyKDYu75QnCwj58Rr+khzwo\n\tI10+FSa/kdXFXFSnYwhVfNlds+xOpxEe1zRo4nI20dLZOwNeWzgGgHCfSz22xg32H9If\n\t6fSg==",
        "X-Gm-Message-State": "AHPjjUgFAbXz5mUgPhIVeWAmtiFr8J/CBL1IItZGTTeybR2TG1QSs3rO\n\tDSh8x2NQD/T+J9qj1Rdz1raF0gz3",
        "X-Google-Smtp-Source": "AOwi7QBeMCqGLX9aiOmRdF0N7O9Zd6Li3+BlrhT+yhVy1eZ0C6jQ9NMnstIMiHyAvPp8ICosJ0j4/A==",
        "X-Received": "by 10.28.150.195 with SMTP id y186mr125072wmd.52.1505787620840; \n\tMon, 18 Sep 2017 19:20:20 -0700 (PDT)",
        "From": "Florian Fainelli <f.fainelli@gmail.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,\n\tdavem@davemloft.net, Florian Fainelli <f.fainelli@gmail.com>",
        "Subject": "[PATCH net-next v2 11/12] net: dsa: bcm_sf2: Use\n\tSF2_NUM_EGRESS_QUEUES for CFP",
        "Date": "Mon, 18 Sep 2017 19:19:46 -0700",
        "Message-Id": "<20170919021947.8971-12-f.fainelli@gmail.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170919021947.8971-1-f.fainelli@gmail.com>",
        "References": "<20170919021947.8971-1-f.fainelli@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "The magic number 8 in 3 locations in bcm_sf2_cfp.c actually designates the\nnumber of switch port egress queues, so use that define instead of open-coding\nit.\n\nSigned-off-by: Florian Fainelli <f.fainelli@gmail.com>\n---\n drivers/net/dsa/bcm_sf2_cfp.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c\nindex 8a1da7e67707..94649e1481ec 100644\n--- a/drivers/net/dsa/bcm_sf2_cfp.c\n+++ b/drivers/net/dsa/bcm_sf2_cfp.c\n@@ -144,7 +144,7 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,\n \t * destination port is enabled and that we are within the\n \t * number of ports supported by the switch\n \t */\n-\tport_num = fs->ring_cookie / 8;\n+\tport_num = fs->ring_cookie / SF2_NUM_EGRESS_QUEUES;\n \n \tif (fs->ring_cookie == RX_CLS_FLOW_DISC ||\n \t    !(BIT(port_num) & ds->enabled_port_mask) ||\n@@ -280,7 +280,7 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,\n \t * We have a small oddity where Port 6 just does not have a\n \t * valid bit here (so we subtract by one).\n \t */\n-\tqueue_num = fs->ring_cookie % 8;\n+\tqueue_num = fs->ring_cookie % SF2_NUM_EGRESS_QUEUES;\n \tif (port_num >= 7)\n \t\tport_num -= 1;\n \n@@ -401,7 +401,7 @@ static int bcm_sf2_cfp_rule_get(struct bcm_sf2_priv *priv, int port,\n \t/* There is no Port 6, so we compensate for that here */\n \tif (nfc->fs.ring_cookie >= 6)\n \t\tnfc->fs.ring_cookie++;\n-\tnfc->fs.ring_cookie *= 8;\n+\tnfc->fs.ring_cookie *= SF2_NUM_EGRESS_QUEUES;\n \n \t/* Extract the destination queue */\n \tqueue_num = (reg >> NEW_TC_SHIFT) & NEW_TC_MASK;\n",
    "prefixes": [
        "net-next",
        "v2",
        "11/12"
    ]
}