get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 836836,
    "url": "http://patchwork.ozlabs.org/api/patches/836836/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171110185553.14657-3-jacob.e.keller@intel.com/",
    "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": "<20171110185553.14657-3-jacob.e.keller@intel.com>",
    "list_archive_url": null,
    "date": "2017-11-10T18:55:53",
    "name": "[3/3] ethtool: correct VF index values for the ring_cookie parameter",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "87b3a70ba36eabd49e3ca27b5e9ad5947dea9fb3",
    "submitter": {
        "id": 9784,
        "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api",
        "name": "Jacob Keller",
        "email": "jacob.e.keller@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/20171110185553.14657-3-jacob.e.keller@intel.com/mbox/",
    "series": [
        {
            "id": 13038,
            "url": "http://patchwork.ozlabs.org/api/series/13038/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=13038",
            "date": "2017-11-10T18:55:52",
            "name": "[1/3] ethtool: correct display of VF when showing vf/queue filters",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/13038/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/836836/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/836836/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.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3yYTlF60psz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 11 Nov 2017 05:56:09 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E42DD87AE3;\n\tFri, 10 Nov 2017 18:56:07 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fYGO-I6WHWxr; Fri, 10 Nov 2017 18:56:05 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id EFB1887AB1;\n\tFri, 10 Nov 2017 18:56:04 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 93AFA1C059B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Nov 2017 18:56:01 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8972B87AA0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Nov 2017 18:56:01 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id KX0p9Fy7VBoy for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Nov 2017 18:56:00 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 2774287AC8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Nov 2017 18:56:00 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Nov 2017 10:55:59 -0800",
            "from jekeller-desk.amr.corp.intel.com ([134.134.177.230])\n\tby FMSMGA003.fm.intel.com with ESMTP; 10 Nov 2017 10:55:58 -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-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.44,375,1505804400\"; d=\"scan'208\";a=\"653719\"",
        "From": "Jacob Keller <jacob.e.keller@intel.com>",
        "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>",
        "Date": "Fri, 10 Nov 2017 10:55:53 -0800",
        "Message-Id": "<20171110185553.14657-3-jacob.e.keller@intel.com>",
        "X-Mailer": "git-send-email 2.15.0",
        "In-Reply-To": "<20171110185553.14657-1-jacob.e.keller@intel.com>",
        "References": "<20171110185553.14657-1-jacob.e.keller@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 3/3] ethtool: correct VF index values for\n\tthe ring_cookie parameter",
        "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>",
        "MIME-Version": "1.0",
        "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": "Instead of relying on the input being offset by 1, instead adjust the\n\"vf\" input value by 1 so that it correctly targets the VF the user\nexpects. Additionally, update the displayed output to show the correct\nVF number.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n\nThis is the way the VF parameter should have worked from the beginning,\nbut unfortunately I did not code it as such. It may be considered a\nfunctional change (since we already supported the vf parameter with the\noffset not handled properly). I would consider this a bug fix, but it\nmight be considered a behavior change....\n\n ethtool.8.in |  3 +--\n rxclass.c    | 14 +++++++++++++-\n 2 files changed, 14 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/ethtool.8.in b/ethtool.8.in\nindex 6ad30650eb5b..76f86e6b6827 100644\n--- a/ethtool.8.in\n+++ b/ethtool.8.in\n@@ -839,8 +839,7 @@ lB\tl.\n .TE\n .TP\n .BI vf \\ N\n-Specifies the Virtual Function the filter applies to. A value of 0 indicates\n-the PF, and thus the VF index is offset by 1. Not compatible with action.\n+Specifies the Virtual Function the filter applies to. Not compatible with action.\n .TP\n .BI queue \\ N\n Specifies the Rx queue to send packets to. Not compatible with action.\ndiff --git a/rxclass.c b/rxclass.c\nindex 144c8e5e76be..e05031b6a23f 100644\n--- a/rxclass.c\n+++ b/rxclass.c\n@@ -251,9 +251,14 @@ static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp)\n \t\tu64 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie);\n \t\tu64 queue = ethtool_get_flow_spec_ring(fsp->ring_cookie);\n \n+\t\t/* A value of zero indicates that this rule targeted the main\n+\t\t * function. A positive value indicates which virtual function\n+\t\t * was targeted, so we'll subtract 1 in order to show the\n+\t\t * correct VF index\n+\t\t */\n \t\tif (vf)\n \t\t\tfprintf(stdout, \"\\tAction: Direct to VF %llu queue %llu\\n\",\n-\t\t\t\tvf, queue);\n+\t\t\t\tvf - 1, queue);\n \t\telse\n \t\t\tfprintf(stdout, \"\\tAction: Direct to queue %llu\\n\",\n \t\t\t\tqueue);\n@@ -1047,6 +1052,13 @@ static int rxclass_get_val(char *str, unsigned char *p, u32 *flags,\n \t\terr = rxclass_get_ulong(str, &val, 8);\n \t\tif (err)\n \t\t\treturn -1;\n+\n+\t\t/* The ring_cookie uses 0 to indicate the rule targets the\n+\t\t * main function, so add 1 to the value in order to target the\n+\t\t * correct virtual function.\n+\t\t */\n+\t\tval++;\n+\n \t\t*(u64 *)&p[opt->offset] &= ~ETHTOOL_RX_FLOW_SPEC_RING_VF;\n \t\t*(u64 *)&p[opt->offset] = (u64)val << ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF;\n \t\tbreak;\n",
    "prefixes": [
        "3/3"
    ]
}