get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1117465,
    "url": "http://patchwork.ozlabs.org/api/patches/1117465/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1560799870-18956-3-git-send-email-vedang.patel@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": "<1560799870-18956-3-git-send-email-vedang.patel@intel.com>",
    "list_archive_url": null,
    "date": "2019-06-17T19:31:06",
    "name": "[net-next,v3,2/6] etf: Add skip_sock_check",
    "commit_ref": null,
    "pull_url": null,
    "state": "awaiting-upstream",
    "archived": false,
    "hash": "5ec2b230ace04161cd5aeaa5f28396c1de1b6271",
    "submitter": {
        "id": 76208,
        "url": "http://patchwork.ozlabs.org/api/people/76208/?format=api",
        "name": "Vedang Patel",
        "email": "vedang.patel@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1560799870-18956-3-git-send-email-vedang.patel@intel.com/mbox/",
    "series": [
        {
            "id": 114349,
            "url": "http://patchwork.ozlabs.org/api/series/114349/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=114349",
            "date": "2019-06-17T19:31:04",
            "name": "net/sched: Add txtime-assist support for taprio.",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/114349/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1117465/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1117465/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>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 45SLtR1hLjz9s9y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 18 Jun 2019 05:31:27 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C42588550D;\n\tMon, 17 Jun 2019 19:31:25 +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 Rul0srWc5gDQ; Mon, 17 Jun 2019 19:31:24 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8706E85617;\n\tMon, 17 Jun 2019 19:31:24 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id F294E1BF94B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 17 Jun 2019 19:31:23 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EF07585E14\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 17 Jun 2019 19:31:23 +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 0dEQXQZGSqLM for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 17 Jun 2019 19:31:23 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 5704C85899\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 17 Jun 2019 19:31:23 +0000 (UTC)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Jun 2019 12:31:23 -0700",
            "from vpatel-desk.jf.intel.com (HELO localhost.localdomain)\n\t([10.7.159.52])\n\tby orsmga007.jf.intel.com with ESMTP; 17 Jun 2019 12:31:23 -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-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Vedang Patel <vedang.patel@intel.com>",
        "To": "netdev@vger.kernel.org",
        "Date": "Mon, 17 Jun 2019 12:31:06 -0700",
        "Message-Id": "<1560799870-18956-3-git-send-email-vedang.patel@intel.com>",
        "X-Mailer": "git-send-email 2.7.3",
        "In-Reply-To": "<1560799870-18956-1-git-send-email-vedang.patel@intel.com>",
        "References": "<1560799870-18956-1-git-send-email-vedang.patel@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH net-next v3 2/6] etf: Add skip_sock_check",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "Cc": "jiri@resnulli.us, l@dorileo.org, jhs@mojatatu.com,\n\tintel-wired-lan@lists.osuosl.org, xiyou.wangcong@gmail.com,\n\tdavem@davemloft.net",
        "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": "Currently, etf expects a socket with SO_TXTIME option set for each packet\nit encounters. So, it will drop all other packets. But, in the future\ncommits we are planning to add functionality which where tstamp value will\nbe set by another qdisc. Also, some packets which are generated from within\nthe kernel (e.g. ICMP packets) do not have any socket associated with them.\n\nSo, this commit adds support for skip_sock_check. When this option is set,\netf will skip checking for a socket and other associated options for all\nskbs.\n\nSigned-off-by: Vedang Patel <vedang.patel@intel.com>\n---\n include/uapi/linux/pkt_sched.h |  1 +\n net/sched/sch_etf.c            | 10 ++++++++++\n 2 files changed, 11 insertions(+)",
    "diff": "diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h\nindex 8b2f993cbb77..69fc52e4d6bd 100644\n--- a/include/uapi/linux/pkt_sched.h\n+++ b/include/uapi/linux/pkt_sched.h\n@@ -990,6 +990,7 @@ struct tc_etf_qopt {\n \t__u32 flags;\n #define TC_ETF_DEADLINE_MODE_ON\tBIT(0)\n #define TC_ETF_OFFLOAD_ON\tBIT(1)\n+#define TC_ETF_SKIP_SOCK_CHECK  BIT(2)\n };\n \n enum {\ndiff --git a/net/sched/sch_etf.c b/net/sched/sch_etf.c\nindex db0c2ba1d156..cebfb65d8556 100644\n--- a/net/sched/sch_etf.c\n+++ b/net/sched/sch_etf.c\n@@ -22,10 +22,12 @@\n \n #define DEADLINE_MODE_IS_ON(x) ((x)->flags & TC_ETF_DEADLINE_MODE_ON)\n #define OFFLOAD_IS_ON(x) ((x)->flags & TC_ETF_OFFLOAD_ON)\n+#define SKIP_SOCK_CHECK_IS_SET(x) ((x)->flags & TC_ETF_SKIP_SOCK_CHECK)\n \n struct etf_sched_data {\n \tbool offload;\n \tbool deadline_mode;\n+\tbool skip_sock_check;\n \tint clockid;\n \tint queue;\n \ts32 delta; /* in ns */\n@@ -77,6 +79,9 @@ static bool is_packet_valid(struct Qdisc *sch, struct sk_buff *nskb)\n \tstruct sock *sk = nskb->sk;\n \tktime_t now;\n \n+\tif (q->skip_sock_check)\n+\t\tgoto skip;\n+\n \tif (!sk)\n \t\treturn false;\n \n@@ -92,6 +97,7 @@ static bool is_packet_valid(struct Qdisc *sch, struct sk_buff *nskb)\n \tif (sk->sk_txtime_deadline_mode != q->deadline_mode)\n \t\treturn false;\n \n+skip:\n \tnow = q->get_time();\n \tif (ktime_before(txtime, now) || ktime_before(txtime, q->last))\n \t\treturn false;\n@@ -385,6 +391,7 @@ static int etf_init(struct Qdisc *sch, struct nlattr *opt,\n \tq->clockid = qopt->clockid;\n \tq->offload = OFFLOAD_IS_ON(qopt);\n \tq->deadline_mode = DEADLINE_MODE_IS_ON(qopt);\n+\tq->skip_sock_check = SKIP_SOCK_CHECK_IS_SET(qopt);\n \n \tswitch (q->clockid) {\n \tcase CLOCK_REALTIME:\n@@ -473,6 +480,9 @@ static int etf_dump(struct Qdisc *sch, struct sk_buff *skb)\n \tif (q->deadline_mode)\n \t\topt.flags |= TC_ETF_DEADLINE_MODE_ON;\n \n+\tif (q->skip_sock_check)\n+\t\topt.flags |= TC_ETF_SKIP_SOCK_CHECK;\n+\n \tif (nla_put(skb, TCA_ETF_PARMS, sizeof(opt), &opt))\n \t\tgoto nla_put_failure;\n \n",
    "prefixes": [
        "net-next",
        "v3",
        "2/6"
    ]
}