get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 887200,
    "url": "http://patchwork.ozlabs.org/api/patches/887200/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180316223406.7295-5-anthony.l.nguyen@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": "<20180316223406.7295-5-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2018-03-16T22:34:05",
    "name": "[4/5] ixgbevf: Add support for meta data",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9d48cfc451e835aa5f6fa622970cdf8c22a9c1ca",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20180316223406.7295-5-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 34301,
            "url": "http://patchwork.ozlabs.org/api/series/34301/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34301",
            "date": "2018-03-16T22:34:04",
            "name": "Enable XDP for ixgbevf",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/34301/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/887200/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/887200/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=none (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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4030qV2bWmz9sSy\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 17 Mar 2018 09:43:34 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D254B88A08;\n\tFri, 16 Mar 2018 22:43:32 +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 subJ5ANP1ah0; Fri, 16 Mar 2018 22:43:32 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5FB4288A18;\n\tFri, 16 Mar 2018 22:43:31 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 047F81C218D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:29 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 004C989925\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:29 +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 hVlVmxFgyRa9 for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 6A4488306D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Mar 2018 15:43:24 -0700",
            "from unknown (HELO anguy11-linux.jf.intel.com) ([10.166.244.153])\n\tby orsmga007.jf.intel.com with ESMTP; 16 Mar 2018 15:43:24 -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",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,317,1517904000\"; d=\"scan'208\";a=\"25375069\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 16 Mar 2018 15:34:05 -0700",
        "Message-Id": "<20180316223406.7295-5-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>",
        "References": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 4/5] ixgbevf: Add support for meta data",
        "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": "netdev@vger.kernel.org",
        "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": "Add support for XDP meta data when using build skb.\n\nBased on commit 366a88fe2f40 (\"bpf, ixgbe: add meta data support\")\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nAcked-by: John Fastabend <john.fastabend@gmail.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 29 +++++++++++++++++++----\n 1 file changed, 25 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex 5167e81e0cf1..3d9033f26eff 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -889,6 +889,20 @@ struct sk_buff *ixgbevf_construct_skb(struct ixgbevf_ring *rx_ring,\n #if L1_CACHE_BYTES < 128\n \tprefetch(xdp->data + L1_CACHE_BYTES);\n #endif\n+\t/* Note, we get here by enabling legacy-rx via:\n+\t *\n+\t *    ethtool --set-priv-flags <dev> legacy-rx on\n+\t *\n+\t * In this mode, we currently get 0 extra XDP headroom as\n+\t * opposed to having legacy-rx off, where we process XDP\n+\t * packets going to stack via ixgbevf_build_skb().\n+\t *\n+\t * For ixgbevf_construct_skb() mode it means that the\n+\t * xdp->data_meta will always point to xdp->data, since\n+\t * the helper cannot expand the head. Should this ever\n+\t * changed in future for legacy-rx mode on, then lets also\n+\t * add xdp->data_meta handling here.\n+\t */\n \n \t/* allocate a skb to store the frags */\n \tskb = napi_alloc_skb(&rx_ring->q_vector->napi, IXGBEVF_RX_HDR_SIZE);\n@@ -936,6 +950,7 @@ static struct sk_buff *ixgbevf_build_skb(struct ixgbevf_ring *rx_ring,\n \t\t\t\t\t struct xdp_buff *xdp,\n \t\t\t\t\t union ixgbe_adv_rx_desc *rx_desc)\n {\n+\tunsigned int metasize = xdp->data - xdp->data_meta;\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = ixgbevf_rx_pg_size(rx_ring) / 2;\n #else\n@@ -945,10 +960,14 @@ static struct sk_buff *ixgbevf_build_skb(struct ixgbevf_ring *rx_ring,\n #endif\n \tstruct sk_buff *skb;\n \n-\t/* prefetch first cache line of first page */\n-\tprefetch(xdp->data);\n+\t/* Prefetch first cache line of first page. If xdp->data_meta\n+\t * is unused, this points to xdp->data, otherwise, we likely\n+\t * have a consumer accessing first few bytes of meta data,\n+\t * and then actual data.\n+\t */\n+\tprefetch(xdp->data_meta);\n #if L1_CACHE_BYTES < 128\n-\tprefetch(xdp->data + L1_CACHE_BYTES);\n+\tprefetch(xdp->data_meta + L1_CACHE_BYTES);\n #endif\n \n \t/* build an skb around the page buffer */\n@@ -959,6 +978,8 @@ static struct sk_buff *ixgbevf_build_skb(struct ixgbevf_ring *rx_ring,\n \t/* update pointers within the skb to store the data */\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 \n \t/* update buffer offset */\n #if (PAGE_SIZE < 8192)\n@@ -1126,7 +1147,7 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,\n \t\tif (!skb) {\n \t\t\txdp.data = page_address(rx_buffer->page) +\n \t\t\t\t   rx_buffer->page_offset;\n-\t\t\txdp_set_data_meta_invalid(&xdp);\n+\t\t\txdp.data_meta = xdp.data;\n \t\t\txdp.data_hard_start = xdp.data -\n \t\t\t\t\t      ixgbevf_rx_offset(rx_ring);\n \t\t\txdp.data_end = xdp.data + size;\n",
    "prefixes": [
        "4/5"
    ]
}