get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 716298,
    "url": "http://patchwork.ozlabs.org/api/patches/716298/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170117163651.5423.70434.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": "<20170117163651.5423.70434.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-01-17T16:36:54",
    "name": "[next,v2,08/11] ixgbe: Add support for padding packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20170117163651.5423.70434.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/716298/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/716298/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 3v2wjn1DCsz9ryk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 18 Jan 2017 03:37:01 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B333488ABE;\n\tTue, 17 Jan 2017 16:36:59 +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 fMiNjcfHxbxk; Tue, 17 Jan 2017 16:36:58 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 468B688A38;\n\tTue, 17 Jan 2017 16:36:58 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id B53A61C0306\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Jan 2017 16:36:56 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A20563022F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Jan 2017 16:36:56 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ih4aHnmEPpHA for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Jan 2017 16:36:56 +0000 (UTC)",
            "from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 04C4B22E28\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Jan 2017 16:36:56 +0000 (UTC)",
            "by mail-pf0-f195.google.com with SMTP id e4so6253615pfg.0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Jan 2017 08:36:55 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tr8sm56987804pfa.44.2017.01.17.08.36.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 17 Jan 2017 08:36:55 -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=\"QhYHMVQk\"; 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:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=bk7JExNtoMZlkuQza2QhzWInE6d65Xv64kPcXqhuF4E=;\n\tb=QhYHMVQkWsNJ/HV6abdokruuNFWHLuHkqs2CTtc67M0n8/qUvWTTrF8HFFKH7wQOOI\n\tjhpUQOgC0RIoESXX2L1XsvZXkcZxU2VEYVEOXRQ1cORie4THXMy6Wl9rqfRNxby3mmI0\n\ty25DHBLzb/BNxY+0//dXrdq2XHH1XCfpTXtdPu4g5yNRxazmI5X/QzLaw3EbKc/krngI\n\tpIH/kNp6mHZJnKzmic3UROtiYnN4CNteYyMwlCkrDd4gOap6vQu9/u2pSVEXvLejWly6\n\tpyYD+rJw165tfhHgJVksGuQxExBcii6UVC0V22Ok5PN8AcI0mUhUt8HFxitJEd/HM7jG\n\tcwFQ==",
        "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:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=bk7JExNtoMZlkuQza2QhzWInE6d65Xv64kPcXqhuF4E=;\n\tb=JtBa4x3M5ibFZoehhLKIMGWbaXs10YSpq8tesuZuPUDsKQTdPOFf9hZ/ilqJ9Nzj7K\n\tAB9TKlxze/2Id2UNg4zgsza+8H2a9FEC23uEI4lgjVNXN+gOwf4BPJONHZudTn1VWrrn\n\tYbHBhS8aFTdLNJIylq5pSbfSxbhsL2XOxxE3eHfNPIuTF42XO8sued2+/j7Dif1X1hIo\n\tAQHnCw6vfejen88WnA3I2rA8KlWChKgCAP4FoVixkF2TQIHzmRUJgNIoVgf9ug+qwv0x\n\t8IpkNnUe/T1sNoKAZX9kVy8HUJcYKT7mQbIVCpfkW4LascPF1R3K3t1dEA4SXxFCbqIc\n\tUf2A==",
        "X-Gm-Message-State": "AIkVDXIFr3mhAC99aBPDMkWZxDdn/8Dus5g3qCrbCeyUCo22cbmg2RLsZtl7OE06KsBZfg==",
        "X-Received": "by 10.84.233.206 with SMTP id m14mr60694505pln.104.1484671015589;\n\tTue, 17 Jan 2017 08:36:55 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Tue, 17 Jan 2017 08:36:54 -0800",
        "Message-ID": "<20170117163651.5423.70434.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170117163401.5423.37993.stgit@localhost.localdomain>",
        "References": "<20170117163401.5423.37993.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH v2 08/11] ixgbe: Add support for\n\tpadding packet",
        "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",
        "v2",
        "08/11"
    ]
}