get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 831158,
    "url": "http://patchwork.ozlabs.org/api/patches/831158/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/150909693494.48377.7265505471193257120.stgit@anamdev.jf.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": "<150909693494.48377.7265505471193257120.stgit@anamdev.jf.intel.com>",
    "list_archive_url": null,
    "date": "2017-10-27T09:35:34",
    "name": "[jkirsher/next-queue,v5,1/6] net: sched: Identify hardware traffic classes using classid",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ed0e8b1fb79f7ca80ba09af9f2fb8c03587bc38d",
    "submitter": {
        "id": 68504,
        "url": "http://patchwork.ozlabs.org/api/people/68504/?format=api",
        "name": "Nambiar, Amritha",
        "email": "amritha.nambiar@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/150909693494.48377.7265505471193257120.stgit@anamdev.jf.intel.com/mbox/",
    "series": [
        {
            "id": 10540,
            "url": "http://patchwork.ozlabs.org/api/series/10540/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=10540",
            "date": "2017-10-27T09:35:29",
            "name": "tc-flower based cloud filters in i40e",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/10540/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/831158/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/831158/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 3yNf0s3mt0z9t2h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 27 Oct 2017 20:37:17 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0C1F726A85;\n\tFri, 27 Oct 2017 09:37:16 +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 97R6+fugF6Vi; Fri, 27 Oct 2017 09:37:14 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id EBD412E02D;\n\tFri, 27 Oct 2017 09:37:14 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 063A71C071F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 27 Oct 2017 09:37:13 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id EF58B30AE3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 27 Oct 2017 09:37:12 +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 6wPdoXNzbzHU for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 27 Oct 2017 09:37:12 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 580E02E02D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 27 Oct 2017 09:37:12 +0000 (UTC)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Oct 2017 02:37:11 -0700",
            "from anamdev.jf.intel.com ([10.166.29.110])\n\tby orsmga003.jf.intel.com with ESMTP; 27 Oct 2017 02:37:11 -0700"
        ],
        "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,304,1505804400\"; d=\"scan'208\";\n\ta=\"1030060475\"",
        "From": "Amritha Nambiar <amritha.nambiar@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Fri, 27 Oct 2017 02:35:34 -0700",
        "Message-ID": "<150909693494.48377.7265505471193257120.stgit@anamdev.jf.intel.com>",
        "In-Reply-To": "<150909628755.48377.16561267691881106259.stgit@anamdev.jf.intel.com>",
        "References": "<150909628755.48377.16561267691881106259.stgit@anamdev.jf.intel.com>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Cc": "jiri@resnulli.us, netdev@vger.kernel.org, jhs@mojatatu.com,\n\txiyou.wangcong@gmail.com",
        "Subject": "[Intel-wired-lan] [jkirsher/next-queue PATCH v5 1/6] net: sched:\n\tIdentify hardware traffic classes using classid",
        "X-BeenThere": "intel-wired-lan@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.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": "This patch offloads the classid to hardware and uses the classid\nreserved in the range :ffe0 - :ffef to identify hardware traffic\nclasses reported via dev->num_tc.\n\ntcf_result structure contains the class ID of the class to which\nthe packet belongs and is offloaded to hardware via flower filter.\nA new helper function is introduced to represent HW traffic\nclasses 0 through 15 using the reserved classid values :ffe0 - :ffef.\n\nv5: Added helper function to get HW TC values from classid.\n\nSigned-off-by: Amritha Nambiar <amritha.nambiar@intel.com>\n---\n include/net/pkt_cls.h     |    1 +\n include/net/sch_generic.h |    7 +++++++\n net/sched/cls_flower.c    |    2 ++\n 3 files changed, 10 insertions(+)",
    "diff": "diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h\nindex 04caa24..45c958f 100644\n--- a/include/net/pkt_cls.h\n+++ b/include/net/pkt_cls.h\n@@ -664,6 +664,7 @@ struct tc_cls_flower_offload {\n \tstruct fl_flow_key *mask;\n \tstruct fl_flow_key *key;\n \tstruct tcf_exts *exts;\n+\tu32 classid;\n };\n \n enum tc_matchall_command {\ndiff --git a/include/net/sch_generic.h b/include/net/sch_generic.h\nindex 031dffd..c79d9aa 100644\n--- a/include/net/sch_generic.h\n+++ b/include/net/sch_generic.h\n@@ -409,6 +409,13 @@ qdisc_class_find(const struct Qdisc_class_hash *hash, u32 id)\n \treturn NULL;\n }\n \n+static inline int tc_classid_to_hwtc(struct net_device *dev, u32 classid)\n+{\n+\tu32 hwtc = TC_H_MIN(classid) - TC_H_MIN_PRIORITY;\n+\n+\treturn (hwtc < netdev_get_num_tc(dev)) ? hwtc : -EINVAL;\n+}\n+\n int qdisc_class_hash_init(struct Qdisc_class_hash *);\n void qdisc_class_hash_insert(struct Qdisc_class_hash *,\n \t\t\t     struct Qdisc_class_common *);\ndiff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c\nindex 16f58ab..addbc31 100644\n--- a/net/sched/cls_flower.c\n+++ b/net/sched/cls_flower.c\n@@ -227,6 +227,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,\n \tcls_flower.mask = mask;\n \tcls_flower.key = &f->mkey;\n \tcls_flower.exts = &f->exts;\n+\tcls_flower.classid = f->res.classid;\n \n \terr = tc_setup_cb_call(block, &f->exts, TC_SETUP_CLSFLOWER,\n \t\t\t       &cls_flower, skip_sw);\n@@ -252,6 +253,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)\n \tcls_flower.command = TC_CLSFLOWER_STATS;\n \tcls_flower.cookie = (unsigned long) f;\n \tcls_flower.exts = &f->exts;\n+\tcls_flower.classid = f->res.classid;\n \n \ttc_setup_cb_call(block, &f->exts, TC_SETUP_CLSFLOWER,\n \t\t\t &cls_flower, false);\n",
    "prefixes": [
        "jkirsher/next-queue",
        "v5",
        "1/6"
    ]
}