get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 928778,
    "url": "http://patchwork.ozlabs.org/api/patches/928778/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180613090436.4266-1-daniel@iogearbox.net/",
    "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": "<20180613090436.4266-1-daniel@iogearbox.net>",
    "list_archive_url": null,
    "date": "2018-06-13T09:04:36",
    "name": "[net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3f4ad1b8c90f5a5b5c44cf3547c1eb66e23ca0c0",
    "submitter": {
        "id": 65705,
        "url": "http://patchwork.ozlabs.org/api/people/65705/?format=api",
        "name": "Daniel Borkmann",
        "email": "daniel@iogearbox.net"
    },
    "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/20180613090436.4266-1-daniel@iogearbox.net/mbox/",
    "series": [
        {
            "id": 49903,
            "url": "http://patchwork.ozlabs.org/api/series/49903/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=49903",
            "date": "2018-06-13T09:04:36",
            "name": "[net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/49903/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/928778/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/928778/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; dmarc=none (p=none dis=none)\n\theader.from=iogearbox.net"
        ],
        "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 415LS20T97z9s19\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Jun 2018 19:05:05 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7212A8B20C;\n\tWed, 13 Jun 2018 09:05:04 +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 4UJk9t185FTz; Wed, 13 Jun 2018 09:05:03 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id DAA238B205;\n\tWed, 13 Jun 2018 09:05:03 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 329C21C20E4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jun 2018 09:05:03 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7B0178B20B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jun 2018 09:04:52 +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 dwxTLG9MOmBE for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jun 2018 09:04:50 +0000 (UTC)",
            "from www62.your-server.de (www62.your-server.de [213.133.104.62])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 4F49D8B202\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Jun 2018 09:04:50 +0000 (UTC)",
            "from [178.197.249.11] (helo=localhost)\n\tby www62.your-server.de with esmtpsa\n\t(TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256)\n\t(Exim 4.85_2) (envelope-from <daniel@iogearbox.net>)\n\tid 1fT1ho-0002pB-QX; Wed, 13 Jun 2018 11:04:40 +0200"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org",
            "Clear (ClamAV 0.99.3/24658/Wed Jun 13 06:37:43 2018)"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "From": "Daniel Borkmann <daniel@iogearbox.net>",
        "To": "jeffrey.t.kirsher@intel.com",
        "Date": "Wed, 13 Jun 2018 11:04:36 +0200",
        "Message-Id": "<20180613090436.4266-1-daniel@iogearbox.net>",
        "X-Mailer": "git-send-email 2.9.5",
        "MIME-Version": "1.0",
        "X-Authenticated-Sender": "daniel@iogearbox.net",
        "Subject": "[Intel-wired-lan] [PATCH net/jkirsher] bpf, xdp,\n\ti40e: fix i40e_build_skb skb reserve and truesize",
        "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>",
        "Cc": "Daniel Borkmann <daniel@iogearbox.net>, netdev@vger.kernel.org,\n\tintel-wired-lan@lists.osuosl.org, keith.busch@linux.intel.com,\n\tmakita.toshiaki@lab.ntt.co.jp, bjorn.topel@intel.com",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start))\nis clearly wrong since I40E_SKB_PAD already points to the offset where\nthe original xdp->data was sitting since xdp->data_hard_start is defined\nas xdp->data - i40e_rx_offset(rx_ring) where latter offsets to I40E_SKB_PAD\nwhen build skb is used.\n\nHowever, also before cc5b114dcf98 (\"bpf, i40e: add meta data support\")\nthis seems broken since bpf_xdp_adjust_head() helper could have been used\nto alter headroom and enlarge / shrink the frame and with that the assumption\nthat the xdp->data remains unchanged does not hold and would push a bogus\npacket to upper stack.\n\nixgbe got this right in 924708081629 (\"ixgbe: add XDP support for pass and\ndrop actions\"). In any case, fix it by removing the I40E_SKB_PAD from both\nskb_reserve() and truesize calculation.\n\nFixes: cc5b114dcf98 (\"bpf, i40e: add meta data support\")\nFixes: 0c8493d90b6b (\"i40e: add XDP support for pass and drop actions\")\nReported-by: Keith Busch <keith.busch@linux.intel.com>\nReported-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>\nSigned-off-by: Daniel Borkmann <daniel@iogearbox.net>\nCc: Björn Töpel <bjorn.topel@intel.com>\nCc: John Fastabend <john.fastabend@gmail.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 8ffb745..ed6dbcf 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -2103,9 +2103,8 @@ static struct sk_buff *i40e_build_skb(struct i40e_ring *rx_ring,\n \tunsigned int truesize = i40e_rx_pg_size(rx_ring) / 2;\n #else\n \tunsigned int truesize = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) +\n-\t\t\t\tSKB_DATA_ALIGN(I40E_SKB_PAD +\n-\t\t\t\t\t       (xdp->data_end -\n-\t\t\t\t\t\txdp->data_hard_start));\n+\t\t\t\tSKB_DATA_ALIGN(xdp->data_end -\n+\t\t\t\t\t       xdp->data_hard_start);\n #endif\n \tstruct sk_buff *skb;\n \n@@ -2124,7 +2123,7 @@ static struct sk_buff *i40e_build_skb(struct i40e_ring *rx_ring,\n \t\treturn NULL;\n \n \t/* update pointers within the skb to store the data */\n-\tskb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start));\n+\tskb_reserve(skb, xdp->data - xdp->data_hard_start);\n \t__skb_put(skb, xdp->data_end - xdp->data);\n \tif (metasize)\n \t\tskb_metadata_set(skb, metasize);\n",
    "prefixes": [
        "net/jkirsher"
    ]
}