get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 809499,
    "url": "http://patchwork.ozlabs.org/api/patches/809499/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170904032703.4593-2-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": "<20170904032703.4593-2-f.fainelli@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-04T03:27:00",
    "name": "[net-next,v2,RESEND,1/4] net: dsa: Allow switch drivers to indicate number of TX queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8f095523aee3b738ff5eab7f4df75bc49fee9ca7",
    "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/20170904032703.4593-2-f.fainelli@gmail.com/mbox/",
    "series": [
        {
            "id": 1296,
            "url": "http://patchwork.ozlabs.org/api/series/1296/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1296",
            "date": "2017-09-04T03:26:59",
            "name": "net: dsa: Allow switch drivers to indicate number of TX queues",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1296/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809499/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809499/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=\"o0IxPxJx\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xlwJL36Zcz9sNr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon,  4 Sep 2017 13:27:14 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753240AbdIDD1M (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 3 Sep 2017 23:27:12 -0400",
            "from mail-oi0-f65.google.com ([209.85.218.65]:34595 \"EHLO\n\tmail-oi0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753124AbdIDD1L (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sun, 3 Sep 2017 23:27:11 -0400",
            "by mail-oi0-f65.google.com with SMTP id h70so628252oic.1\n\tfor <netdev@vger.kernel.org>; Sun, 03 Sep 2017 20:27:11 -0700 (PDT)",
            "from bender.lan ([2001:470:d:73f:89f7:5bc5:8791:e113])\n\tby smtp.gmail.com with ESMTPSA id\n\tm185sm7347161oia.21.2017.09.03.20.27.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 03 Sep 2017 20:27:09 -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=9q6f6H/JyyZYK0oYPHnDFvyiqiBQL7A/bYYxyBIsCTw=;\n\tb=o0IxPxJxpNMePVzNbQZCDPKSkcBLOXP9xA6pYWcoKZ1LQYZLJmXlEU9mTruR8HgF+u\n\taYZ2jdpxzIQ6Mgl0ZEEyIw63IMVWlOE9FMZ2D1Y7dlg0BlegRszWCtSfb9ssEy7+eMNV\n\tlxetYCQ2hN0RBZ/eC+b2JsNXShEBINak6jV3J5K8eZZxZTGMsc89QUs5qHbKI0kgUcuN\n\teyIFmBU2YgIlFurTyfurPuHBKhHdGKl+WYU4jgvQbq0DCk2NA5iWkVFsqw1Aid6oQeUS\n\tq+jhl6cf0R/9Lt4XAHXE8BhDrcFQsAgsOX4MxQkB8tvhZPn7qyWZDPujqN1MVGu6dFUB\n\tNqXA==",
        "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=9q6f6H/JyyZYK0oYPHnDFvyiqiBQL7A/bYYxyBIsCTw=;\n\tb=Wc8LxKz+Azu9JxBMTVH/jRPFjrpUqm1x9ukeHCFZKCtMAAXYiGA3hjtYkKKIqHOKUf\n\tS8uBAAlqbHyJhzt/6T29t8taEz4x9yIfTTbB5OvpvvEyvOtQ0gIi3KTvFaHr4YILSKA+\n\twH6s9VFi4i9vODsNtx1NcEGZ9g6Jo/c1I7oNBIGquRrEA9G7SESRKmRsC23lXFYI/GDF\n\tnp/8rGbW4KEoFLov+Op0jPi93J8Rwl8Cugnt1aeOQcr+v8zTvaIPtgMWzy/wjRHH880F\n\twZfRvip6SROu9XWMVuPQeGFLShRmAIS+Rsb4A3Ip+wgz6vGX9VZ3EL1bgAxkkEDu4W4V\n\t/peA==",
        "X-Gm-Message-State": "AHPjjUgtwi8ZO2Hbamht8Tp+A98nraJilNKR99cxaVZpLPIlBq0m9D1b\n\tntlG0h3tgHik20quzG4=",
        "X-Google-Smtp-Source": "ADKCNb5aZbFCFWGavPUK9HFThUMRtvZGOf+ftF0MpGjsscvewW07HxQHZaDbOvsI5GtjKA9uQn5hAQ==",
        "X-Received": "by 10.202.72.201 with SMTP id v192mr1108993oia.116.1504495630311;\n\tSun, 03 Sep 2017 20:27:10 -0700 (PDT)",
        "From": "Florian Fainelli <f.fainelli@gmail.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,\n\tFlorian Fainelli <f.fainelli@gmail.com>",
        "Subject": "[PATCH net-next v2 RESEND 1/4] net: dsa: Allow switch drivers to\n\tindicate number of TX queues",
        "Date": "Sun,  3 Sep 2017 20:27:00 -0700",
        "Message-Id": "<20170904032703.4593-2-f.fainelli@gmail.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170904032703.4593-1-f.fainelli@gmail.com>",
        "References": "<20170904032703.4593-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": "Let switch drivers indicate how many TX queues they support. Some\nswitches, such as Broadcom Starfighter 2 are designed with 8 egress\nqueues. Future changes will allow us to leverage the queue mapping and\ndirect the transmission towards a particular queue.\n\nSigned-off-by: Florian Fainelli <f.fainelli@gmail.com>\n---\n include/net/dsa.h | 3 +++\n net/dsa/slave.c   | 8 ++++++--\n 2 files changed, 9 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/net/dsa.h b/include/net/dsa.h\nindex 398ca8d70ccd..dd44d6ce1097 100644\n--- a/include/net/dsa.h\n+++ b/include/net/dsa.h\n@@ -243,6 +243,9 @@ struct dsa_switch {\n \t/* devlink used to represent this switch device */\n \tstruct devlink\t\t*devlink;\n \n+\t/* Number of switch port queues */\n+\tunsigned int\t\tnum_tx_queues;\n+\n \t/* Dynamically allocated ports, keep last */\n \tsize_t num_ports;\n \tstruct dsa_port ports[];\ndiff --git a/net/dsa/slave.c b/net/dsa/slave.c\nindex 78e78a6e6833..2afa99506f8b 100644\n--- a/net/dsa/slave.c\n+++ b/net/dsa/slave.c\n@@ -1259,8 +1259,12 @@ int dsa_slave_create(struct dsa_port *port, const char *name)\n \tcpu_dp = ds->dst->cpu_dp;\n \tmaster = cpu_dp->netdev;\n \n-\tslave_dev = alloc_netdev(sizeof(struct dsa_slave_priv), name,\n-\t\t\t\t NET_NAME_UNKNOWN, ether_setup);\n+\tif (!ds->num_tx_queues)\n+\t\tds->num_tx_queues = 1;\n+\n+\tslave_dev = alloc_netdev_mqs(sizeof(struct dsa_slave_priv), name,\n+\t\t\t\t     NET_NAME_UNKNOWN, ether_setup,\n+\t\t\t\t     ds->num_tx_queues, 1);\n \tif (slave_dev == NULL)\n \t\treturn -ENOMEM;\n \n",
    "prefixes": [
        "net-next",
        "v2",
        "RESEND",
        "1/4"
    ]
}