get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 867754,
    "url": "http://patchwork.ozlabs.org/api/patches/867754/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180131005133.19264.85496.stgit@localhost6.localdomain6/",
    "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": "<20180131005133.19264.85496.stgit@localhost6.localdomain6>",
    "list_archive_url": null,
    "date": "2018-01-31T00:51:33",
    "name": "[5/9] ixgbevf: add support for padding packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7cdc4e8a9ec05bd9862a1793415a2507abf6875f",
    "submitter": {
        "id": 1670,
        "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api",
        "name": "Tantilov, Emil S",
        "email": "emil.s.tantilov@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/20180131005133.19264.85496.stgit@localhost6.localdomain6/mbox/",
    "series": [
        {
            "id": 26180,
            "url": "http://patchwork.ozlabs.org/api/series/26180/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=26180",
            "date": "2018-01-31T00:51:07",
            "name": "ixgbevf: build_skb support and related changes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/26180/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/867754/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/867754/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>)",
        "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 3zWPg73gjpz9ryQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 31 Jan 2018 11:45:39 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D747D87DE1;\n\tWed, 31 Jan 2018 00:45:37 +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 vHMlxl3AJF_p; Wed, 31 Jan 2018 00:45:36 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id AEC8787DD3;\n\tWed, 31 Jan 2018 00:45:36 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8AF551C4377\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:35 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 872BB88E8D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:35 +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 D9EML-L9Jcyu for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:34 +0000 (UTC)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id DF25B88B60\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 31 Jan 2018 00:45:34 +0000 (UTC)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Jan 2018 16:45:34 -0800",
            "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.177.100])\n\tby fmsmga005.fm.intel.com with ESMTP; 30 Jan 2018 16:45:34 -0800"
        ],
        "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.46,437,1511856000\"; d=\"scan'208\";a=\"199952628\"",
        "From": "Emil Tantilov <emil.s.tantilov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 30 Jan 2018 16:51:33 -0800",
        "Message-ID": "<20180131005133.19264.85496.stgit@localhost6.localdomain6>",
        "In-Reply-To": "<20180131005015.19264.44085.stgit@localhost6.localdomain6>",
        "References": "<20180131005015.19264.44085.stgit@localhost6.localdomain6>",
        "User-Agent": "StGit/0.17.1-17-ge4e0",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH 5/9] ixgbevf: add support for padding\n\tpacket",
        "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>",
        "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": "Following the logic from commit 2de6aa3a666e\n(\"ixgbe: Add support for padding packet\")\n\nAdd 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: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      |   11 +++++++\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   32 ++++++++++++++++++---\n 2 files changed, 39 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\nindex d691d64..fe7111c 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n@@ -90,6 +90,7 @@ struct ixgbevf_rx_queue_stats {\n \n enum ixgbevf_ring_state_t {\n \t__IXGBEVF_RX_3K_BUFFER,\n+\t__IXGBEVF_RX_BUILD_SKB_ENABLED,\n \t__IXGBEVF_TX_DETECT_HANG,\n \t__IXGBEVF_HANG_CHECK_ARMED,\n };\n@@ -179,11 +180,21 @@ struct ixgbevf_ring {\n #define clear_ring_uses_large_buffer(ring) \\\n \tclear_bit(__IXGBEVF_RX_3K_BUFFER, &(ring)->state)\n \n+#define ring_uses_build_skb(ring) \\\n+\ttest_bit(__IXGBEVF_RX_BUILD_SKB_ENABLED, &(ring)->state)\n+#define set_ring_build_skb_enabled(ring) \\\n+\tset_bit(__IXGBEVF_RX_BUILD_SKB_ENABLED, &(ring)->state)\n+#define clear_ring_build_skb_enabled(ring) \\\n+\tclear_bit(__IXGBEVF_RX_BUILD_SKB_ENABLED, &(ring)->state)\n+\n static inline unsigned int ixgbevf_rx_bufsz(struct ixgbevf_ring *ring)\n {\n #if (PAGE_SIZE < 8192)\n \tif (ring_uses_large_buffer(ring))\n \t\treturn IXGBEVF_RXBUFFER_3072;\n+\n+\tif (ring_uses_build_skb(ring))\n+\t\treturn IXGBEVF_MAX_FRAME_BUILD_SKB;\n #endif\n \treturn IXGBEVF_RXBUFFER_2048;\n }\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex cb9d00a..d797265 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -554,6 +554,11 @@ static bool ixgbevf_is_non_eop(struct ixgbevf_ring *rx_ring,\n \treturn true;\n }\n \n+static inline unsigned int ixgbevf_rx_offset(struct ixgbevf_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? IXGBEVF_SKB_PAD : 0;\n+}\n+\n static bool ixgbevf_alloc_mapped_page(struct ixgbevf_ring *rx_ring,\n \t\t\t\t      struct ixgbevf_rx_buffer *bi)\n {\n@@ -588,7 +593,7 @@ static bool ixgbevf_alloc_mapped_page(struct ixgbevf_ring *rx_ring,\n \n \tbi->dma = dma;\n \tbi->page = page;\n-\tbi->page_offset = 0;\n+\tbi->page_offset = ixgbevf_rx_offset(rx_ring);\n \tbi->pagecnt_bias = 1;\n \trx_ring->rx_stats.alloc_rx_page++;\n \n@@ -803,7 +808,9 @@ static bool ixgbevf_add_rx_frag(struct ixgbevf_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = ixgbevf_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = ALIGN(size, L1_CACHE_BYTES);\n+\tunsigned int truesize = ring_uses_build_skb(rx_ring) ?\n+\t\t\t\tSKB_DATA_ALIGN(IXGBEVF_SKB_PAD + size) :\n+\t\t\t\tSKB_DATA_ALIGN(size);\n #endif\n \tunsigned int pull_len;\n \n@@ -1776,8 +1783,19 @@ static void ixgbevf_configure_rx_ring(struct ixgbevf_adapter *adapter,\n \n \tixgbevf_configure_srrctl(adapter, ring, reg_idx);\n \n-\t/* allow any size packet since we can handle overflow */\n-\trxdctl &= ~IXGBE_RXDCTL_RLPML_EN;\n+\t/* RXDCTL.RLPML does not work on 82599 */\n+\tif (adapter->hw.mac.type != ixgbe_mac_82599_vf) {\n+\t\trxdctl &= ~(IXGBE_RXDCTL_RLPMLMASK |\n+\t\t\t    IXGBE_RXDCTL_RLPML_EN);\n+\n+#if (PAGE_SIZE < 8192)\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   !ring_uses_large_buffer(ring))\n+\t\t\trxdctl |= IXGBEVF_MAX_FRAME_BUILD_SKB |\n+\t\t\t\t  IXGBE_RXDCTL_RLPML_EN;\n+#endif\n+\t}\n \n \trxdctl |= IXGBE_RXDCTL_ENABLE | IXGBE_RXDCTL_VME;\n \tIXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(reg_idx), rxdctl);\n@@ -1793,11 +1811,14 @@ static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter,\n \tunsigned int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;\n \n \t/* set build_skb and buffer size flags */\n+\tclear_ring_build_skb_enabled(rx_ring);\n \tclear_ring_uses_large_buffer(rx_ring);\n \n \tif (adapter->flags & IXGBEVF_FLAGS_LEGACY_RX)\n \t\treturn;\n \n+\tset_ring_build_skb_enabled(rx_ring);\n+\n #if (PAGE_SIZE < 8192)\n \tif (max_frame <= IXGBEVF_MAX_FRAME_BUILD_SKB)\n \t\treturn;\n@@ -3890,6 +3911,9 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu)\n \t/* must set new MTU before calling down or up */\n \tnetdev->mtu = new_mtu;\n \n+\tif (netif_running(netdev))\n+\t\tixgbevf_reinit_locked(adapter);\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "5/9"
    ]
}