get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806322,
    "url": "http://patchwork.ozlabs.org/api/patches/806322/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170828001603.75876-7-jeffrey.t.kirsher@intel.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": "<20170828001603.75876-7-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2017-08-28T00:15:54",
    "name": "[net-next,06/15] i40e: force VMDQ device name truncation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b07bc55baa7d6b9b3a76bd618f7736ea1942b09b",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@intel.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/20170828001603.75876-7-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 52,
            "url": "http://patchwork.ozlabs.org/api/series/52/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=52",
            "date": "2017-08-28T00:15:49",
            "name": "40GbE Intel Wired LAN Driver Updates 2017-08-27",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/52/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806322/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806322/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>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgXQJ3p8bz9s82\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 28 Aug 2017 10:17:12 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751821AbdH1ARF (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 27 Aug 2017 20:17:05 -0400",
            "from mga14.intel.com ([192.55.52.115]:55214 \"EHLO mga14.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751663AbdH1AQT (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSun, 27 Aug 2017 20:16:19 -0400",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Aug 2017 17:16:19 -0700",
            "from davidpwo-mobl1.amr.corp.intel.com (HELO\n\tjtkirshe-DESK.amr.corp.intel.com.com) ([10.254.22.134])\n\tby fmsmga004.fm.intel.com with ESMTP; 27 Aug 2017 17:16:18 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,439,1498546800\"; d=\"scan'208\";a=\"304981073\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "davem@davemloft.net",
        "Cc": "Jacob Keller <jacob.e.keller@intel.com>, netdev@vger.kernel.org,\n\tnhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com,\n\tJeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Subject": "[net-next 06/15] i40e: force VMDQ device name truncation",
        "Date": "Sun, 27 Aug 2017 17:15:54 -0700",
        "Message-Id": "<20170828001603.75876-7-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170828001603.75876-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20170828001603.75876-1-jeffrey.t.kirsher@intel.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Jacob Keller <jacob.e.keller@intel.com>\n\nIn new versions of GCC since 7.x a new warning exists which warns when\na string is truncated before all of the format can be completed.\n\nWhen we setup VMDQ netdev names we are copying a pre-existing interface\nname which could be up to 15 characters in length. Since we also add\n4 bytes, v, the literal %, the d and a \\0 null, we would overrun the\navailable size unless snprintf truncated for us.\n\nThe snprintf call will of course truncate on the end, so lets instead\nmodify the code to force truncation of the copied netdev name by\n4 characters, to create enough space for the 4 bytes we're adding.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nTested-by: Andrew Bowers <andrewx.bowers@intel.com>\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex b0ccd3c2eec6..3a6a752c6c58 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9690,8 +9690,13 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \t\ti40e_add_mac_filter(vsi, mac_addr);\n \t\tspin_unlock_bh(&vsi->mac_filter_hash_lock);\n \t} else {\n-\t\t/* relate the VSI_VMDQ name to the VSI_MAIN name */\n-\t\tsnprintf(netdev->name, IFNAMSIZ, \"%sv%%d\",\n+\t\t/* Relate the VSI_VMDQ name to the VSI_MAIN name. Note that we\n+\t\t * are still limited by IFNAMSIZ, but we're adding 'v%d\\0' to\n+\t\t * the end, which is 4 bytes long, so force truncation of the\n+\t\t * original name by IFNAMSIZ - 4\n+\t\t */\n+\t\tsnprintf(netdev->name, IFNAMSIZ, \"%.*sv%%d\",\n+\t\t\t IFNAMSIZ - 4,\n \t\t\t pf->vsi[pf->lan_vsi]->netdev->name);\n \t\trandom_ether_addr(mac_addr);\n \n",
    "prefixes": [
        "net-next",
        "06/15"
    ]
}