get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 686222,
    "url": "http://patchwork.ozlabs.org/api/patches/686222/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1477348599-30723-2-git-send-email-jeffrey.t.kirsher@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": "<1477348599-30723-2-git-send-email-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2016-10-24T22:36:39",
    "name": "[2/2] ixgbe: ixgbe_atr() compute l4_proto only if non-paged data has network/transport headers",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c3c2dc70db0cad6d58184613e67b355c878fd530",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@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/1477348599-30723-2-git-send-email-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/686222/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/686222/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3t2rk61FLgz9vDW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 25 Oct 2016 09:36:46 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7B0ED8B0A6;\n\tMon, 24 Oct 2016 22:36:44 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Qq4q7z6Xc2Ui; Mon, 24 Oct 2016 22:36:44 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 133FF8B1F1;\n\tMon, 24 Oct 2016 22:36:44 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 51A601C11DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 24 Oct 2016 22:36:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4CEC88B05F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 24 Oct 2016 22:36:43 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id MMc-vs1PqmU5 for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 24 Oct 2016 22:36:41 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 5FF3D8B068\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 24 Oct 2016 22:36:41 +0000 (UTC)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga102.jf.intel.com with ESMTP; 24 Oct 2016 15:36:41 -0700",
            "from jtkirshe-linux.jf.intel.com ([134.134.3.176])\n\tby orsmga003.jf.intel.com with ESMTP; 24 Oct 2016 15:36:41 -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.31,543,1473145200\"; d=\"scan'208\";a=\"893503052\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 24 Oct 2016 15:36:39 -0700",
        "Message-Id": "<1477348599-30723-2-git-send-email-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1477348599-30723-1-git-send-email-jeffrey.t.kirsher@intel.com>",
        "References": "<1477348599-30723-1-git-send-email-jeffrey.t.kirsher@intel.com>",
        "Cc": "Sowmini Varadhan <sowmini.varadhan@oracle.com>",
        "Subject": "[Intel-wired-lan] [PATCH 2/2] ixgbe: ixgbe_atr() compute l4_proto\n\tonly if non-paged data has network/transport headers",
        "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>",
        "MIME-Version": "1.0",
        "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: Sowmini Varadhan <sowmini.varadhan@oracle.com>\n\nFor some Tx paths (e.g., tpacket_snd()), ixgbe_atr may be\npassed down an sk_buff that has the network and transport\nheader in the paged data, so it needs to make sure these\nheaders are available in the headlen bytes to calculate the\nl4_proto.\n\nThis patch expect that network and transport headers are\nalready available in the non-paged header dat.  The assumption\nis that the caller has set this up if l4_proto based Tx\nsteering is desired.\n\nSigned-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>\nReviewed-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex e4a3227..2436984 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -54,6 +54,7 @@\n #include <net/pkt_cls.h>\n #include <net/tc_act/tc_gact.h>\n #include <net/tc_act/tc_mirred.h>\n+#include <net/vxlan.h>\n \n #include \"ixgbe.h\"\n #include \"ixgbe_common.h\"\n@@ -7660,11 +7661,17 @@ static void ixgbe_atr(struct ixgbe_ring *ring,\n \t/* snag network header to get L4 type and address */\n \tskb = first->skb;\n \thdr.network = skb_network_header(skb);\n+\tif (unlikely(hdr.network <= skb->data))\n+\t\treturn;\n \tif (skb->encapsulation &&\n \t    first->protocol == htons(ETH_P_IP) &&\n \t    hdr.ipv4->protocol == IPPROTO_UDP) {\n \t\tstruct ixgbe_adapter *adapter = q_vector->adapter;\n \n+\t\tif (unlikely(skb_tail_pointer(skb) < hdr.network +\n+\t\t\t     VXLAN_HEADROOM))\n+\t\t\treturn;\n+\n \t\t/* verify the port is recognized as VXLAN */\n \t\tif (adapter->vxlan_port &&\n \t\t    udp_hdr(skb)->dest == adapter->vxlan_port)\n@@ -7675,6 +7682,12 @@ static void ixgbe_atr(struct ixgbe_ring *ring,\n \t\t\thdr.network = skb_inner_network_header(skb);\n \t}\n \n+\t/* Make sure we have at least [minimum IPv4 header + TCP]\n+\t * or [IPv6 header] bytes\n+\t */\n+\tif (unlikely(skb_tail_pointer(skb) < hdr.network + 40))\n+\t\treturn;\n+\n \t/* Currently only IPv4/IPv6 with TCP is supported */\n \tswitch (hdr.ipv4->version) {\n \tcase IPVERSION:\n@@ -7694,6 +7707,10 @@ static void ixgbe_atr(struct ixgbe_ring *ring,\n \tif (l4_proto != IPPROTO_TCP)\n \t\treturn;\n \n+\tif (unlikely(skb_tail_pointer(skb) < hdr.network +\n+\t\t     hlen + sizeof(struct tcphdr)))\n+\t\treturn;\n+\n \tth = (struct tcphdr *)(hdr.network + hlen);\n \n \t/* skip this packet since the socket is closing */\n",
    "prefixes": [
        "2/2"
    ]
}