get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 724869,
    "url": "http://patchwork.ozlabs.org/api/patches/724869/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170207022646.9864.10096.stgit@localhost.localdomain/",
    "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": "<20170207022646.9864.10096.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-02-07T02:26:52",
    "name": "[next,v5,08/12] igb: Add support for ethtool private flag to allow use of legacy Rx",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2f6237368bb6f7dd413835f244aa394b926e24f0",
    "submitter": {
        "id": 252,
        "url": "http://patchwork.ozlabs.org/api/people/252/?format=api",
        "name": "Alexander Duyck",
        "email": "alexander.duyck@gmail.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/20170207022646.9864.10096.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/724869/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/724869/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "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 3vHSsT2SSCz9s2Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  7 Feb 2017 13:27:09 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 94D8426A3C;\n\tTue,  7 Feb 2017 02:27:07 +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 3mU+grNnz4Xj; Tue,  7 Feb 2017 02:27:02 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7DCC330A6D;\n\tTue,  7 Feb 2017 02:27:01 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 82ECE1BFEC6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:26:59 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 25E2830A65\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:26:59 +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 4623RAxFWrbw for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:26:55 +0000 (UTC)",
            "from mail-pg0-f66.google.com (mail-pg0-f66.google.com\n\t[74.125.83.66])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 862B326A3C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:26:54 +0000 (UTC)",
            "by mail-pg0-f66.google.com with SMTP id v184so10618502pgv.1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 06 Feb 2017 18:26:54 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tc11sm5832434pfk.14.2017.02.06.18.26.53\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 06 Feb 2017 18:26:53 -0800 (PST)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"KWsseIck\"; dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=Gc+13SAteLIdpiArImCIdqhZP4Pzf6KQn6nzH7+WU/o=;\n\tb=KWsseIckfCMzdjZzZMZkE2v4gPH5/JNKqmvReLKcFW+CdHydpqnLWEq04BmfFtITNp\n\tliZqjgk0b0PRxfs/Pe01Mkv5rMZMUxTayHlu9xSoZllNemjjgUCGL/eBFXRaRgHnFpxI\n\t5eQdKZdjmfnkXXRUN1GBGono2rbgHloxK5rE9+wjYE9KES0N6Cpr49QY3FczJDvTWNnv\n\t4wh7Mio1fWmF4t/KjlhV8+3T1tHzfRie4yuOEDnjaq9Xxr6G/EzVtsM9KS9aw0E6Q9nt\n\tTByK+umV4Ln3y/Px/bcD1nCameuMK4ZBt/97XQdk/l78diUFekSW9OSzUKP2SI3jTWwn\n\tCXGg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=Gc+13SAteLIdpiArImCIdqhZP4Pzf6KQn6nzH7+WU/o=;\n\tb=hjb6PaErmeCo0JvU7VLG7eLl6yYp/7HrEBhIiSSUUG49DCnMH/5w+SDlNX4FK8uUR9\n\tJVOkcHBbRRnffjXswVS7ELuSWpKS/L11GQJTm/9iouhb46m2nR0SjZKOqsJOhNwAi+t3\n\tN/UHhpHp5dmFl95dMzi6psl6ieFGQ208XRdxnv8lPI6u2bw/Jz/9sce5KfvIrnXFwZK0\n\t6I/EF07N58jAEoEfq4q5TCvUgIbzY03dadfTtu3xBXUaFoVlJ4a490aexzaiqtSWWFVU\n\ttObS9jr7U58/LvBhuNqdEimZ1EIYqHBQ2Cy7DlKf0ty13Sxfwmcl8pCDUmPkJNY2CYAq\n\tFeGg==",
        "X-Gm-Message-State": "AIkVDXJCMBlA00eCnNHW9YcOUkrbrEoUGhwCacAN223AwrxhrEvR+TkGxVBI52+hhenSZQ==",
        "X-Received": "by 10.84.237.22 with SMTP id s22mr22334548plk.145.1486434413999; \n\tMon, 06 Feb 2017 18:26:53 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Mon, 06 Feb 2017 18:26:52 -0800",
        "Message-ID": "<20170207022646.9864.10096.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170207022339.9864.87863.stgit@localhost.localdomain>",
        "References": "<20170207022339.9864.87863.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH v5 08/12] igb: Add support for\n\tethtool private flag to allow use of legacy Rx",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "From: Alexander Duyck <alexander.h.duyck@intel.com>\n\nSince there are potential drawbacks to the new Rx allocation approach I\nthought it best to add a \"chicken bit\" so that we can turn the feature off\nif in the event that a problem is found.\n\nIt also 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: Alexander Duyck <alexander.h.duyck@intel.com>\n---\nv4: Move patch up so that we add support for RX_LEGACY flag before we add\n    support for the new approach.\n    Added actual creation of the RX_LEGACY flag to this patch.\n\n drivers/net/ethernet/intel/igb/igb.h         |    1 +\n drivers/net/ethernet/intel/igb/igb_ethtool.c |   48 ++++++++++++++++++++++++++\n 2 files changed, 49 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h\nindex 6a88a08c021c..bffdfe65a0b6 100644\n--- a/drivers/net/ethernet/intel/igb/igb.h\n+++ b/drivers/net/ethernet/intel/igb/igb.h\n@@ -557,6 +557,7 @@ struct igb_adapter {\n #define IGB_FLAG_HAS_MSIX\t\tBIT(13)\n #define IGB_FLAG_EEE\t\t\tBIT(14)\n #define IGB_FLAG_VLAN_PROMISC\t\tBIT(15)\n+#define IGB_FLAG_RX_LEGACY\t\tBIT(16)\n \n /* Media Auto Sense */\n #define IGB_MAS_ENABLE_0\t\t0X0001\ndiff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c\nindex d5966feb7b96..797b9daba224 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c\n@@ -144,6 +144,13 @@ enum igb_diagnostics_results {\n };\n #define IGB_TEST_LEN (sizeof(igb_gstrings_test) / ETH_GSTRING_LEN)\n \n+static const char igb_priv_flags_strings[][ETH_GSTRING_LEN] = {\n+#define IGB_PRIV_FLAGS_LEGACY_RX\tBIT(0)\n+\t\"legacy-rx\",\n+};\n+\n+#define IGB_PRIV_FLAGS_STR_LEN ARRAY_SIZE(igb_priv_flags_strings)\n+\n static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)\n {\n \tstruct igb_adapter *adapter = netdev_priv(netdev);\n@@ -852,6 +859,8 @@ static void igb_get_drvinfo(struct net_device *netdev,\n \t\tsizeof(drvinfo->fw_version));\n \tstrlcpy(drvinfo->bus_info, pci_name(adapter->pdev),\n \t\tsizeof(drvinfo->bus_info));\n+\n+\tdrvinfo->n_priv_flags = IGB_PRIV_FLAGS_STR_LEN;\n }\n \n static void igb_get_ringparam(struct net_device *netdev,\n@@ -2280,6 +2289,8 @@ static int igb_get_sset_count(struct net_device *netdev, int sset)\n \t\treturn IGB_STATS_LEN;\n \tcase ETH_SS_TEST:\n \t\treturn IGB_TEST_LEN;\n+\tcase ETH_SS_PRIV_FLAGS:\n+\t\treturn IGB_PRIV_FLAGS_STR_LEN;\n \tdefault:\n \t\treturn -ENOTSUPP;\n \t}\n@@ -2385,6 +2396,10 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)\n \t\t}\n \t\t/* BUG_ON(p - data != IGB_STATS_LEN * ETH_GSTRING_LEN); */\n \t\tbreak;\n+\tcase ETH_SS_PRIV_FLAGS:\n+\t\tmemcpy(data, igb_priv_flags_strings,\n+\t\t       IGB_PRIV_FLAGS_STR_LEN * ETH_GSTRING_LEN);\n+\t\tbreak;\n \t}\n }\n \n@@ -3397,6 +3412,37 @@ static int igb_set_channels(struct net_device *netdev,\n \treturn 0;\n }\n \n+static u32 igb_get_priv_flags(struct net_device *netdev)\n+{\n+\tstruct igb_adapter *adapter = netdev_priv(netdev);\n+\tu32 priv_flags = 0;\n+\n+\tif (adapter->flags & IGB_FLAG_RX_LEGACY)\n+\t\tpriv_flags |= IGB_PRIV_FLAGS_LEGACY_RX;\n+\n+\treturn priv_flags;\n+}\n+\n+static int igb_set_priv_flags(struct net_device *netdev, u32 priv_flags)\n+{\n+\tstruct igb_adapter *adapter = netdev_priv(netdev);\n+\tunsigned int flags = adapter->flags;\n+\n+\tflags &= ~IGB_FLAG_RX_LEGACY;\n+\tif (priv_flags & IGB_PRIV_FLAGS_LEGACY_RX)\n+\t\tflags |= IGB_FLAG_RX_LEGACY;\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\tigb_reinit_locked(adapter);\n+\t}\n+\n+\treturn 0;\n+}\n+\n static const struct ethtool_ops igb_ethtool_ops = {\n \t.get_settings\t\t= igb_get_settings,\n \t.set_settings\t\t= igb_set_settings,\n@@ -3435,6 +3481,8 @@ static int igb_set_channels(struct net_device *netdev,\n \t.set_rxfh\t\t= igb_set_rxfh,\n \t.get_channels\t\t= igb_get_channels,\n \t.set_channels\t\t= igb_set_channels,\n+\t.get_priv_flags\t\t= igb_get_priv_flags,\n+\t.set_priv_flags\t\t= igb_set_priv_flags,\n \t.begin\t\t\t= igb_ethtool_begin,\n \t.complete\t\t= igb_ethtool_complete,\n };\n",
    "prefixes": [
        "next",
        "v5",
        "08/12"
    ]
}