get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 711980,
    "url": "http://patchwork.ozlabs.org/api/patches/711980/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170106160726.1501.63698.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": "<20170106160726.1501.63698.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-01-06T16:07:28",
    "name": "[next,08/11] ixgbe: Add support for padding packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f991e2c790b5b534f3476fdef101e660a1a4fa47",
    "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/20170106160726.1501.63698.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/711980/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/711980/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3tw8Zv1ygtz9t0q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  7 Jan 2017 03:07:35 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id BB22D85AD9;\n\tFri,  6 Jan 2017 16:07:33 +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 5RwBDHNHandx; Fri,  6 Jan 2017 16:07:32 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8F70085B56;\n\tFri,  6 Jan 2017 16:07:32 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0DF351BFA57\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:07:31 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0798A89423\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:07:31 +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 Bk7-w6NU+PL4 for <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:07:30 +0000 (UTC)",
            "from mail-pg0-f68.google.com (mail-pg0-f68.google.com\n\t[74.125.83.68])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 473BA87F55\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:07:30 +0000 (UTC)",
            "by mail-pg0-f68.google.com with SMTP id i5so44441966pgh.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 06 Jan 2017 08:07:30 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tz9sm9384895pfg.86.2017.01.06.08.07.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 06 Jan 2017 08:07:29 -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=\"Exya4Cl4\"; 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:cc:date:message-id:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=bk7JExNtoMZlkuQza2QhzWInE6d65Xv64kPcXqhuF4E=;\n\tb=Exya4Cl48cXx9LMnFUMKm0XDoSW9jAQ1jun7uXDk4eqTxfz7rPcHg/S1GdJoBnBJad\n\t3rxCagynYfUIQO8j4rSGCZRr/Qkbech4gWSsNjc2/5M0j4jm2QZHm0D+sXv6IrD5pyyN\n\tT8aIvchrVSVCkiAIiUHsMj5Tdyar0HrEuFytSFDANKW4kHe+gY1XzOSl2As9cgWbd0Qj\n\tPRBrjM8JMdDJaXjzwEXv4zTQibrUgv1QApazuYh/P7Jz++fGlvldmUglsm1EcwL9oWZ6\n\tayGGMFGW7bfNG+BABmrUAqwOfB3UDDi5QTRI086gRhBdZ5lNhsfhoWOySUCWjrEie7XF\n\tBFgg==",
        "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:cc:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=bk7JExNtoMZlkuQza2QhzWInE6d65Xv64kPcXqhuF4E=;\n\tb=gGSx5b4AfVveAwG6Bb6RreVBzT4poylKw3XpVkvSeRkBvHuZrjlLwoM34yZv+f8yvR\n\tKztx50uRoCU5/wInBXnX7sJHji8X0NMydMSE/xLKWOxXo8RMhwkyoVKZIGtFxjcxWiZi\n\tiFT2f3N4TN5MVrEMyW58CfX9N83Q2B2vU/Gu0Vf8SoBSq0t/1MGSxBRYLbKp+E/w/PvM\n\tmfzPHKFYsWB5TsJnw4SmhsLVt/GEFIEPWe90ROjNM7DSPBzyxtOwH+XDcxK+8UdDcLF0\n\tCXZOreDRpOUCD/qx+HmoJjmkiTF4TiEPIxH5HMxS0OydjQ7L/kFk43Pm7WGHVSGuhm8L\n\tIldQ==",
        "X-Gm-Message-State": "AIkVDXLba5+VmEg1mRa4h4+tvZAOQCzcAn5lMprw1v2tL1BFQKDjhyCwDEAaWjMtWFEFjw==",
        "X-Received": "by 10.99.207.17 with SMTP id j17mr139050728pgg.57.1483718849921; \n\tFri, 06 Jan 2017 08:07:29 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Fri, 06 Jan 2017 08:07:28 -0800",
        "Message-ID": "<20170106160726.1501.63698.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170106155448.1501.31298.stgit@localhost.localdomain>",
        "References": "<20170106155448.1501.31298.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Cc": "netdev@vger.kernel.org",
        "Subject": "[Intel-wired-lan] [next PATCH 08/11] ixgbe: Add support for padding\n\tpacket",
        "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 adds support for providing a buffer with headroom and tailroom\nto allow for shared info, NET_SKB_PAD, and NET_IP_ALIGN.  With this\ncombined with the DMA changes we can start using build_skb to build frames\naround an incoming Rx buffer instead of having to memcpy the headers.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h      |   17 ++++++++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   43 +++++++++++++++++++++++--\n 2 files changed, 56 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 80328e657d6a..3537d07b4807 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -94,6 +94,14 @@\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+#if (PAGE_SIZE < 8192)\n+#define IXGBE_MAX_FRAME_BUILD_SKB \\\n+\t(SKB_WITH_OVERHEAD(IXGBE_RXBUFFER_2K) - IXGBE_SKB_PAD)\n+#else\n+#define IGB_MAX_FRAME_BUILD_SKB IXGBE_RXBUFFER_2K\n+#endif\n+\n /*\n  * NOTE: netdev_alloc_skb reserves up to 64 bytes, NET_IP_ALIGN means we\n  * reserve 64 more, and skb_shared_info adds an additional 320 bytes more,\n@@ -235,6 +243,7 @@ struct ixgbe_rx_queue_stats {\n \n enum ixgbe_ring_state_t {\n \t__IXGBE_RX_3K_BUFFER,\n+\t__IXGBE_RX_BUILD_SKB_ENABLED,\n \t__IXGBE_RX_RSC_ENABLED,\n \t__IXGBE_RX_CSUM_UDP_ZERO_ERR,\n \t__IXGBE_RX_FCOE,\n@@ -244,6 +253,9 @@ enum ixgbe_ring_state_t {\n \t__IXGBE_HANG_CHECK_ARMED,\n };\n \n+#define ring_uses_build_skb(ring) \\\n+\ttest_bit(__IXGBE_RX_BUILD_SKB_ENABLED, &(ring)->state)\n+\n struct ixgbe_fwd_adapter {\n \tunsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];\n \tstruct net_device *netdev;\n@@ -355,6 +367,10 @@ static inline unsigned int ixgbe_rx_bufsz(struct ixgbe_ring *ring)\n {\n \tif (test_bit(__IXGBE_RX_3K_BUFFER, &ring->state))\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+#endif\n \treturn IXGBE_RXBUFFER_2K;\n }\n \n@@ -670,6 +686,7 @@ struct ixgbe_adapter {\n #define IXGBE_FLAG2_VLAN_PROMISC\t\tBIT(13)\n #define IXGBE_FLAG2_EEE_CAPABLE\t\t\tBIT(14)\n #define IXGBE_FLAG2_EEE_ENABLED\t\t\tBIT(15)\n+#define IXGBE_FLAG2_RX_LEGACY\t\t\tBIT(16)\n \n \t/* Tx fast path data */\n \tint num_tx_queues;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 79495cc990c2..8529eafb9717 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1565,6 +1565,11 @@ static inline void ixgbe_rx_checksum(struct ixgbe_ring *ring,\n \t}\n }\n \n+static inline unsigned int ixgbe_rx_offset(struct ixgbe_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? IXGBE_SKB_PAD : 0;\n+}\n+\n static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,\n \t\t\t\t    struct ixgbe_rx_buffer *bi)\n {\n@@ -1601,7 +1606,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,\n \n \tbi->dma = dma;\n \tbi->page = page;\n-\tbi->page_offset = 0;\n+\tbi->page_offset = ixgbe_rx_offset(rx_ring);\n \tbi->pagecnt_bias = 1;\n \n \treturn true;\n@@ -2018,7 +2023,9 @@ static void ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = ixgbe_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = SKB_DATA_ALIGN(size);\n+\tunsigned int truesize = ring_uses_build_skb(rx_ring) ?\n+\t\t\t\tSKB_DATA_ALIGN(IXGBE_SKB_PAD + size) :\n+\t\t\t\tSKB_DATA_ALIGN(size);\n #endif\n \tskb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, rx_buffer->page,\n \t\t\trx_buffer->page_offset, size, truesize);\n@@ -2100,7 +2107,7 @@ static struct sk_buff *ixgbe_construct_skb(struct ixgbe_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = ixgbe_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = ALIGN(size, L1_CACHE_BYTES);\n+\tunsigned int truesize = SKB_DATA_ALIGN(size);\n #endif\n \tstruct sk_buff *skb;\n \n@@ -3462,7 +3469,10 @@ static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter,\n \tsrrctl = IXGBE_RX_HDR_SIZE << IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT;\n \n \t/* configure the packet buffer length */\n-\tsrrctl |= ixgbe_rx_bufsz(rx_ring) >> IXGBE_SRRCTL_BSIZEPKT_SHIFT;\n+\tif (test_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state))\n+\t\tsrrctl |= IXGBE_RXBUFFER_3K >> IXGBE_SRRCTL_BSIZEPKT_SHIFT;\n+\telse\n+\t\tsrrctl |= IXGBE_RXBUFFER_2K >> IXGBE_SRRCTL_BSIZEPKT_SHIFT;\n \n \t/* configure descriptor type */\n \tsrrctl |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF;\n@@ -3796,6 +3806,17 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,\n \t\t */\n \t\trxdctl &= ~0x3FFFFF;\n \t\trxdctl |=  0x080420;\n+#if (PAGE_SIZE < 8192)\n+\t} else {\n+\t\trxdctl &= ~(IXGBE_RXDCTL_RLPMLMASK |\n+\t\t\t    IXGBE_RXDCTL_RLPML_EN);\n+\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\t\t  IXGBE_RXDCTL_RLPML_EN;\n+#endif\n \t}\n \n \t/* initialize Rx descriptor 0 */\n@@ -3941,12 +3962,26 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)\n \n \t\tclear_ring_rsc_enabled(rx_ring);\n \t\tclear_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);\n+\t\tclear_bit(__IXGBE_RX_BUILD_SKB_ENABLED, &rx_ring->state);\n \n \t\tif (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)\n \t\t\tset_ring_rsc_enabled(rx_ring);\n \n \t\tif (test_bit(__IXGBE_RX_FCOE, &rx_ring->state))\n \t\t\tset_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);\n+\n+\t\tif (adapter->flags2 & IXGBE_FLAG2_RX_LEGACY)\n+\t\t\tcontinue;\n+\n+\t\tset_bit(__IXGBE_RX_BUILD_SKB_ENABLED, &rx_ring->state);\n+\n+#if (PAGE_SIZE < 8192)\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\tset_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);\n+#endif\n \t}\n }\n \n",
    "prefixes": [
        "next",
        "08/11"
    ]
}