get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 867751,
    "url": "http://patchwork.ozlabs.org/api/patches/867751/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180131005117.19264.16322.stgit@localhost6.localdomain6/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180131005117.19264.16322.stgit@localhost6.localdomain6>",
    "list_archive_url": null,
    "date": "2018-01-31T00:51:17",
    "name": "[2/9] ixgbevf: add ethtool private flag for legacy Rx",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "74f36074ffe71c4d4ef331ed5a1dc630511d8a88",
    "submitter": {
        "id": 1670,
        "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api",
        "name": "Tantilov, Emil S",
        "email": "emil.s.tantilov@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180131005117.19264.16322.stgit@localhost6.localdomain6/mbox/",
    "series": [
        {
            "id": 26180,
            "url": "http://patchwork.ozlabs.org/api/series/26180/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=26180",
            "date": "2018-01-31T00:51:07",
            "name": "ixgbevf: build_skb support and related changes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/26180/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/867751/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/867751/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zWPfr3LMrz9ryQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 31 Jan 2018 11:45:24 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id ABAFB2FC9A;\n\tWed, 31 Jan 2018 00:45:22 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qeLlhITV+hAz; Wed, 31 Jan 2018 00:45:21 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A40BF2FAFF;\n\tWed, 31 Jan 2018 00:45:21 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id D12641C4377\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CBFCE88354\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:19 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id RomSA8dD9N+e for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:19 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 04BE2876E9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:18 +0000 (UTC)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Jan 2018 16:45:18 -0800",
            "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.177.100])\n\tby orsmga008.jf.intel.com with ESMTP; 30 Jan 2018 16:45:18 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,437,1511856000\"; d=\"scan'208\";a=\"14291834\"",
        "From": "Emil Tantilov <emil.s.tantilov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 30 Jan 2018 16:51:17 -0800",
        "Message-ID": "<20180131005117.19264.16322.stgit@localhost6.localdomain6>",
        "In-Reply-To": "<20180131005015.19264.44085.stgit@localhost6.localdomain6>",
        "References": "<20180131005015.19264.44085.stgit@localhost6.localdomain6>",
        "User-Agent": "StGit/0.17.1-17-ge4e0",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH 2/9] ixgbevf: add ethtool private flag for\n\tlegacy Rx",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Introduce legacy-rx private flag that will allow switching between the\nold and new (build_skb based) Rx code paths. The implementation is the\nsame as in commit e08912985b29\n(\"igb: Add support for ethtool private flag to allow use of legacy Rx\")\n\nThis provides a means of validating the legacy Rx path in the event that\nwe are forced to fall back.  At some point in the future when we are\nconvinced we don't need it anymore we might be able to drop the legacy-rx\nflag.\n\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ethtool.c |   48 ++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ixgbevf/ixgbevf.h |    2 +\n 2 files changed, 50 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\nindex 4400e49..e7623fe 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n@@ -94,6 +94,13 @@ struct ixgbe_stats {\n \n #define IXGBEVF_TEST_LEN (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN)\n \n+static const char ixgbevf_priv_flags_strings[][ETH_GSTRING_LEN] = {\n+#define IXGBEVF_PRIV_FLAGS_LEGACY_RX\tBIT(0)\n+\t\"legacy-rx\",\n+};\n+\n+#define IXGBEVF_PRIV_FLAGS_STR_LEN ARRAY_SIZE(ixgbevf_priv_flags_strings)\n+\n static int ixgbevf_get_link_ksettings(struct net_device *netdev,\n \t\t\t\t      struct ethtool_link_ksettings *cmd)\n {\n@@ -241,6 +248,8 @@ static void ixgbevf_get_drvinfo(struct net_device *netdev,\n \t\tsizeof(drvinfo->version));\n \tstrlcpy(drvinfo->bus_info, pci_name(adapter->pdev),\n \t\tsizeof(drvinfo->bus_info));\n+\n+\tdrvinfo->n_priv_flags = IXGBEVF_PRIV_FLAGS_STR_LEN;\n }\n \n static void ixgbevf_get_ringparam(struct net_device *netdev,\n@@ -392,6 +401,8 @@ static int ixgbevf_get_sset_count(struct net_device *netdev, int stringset)\n \t\treturn IXGBEVF_TEST_LEN;\n \tcase ETH_SS_STATS:\n \t\treturn IXGBEVF_STATS_LEN;\n+\tcase ETH_SS_PRIV_FLAGS:\n+\t\treturn IXGBEVF_PRIV_FLAGS_STR_LEN;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n@@ -496,6 +507,10 @@ static void ixgbevf_get_strings(struct net_device *netdev, u32 stringset,\n \t\t\tp += ETH_GSTRING_LEN;\n \t\t}\n \t\tbreak;\n+\tcase ETH_SS_PRIV_FLAGS:\n+\t\tmemcpy(data, ixgbevf_priv_flags_strings,\n+\t\t       IXGBEVF_PRIV_FLAGS_STR_LEN * ETH_GSTRING_LEN);\n+\t\tbreak;\n \t}\n }\n \n@@ -888,6 +903,37 @@ static int ixgbevf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,\n \treturn err;\n }\n \n+static u32 ixgbevf_get_priv_flags(struct net_device *netdev)\n+{\n+\tstruct ixgbevf_adapter *adapter = netdev_priv(netdev);\n+\tu32 priv_flags = 0;\n+\n+\tif (adapter->flags & IXGBEVF_FLAGS_LEGACY_RX)\n+\t\tpriv_flags |= IXGBEVF_PRIV_FLAGS_LEGACY_RX;\n+\n+\treturn priv_flags;\n+}\n+\n+static int ixgbevf_set_priv_flags(struct net_device *netdev, u32 priv_flags)\n+{\n+\tstruct ixgbevf_adapter *adapter = netdev_priv(netdev);\n+\tunsigned int flags = adapter->flags;\n+\n+\tflags &= ~IXGBEVF_FLAGS_LEGACY_RX;\n+\tif (priv_flags & IXGBEVF_PRIV_FLAGS_LEGACY_RX)\n+\t\tflags |= IXGBEVF_FLAGS_LEGACY_RX;\n+\n+\tif (flags != adapter->flags) {\n+\t\tadapter->flags = flags;\n+\n+\t\t/* reset interface to repopulate queues */\n+\t\tif (netif_running(netdev))\n+\t\t\tixgbevf_reinit_locked(adapter);\n+\t}\n+\n+\treturn 0;\n+}\n+\n static const struct ethtool_ops ixgbevf_ethtool_ops = {\n \t.get_drvinfo\t\t= ixgbevf_get_drvinfo,\n \t.get_regs_len\t\t= ixgbevf_get_regs_len,\n@@ -909,6 +955,8 @@ static int ixgbevf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,\n \t.get_rxfh_key_size\t= ixgbevf_get_rxfh_key_size,\n \t.get_rxfh\t\t= ixgbevf_get_rxfh,\n \t.get_link_ksettings\t= ixgbevf_get_link_ksettings,\n+\t.get_priv_flags\t\t= ixgbevf_get_priv_flags,\n+\t.set_priv_flags\t\t= ixgbevf_set_priv_flags,\n };\n \n void ixgbevf_set_ethtool_ops(struct net_device *netdev)\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\nindex f695242..62a3669 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n@@ -331,6 +331,8 @@ struct ixgbevf_adapter {\n \n \tu32 *rss_key;\n \tu8 rss_indir_tbl[IXGBEVF_X550_VFRETA_SIZE];\n+\tu32 flags;\n+#define IXGBEVF_FLAGS_LEGACY_RX\t\tBIT(1)\n };\n \n enum ixbgevf_state_t {\n",
    "prefixes": [
        "2/9"
    ]
}