get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 734852,
    "url": "http://patchwork.ozlabs.org/api/patches/734852/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170302230105.8817.27738.stgit@localhost.localdomain/",
    "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": "<20170302230105.8817.27738.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-03-02T23:01:05",
    "name": "[next] ixgbe: Add support for maximum headroom when using build_skb",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2c8b8ff7e7f48e471455c87d481bf35e1f9e6430",
    "submitter": {
        "id": 252,
        "url": "http://patchwork.ozlabs.org/api/people/252/?format=api",
        "name": "Alexander Duyck",
        "email": "alexander.duyck@gmail.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/20170302230105.8817.27738.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/734852/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/734852/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 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 3vZ78m3Cnmz9s7b\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  3 Mar 2017 10:01:12 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8E7B588D98;\n\tThu,  2 Mar 2017 23:01:10 +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 C4KJylRG_wq7; Thu,  2 Mar 2017 23:01:08 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9BD6288D73;\n\tThu,  2 Mar 2017 23:01:08 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id AA3401C0364\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  2 Mar 2017 23:01:07 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A43F68A6BE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  2 Mar 2017 23:01:07 +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 TB6iY+EeLQji for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  2 Mar 2017 23:01:07 +0000 (UTC)",
            "from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 0029F8A6BF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  2 Mar 2017 23:01:06 +0000 (UTC)",
            "by mail-pf0-f195.google.com with SMTP id j5so8001013pfb.3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 02 Mar 2017 15:01:06 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tq7sm19004782pfb.98.2017.03.02.15.01.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 02 Mar 2017 15:01:05 -0800 (PST)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"b1wLlYBS\"; dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:user-agent:mime-version\n\t:content-transfer-encoding;\n\tbh=FRGQoRdAsp4ld3pUaznA4ySFZ6/BwfC6zbc9uoG04Lo=;\n\tb=b1wLlYBSojcwekrC+wudbXMBbg8EoYBzwOT2b3ZZWSIaG3BnYGsTGHkkqyoNbil9U3\n\tqAN7xOuaVEiA0uImjje1acd3YQMch6yaLmSFaGmcuR+rCgpA0yawX7TfX9bTw0zDOu0l\n\tXW306AsnEDOIDjU1jVDoQXP16gsxfjaItbcmijXWRccsQ5rvUw131XPFZ8hYjcB8wYT7\n\tMqrB6yX9phZ5vM5X86tcFRDblp1Mz/X0RkUKPrvQ+h/BLn/h5XhORzPNTauELHci3KLS\n\tUJpQLhvl6V2iraq+WPMQTKW2wZ0VaJMlqa9f9fJQVD1qqfAZxZvl8+MUHlUndqr0EfA+\n\tBoLw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:date:message-id:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=FRGQoRdAsp4ld3pUaznA4ySFZ6/BwfC6zbc9uoG04Lo=;\n\tb=kcJDBJz7Yb165H9g3Ly3g4Oi7yAcz7bsOZLm42tiweYLPI5GdnF7dKOgjxFsG0YzFu\n\t/SXQtaOZcgDzp//L0Cjfg7rbs/Vd9pzZV4DvklsJetyqt6TTe7svjN2NymsQ42OckmqG\n\t5VJnv3WctPpkQji10aboKV+CZEoRtVebyvWF2qZLbEDHbjZzJqVFG/tyWAoOfrmGYquw\n\twe1ywlyzrCnar2IyXx88XPGZh2q8YkjAeUVMUsTp+haD+owsMW6gnqwRX/2/sf7AK7rV\n\t0venBbNSyyGElO81RpcbTMOWaywEkfO+N8IcD7QAd7yc/wnC1nyUNqZnDbYJoZ/LPJQI\n\tqX2Q==",
        "X-Gm-Message-State": "AMke39kkuamhRC/1vgCLqEFJUSIsJ+QT5ShZ12e+Xa9aLa6hnBdsGAYaugtyQ/3nLPiNHw==",
        "X-Received": "by 10.99.237.17 with SMTP id d17mr18234081pgi.82.1488495666521; \n\tThu, 02 Mar 2017 15:01:06 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "john.r.fastabend@intel.com, intel-wired-lan@lists.osuosl.org,\n\tjeffrey.t.kirsher@intel.com",
        "Date": "Thu, 02 Mar 2017 15:01:05 -0800",
        "Message-ID": "<20170302230105.8817.27738.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH] ixgbe: Add support for maximum\n\theadroom when using build_skb",
        "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>",
        "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: Alexander Duyck <alexander.h.duyck@intel.com>\n\nThis patch increases the headroom allocated when using build_skb on a\nsystem with 4K pages.  Specifically the breakdown of headroom versus cache\nsize is as follows:\n    L1 Cache Size           Headroom\n    64                      192\n    64, NET_IP_ALIGN == 2   194\n    128                     128\n    128, NET_IP_ALIGN == 2  130\n    256                     512\n    256, NET_IP_ALIGN == 2  258\n\nI stopped at supporting only a cache line size of 256 as that was the\nlargest cache size I could find supported in the kernel.\n\nWith this we are guaranteeing at least 128 bytes of headroom to spare in\nthe frame.  This should be enough for us to insert a couple of IPv6 headers\nif needed which is likely enough room for anything XDP should need.\n\nI'm leaving the padding for systems with pages larger than 4K unmodified\nfor now.  XDP currently isn't really setup to work on those types of\nsystems so we can cross that bridge when we get there.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h      |   55 +++++++++++++++++++++++--\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    6 +--\n 2 files changed, 53 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex b812913123a0..000cc1e0970e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -86,17 +86,62 @@\n \n /* Supported Rx Buffer Sizes */\n #define IXGBE_RXBUFFER_256    256  /* Used for skb receive header */\n+#define IXGBE_RXBUFFER_1536  1536\n #define IXGBE_RXBUFFER_2K    2048\n #define IXGBE_RXBUFFER_3K    3072\n #define IXGBE_RXBUFFER_4K    4096\n #define IXGBE_MAX_RXBUFFER  16384  /* largest size for a single descriptor */\n \n-#define IXGBE_SKB_PAD\t\t(NET_SKB_PAD + NET_IP_ALIGN)\n+/* Attempt to maximize the headroom available for incoming frames.  We\n+ * use a 2K buffer for receives and need 1536/1534 to store the data for\n+ * the frame.  This leaves us with 512 bytes of room.  From that we need\n+ * to deduct the space needed for the shared info and the padding needed\n+ * to IP align the frame.\n+ *\n+ * Note: For cache line sizes 256 or larger this value is going to end\n+ *\t up negative.  In these cases we should fall back to the 3K\n+ *\t buffers.\n+ */\n #if (PAGE_SIZE < 8192)\n-#define IXGBE_MAX_FRAME_BUILD_SKB \\\n-\t(SKB_WITH_OVERHEAD(IXGBE_RXBUFFER_2K) - IXGBE_SKB_PAD)\n+#define IXGBE_MAX_2K_FRAME_BUILD_SKB (IXGBE_RXBUFFER_1536 - NET_IP_ALIGN)\n+#define IXGBE_2K_TOO_SMALL_WITH_PADDING \\\n+((NET_SKB_PAD + IXGBE_RXBUFFER_1536) > SKB_WITH_OVERHEAD(IXGBE_RXBUFFER_2K))\n+\n+static inline int ixgbe_compute_pad(int rx_buf_len)\n+{\n+\tint page_size, pad_size;\n+\n+\tpage_size = ALIGN(rx_buf_len, PAGE_SIZE / 2);\n+\tpad_size = SKB_WITH_OVERHEAD(page_size) - rx_buf_len;\n+\n+\treturn pad_size;\n+}\n+\n+static inline int ixgbe_skb_pad(void)\n+{\n+\tint rx_buf_len;\n+\n+\t/* If a 2K buffer cannot handle a standard Ethernet frame then\n+\t * optimize padding for a 3K buffer instead of a 1.5K buffer.\n+\t *\n+\t * For a 3K buffer we need to add enough padding to allow for\n+\t * tailroom due to NET_IP_ALIGN possibly shifting us out of\n+\t * cache-line alignment.\n+\t */\n+\tif (IXGBE_2K_TOO_SMALL_WITH_PADDING)\n+\t\trx_buf_len = IXGBE_RXBUFFER_3K + SKB_DATA_ALIGN(NET_IP_ALIGN);\n+\telse\n+\t\trx_buf_len = IXGBE_RXBUFFER_1536;\n+\n+\t/* if needed make room for NET_IP_ALIGN */\n+\trx_buf_len -= NET_IP_ALIGN;\n+\n+\treturn ixgbe_compute_pad(rx_buf_len);\n+}\n+\n+#define IXGBE_SKB_PAD\tixgbe_skb_pad()\n #else\n-#define IXGBE_MAX_FRAME_BUILD_SKB IXGBE_RXBUFFER_2K\n+#define IXGBE_SKB_PAD\t(NET_SKB_PAD + NET_IP_ALIGN)\n #endif\n \n /*\n@@ -361,7 +406,7 @@ static inline unsigned int ixgbe_rx_bufsz(struct ixgbe_ring *ring)\n \t\treturn IXGBE_RXBUFFER_3K;\n #if (PAGE_SIZE < 8192)\n \tif (ring_uses_build_skb(ring))\n-\t\treturn IXGBE_MAX_FRAME_BUILD_SKB;\n+\t\treturn IXGBE_MAX_2K_FRAME_BUILD_SKB;\n #endif\n \treturn IXGBE_RXBUFFER_2K;\n }\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 7604f46bf9dc..a922a2c2e4b6 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -3789,7 +3789,7 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,\n \t\t/* Limit the maximum frame size so we don't overrun the skb */\n \t\tif (ring_uses_build_skb(ring) &&\n \t\t    !test_bit(__IXGBE_RX_3K_BUFFER, &ring->state))\n-\t\t\trxdctl |= IXGBE_MAX_FRAME_BUILD_SKB |\n+\t\t\trxdctl |= IXGBE_MAX_2K_FRAME_BUILD_SKB |\n \t\t\t\t  IXGBE_RXDCTL_RLPML_EN;\n #endif\n \t}\n@@ -3959,8 +3959,8 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)\n \t\tif (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)\n \t\t\tset_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);\n \n-\t\tif ((max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) ||\n-\t\t    (max_frame > IXGBE_MAX_FRAME_BUILD_SKB))\n+\t\tif (IXGBE_2K_TOO_SMALL_WITH_PADDING ||\n+\t\t    (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)))\n \t\t\tset_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);\n #endif\n \t}\n",
    "prefixes": [
        "next"
    ]
}