Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/747506/?format=api
{ "id": 747506, "url": "http://patchwork.ozlabs.org/api/patches/747506/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170405115103.67374-10-alice.michael@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": "<20170405115103.67374-10-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-04-05T11:51:02", "name": "[next,S66,v2,10/11] i40e/i40evf: Add support for padding start of frames", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "dc78a8d31f4fe21fa24cbb9886ae6dd4125d5dea", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@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/20170405115103.67374-10-alice.michael@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/747506/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/747506/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 3vyxP55DFtz9s9N\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 6 Apr 2017 05:54:01 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 45A308619B;\n\tWed, 5 Apr 2017 19:54:00 +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 ep8yXMY7Gzz9; Wed, 5 Apr 2017 19:53:54 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id D1BEB863EE;\n\tWed, 5 Apr 2017 19:53:51 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 103901C0100\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Apr 2017 19:53:49 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 095B486B9D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Apr 2017 19:53:49 +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 PJkyiSfFwHFG for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Apr 2017 19:53:48 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id EBFB286BF0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 5 Apr 2017 19:53:47 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Apr 2017 12:53:47 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga003.jf.intel.com with ESMTP; 05 Apr 2017 12:53:47 -0700" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" (0-bit key;\n\tunprotected) header.d=intel.com header.i=@intel.com\n\theader.b=\"sHAkNoPr\"; 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=simple/simple;\n\td=intel.com; i=@intel.com; q=dns/txt; s=intel;\n\tt=1491422027; x=1522958027;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=XYYCHvQK4esxfrv6J5+8KYJGdM2a2x3hbaXnUQtIZxw=;\n\tb=sHAkNoPrjA5CUDJSwPOBSXh/Fb4bqrVVCqu3y1ud++kMiHbxBmPN0Cr3\n\tXbKNJTd5/uJ1wxUXwHqz0iQQhlnzzQ==;", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.37,280,1488873600\"; d=\"scan'208\";a=\"952301608\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Wed, 5 Apr 2017 07:51:02 -0400", "Message-Id": "<20170405115103.67374-10-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170405115103.67374-1-alice.michael@intel.com>", "References": "<20170405115103.67374-1-alice.michael@intel.com>", "Subject": "[Intel-wired-lan] [next S66 v2 10/11] i40e/i40evf: Add support for\n\tpadding start of frames", "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>", "MIME-Version": "1.0", "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 padding to the start of frames to make room for headroom\nfor us to eventually start using build_skb. Right now we guarantee at\nleast NET_SKB_PAD + NET_IP_ALIGN, however we allocate more space if more is\navailable. For example on x86 the headroom should be 192 bytes.\n\nOn systems that have too large of a cache line size to support storing 1.5K\npadding and shared info we default to using 3K buffers and reserve\neverything that isn't used for skb_shared_info or the data buffer for\nheadroom.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\nChange-ID: I33c641c9a1ea10cf7cc484c2d20985368d2d709a\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++-\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 15 +++++-\n drivers/net/ethernet/intel/i40e/i40e_txrx.h | 70 ++++++++++++++++++++++++-\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 15 +++++-\n drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 70 ++++++++++++++++++++++++-\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++-\n 6 files changed, 179 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 859c8e1..273f9aa 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -3038,6 +3038,12 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)\n \t\treturn -ENOMEM;\n \t}\n \n+\t/* configure Rx buffer alignment */\n+\tif (!vsi->netdev || (vsi->back->flags & I40E_FLAG_LEGACY_RX))\n+\t\tclear_ring_build_skb_enabled(ring);\n+\telse\n+\t\tset_ring_build_skb_enabled(ring);\n+\n \t/* cache tail for quicker writes, and clear the reg before use */\n \tring->tail = hw->hw_addr + I40E_QRX_TAIL(pf_q);\n \twritel(0, ring->tail);\n@@ -3079,7 +3085,8 @@ static int i40e_vsi_configure_rx(struct i40e_vsi *vsi)\n \t\tvsi->max_frame = I40E_MAX_RXBUFFER;\n \t\tvsi->rx_buf_len = I40E_RXBUFFER_2048;\n #if (PAGE_SIZE < 8192)\n-\t} else if (vsi->netdev->mtu <= ETH_DATA_LEN) {\n+\t} else if (!I40E_2K_TOO_SMALL_WITH_PADDING &&\n+\t\t (vsi->netdev->mtu <= ETH_DATA_LEN)) {\n \t\tvsi->max_frame = I40E_RXBUFFER_1536 - NET_IP_ALIGN;\n \t\tvsi->rx_buf_len = I40E_RXBUFFER_1536 - NET_IP_ALIGN;\n #endif\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex bee1672..4b31aec 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1248,6 +1248,17 @@ static inline void i40e_release_rx_desc(struct i40e_ring *rx_ring, u32 val)\n }\n \n /**\n+ * i40e_rx_offset - Return expected offset into page to access data\n+ * @rx_ring: Ring we are requesting offset of\n+ *\n+ * Returns the offset value for ring into the data buffer.\n+ */\n+static inline unsigned int i40e_rx_offset(struct i40e_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? I40E_SKB_PAD : 0;\n+}\n+\n+/**\n * i40e_alloc_mapped_page - recycle or make a new page\n * @rx_ring: ring to use\n * @bi: rx_buffer struct to modify\n@@ -1291,7 +1302,7 @@ static bool i40e_alloc_mapped_page(struct i40e_ring *rx_ring,\n \n \tbi->dma = dma;\n \tbi->page = page;\n-\tbi->page_offset = 0;\n+\tbi->page_offset = i40e_rx_offset(rx_ring);\n \n \t/* initialize pagecnt_bias to 1 representing we fully own page */\n \tbi->pagecnt_bias = 1;\n@@ -1696,7 +1707,7 @@ static void i40e_add_rx_frag(struct i40e_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = i40e_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = SKB_DATA_ALIGN(size);\n+\tunsigned int truesize =\tSKB_DATA_ALIGN(size + i40e_rx_offset(rx_ring));\n #endif\n \n \tskb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, rx_buffer->page,\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\nindex 2f61853..f5de511 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n@@ -135,6 +135,58 @@ enum i40e_dyn_idx_t {\n #define I40E_RX_DMA_ATTR \\\n \t(DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING)\n \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 legacy\n+ *\t receive path.\n+ */\n+#if (PAGE_SIZE < 8192)\n+#define I40E_2K_TOO_SMALL_WITH_PADDING \\\n+((NET_SKB_PAD + I40E_RXBUFFER_1536) > SKB_WITH_OVERHEAD(I40E_RXBUFFER_2048))\n+\n+static inline int i40e_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 i40e_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 (I40E_2K_TOO_SMALL_WITH_PADDING)\n+\t\trx_buf_len = I40E_RXBUFFER_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN);\n+\telse\n+\t\trx_buf_len = I40E_RXBUFFER_1536;\n+\n+\t/* if needed make room for NET_IP_ALIGN */\n+\trx_buf_len -= NET_IP_ALIGN;\n+\n+\treturn i40e_compute_pad(rx_buf_len);\n+}\n+\n+#define I40E_SKB_PAD i40e_skb_pad()\n+#else\n+#define I40E_2K_TOO_SMALL_WITH_PADDING false\n+#define I40E_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)\n+#endif\n+\n /**\n * i40e_test_staterr - tests bits in Rx descriptor status and error fields\n * @rx_desc: pointer to receive descriptor (in le64 format)\n@@ -341,7 +393,8 @@ struct i40e_ring {\n \tu8 packet_stride;\n \n \tu16 flags;\n-#define I40E_TXR_FLAGS_WB_ON_ITR\tBIT(0)\n+#define I40E_TXR_FLAGS_WB_ON_ITR\t\tBIT(0)\n+#define I40E_RXR_FLAGS_BUILD_SKB_ENABLED\tBIT(1)\n \n \t/* stats structs */\n \tstruct i40e_queue_stats\tstats;\n@@ -369,6 +422,21 @@ struct i40e_ring {\n \t\t\t\t\t */\n } ____cacheline_internodealigned_in_smp;\n \n+static inline bool ring_uses_build_skb(struct i40e_ring *ring)\n+{\n+\treturn !!(ring->flags & I40E_RXR_FLAGS_BUILD_SKB_ENABLED);\n+}\n+\n+static inline void set_ring_build_skb_enabled(struct i40e_ring *ring)\n+{\n+\tring->flags |= I40E_RXR_FLAGS_BUILD_SKB_ENABLED;\n+}\n+\n+static inline void clear_ring_build_skb_enabled(struct i40e_ring *ring)\n+{\n+\tring->flags &= ~I40E_RXR_FLAGS_BUILD_SKB_ENABLED;\n+}\n+\n enum i40e_latency_range {\n \tI40E_LOWEST_LATENCY = 0,\n \tI40E_LOW_LATENCY = 1,\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 6b60c19..d96f10a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -619,6 +619,17 @@ static inline void i40e_release_rx_desc(struct i40e_ring *rx_ring, u32 val)\n }\n \n /**\n+ * i40e_rx_offset - Return expected offset into page to access data\n+ * @rx_ring: Ring we are requesting offset of\n+ *\n+ * Returns the offset value for ring into the data buffer.\n+ */\n+static inline unsigned int i40e_rx_offset(struct i40e_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? I40E_SKB_PAD : 0;\n+}\n+\n+/**\n * i40e_alloc_mapped_page - recycle or make a new page\n * @rx_ring: ring to use\n * @bi: rx_buffer struct to modify\n@@ -662,7 +673,7 @@ static bool i40e_alloc_mapped_page(struct i40e_ring *rx_ring,\n \n \tbi->dma = dma;\n \tbi->page = page;\n-\tbi->page_offset = 0;\n+\tbi->page_offset = i40e_rx_offset(rx_ring);\n \n \t/* initialize pagecnt_bias to 1 representing we fully own page */\n \tbi->pagecnt_bias = 1;\n@@ -1057,7 +1068,7 @@ static void i40e_add_rx_frag(struct i40e_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = i40e_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = SKB_DATA_ALIGN(size);\n+\tunsigned int truesize =\tSKB_DATA_ALIGN(size + i40e_rx_offset(rx_ring));\n #endif\n \n \tskb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, rx_buffer->page,\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\nindex dc82f65..901282c 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\n@@ -122,6 +122,58 @@ enum i40e_dyn_idx_t {\n #define I40E_RX_DMA_ATTR \\\n \t(DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING)\n \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 legacy\n+ *\t receive path.\n+ */\n+#if (PAGE_SIZE < 8192)\n+#define I40E_2K_TOO_SMALL_WITH_PADDING \\\n+((NET_SKB_PAD + I40E_RXBUFFER_1536) > SKB_WITH_OVERHEAD(I40E_RXBUFFER_2048))\n+\n+static inline int i40e_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 i40e_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 (I40E_2K_TOO_SMALL_WITH_PADDING)\n+\t\trx_buf_len = I40E_RXBUFFER_3072 + SKB_DATA_ALIGN(NET_IP_ALIGN);\n+\telse\n+\t\trx_buf_len = I40E_RXBUFFER_1536;\n+\n+\t/* if needed make room for NET_IP_ALIGN */\n+\trx_buf_len -= NET_IP_ALIGN;\n+\n+\treturn i40e_compute_pad(rx_buf_len);\n+}\n+\n+#define I40E_SKB_PAD i40e_skb_pad()\n+#else\n+#define I40E_2K_TOO_SMALL_WITH_PADDING false\n+#define I40E_SKB_PAD (NET_SKB_PAD + NET_IP_ALIGN)\n+#endif\n+\n /**\n * i40e_test_staterr - tests bits in Rx descriptor status and error fields\n * @rx_desc: pointer to receive descriptor (in le64 format)\n@@ -328,7 +380,8 @@ struct i40e_ring {\n \tu8 packet_stride;\n \n \tu16 flags;\n-#define I40E_TXR_FLAGS_WB_ON_ITR\tBIT(0)\n+#define I40E_TXR_FLAGS_WB_ON_ITR\t\tBIT(0)\n+#define I40E_RXR_FLAGS_BUILD_SKB_ENABLED\tBIT(1)\n \n \t/* stats structs */\n \tstruct i40e_queue_stats\tstats;\n@@ -356,6 +409,21 @@ struct i40e_ring {\n \t\t\t\t\t */\n } ____cacheline_internodealigned_in_smp;\n \n+static inline bool ring_uses_build_skb(struct i40e_ring *ring)\n+{\n+\treturn !!(ring->flags & I40E_RXR_FLAGS_BUILD_SKB_ENABLED);\n+}\n+\n+static inline void set_ring_build_skb_enabled(struct i40e_ring *ring)\n+{\n+\tring->flags |= I40E_RXR_FLAGS_BUILD_SKB_ENABLED;\n+}\n+\n+static inline void clear_ring_build_skb_enabled(struct i40e_ring *ring)\n+{\n+\tring->flags &= ~I40E_RXR_FLAGS_BUILD_SKB_ENABLED;\n+}\n+\n enum i40e_latency_range {\n \tI40E_LOWEST_LATENCY = 0,\n \tI40E_LOW_LATENCY = 1,\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 95d5c04..e4136ce 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -704,7 +704,8 @@ static void i40evf_configure_rx(struct i40evf_adapter *adapter)\n \t\t * standard Ethernet mtu. On x86 this gives us enough room\n \t\t * for shared info and 192 bytes of padding.\n \t\t */\n-\t\tif (netdev->mtu <= ETH_DATA_LEN)\n+\t\tif (!I40E_2K_TOO_SMALL_WITH_PADDING &&\n+\t\t (netdev->mtu <= ETH_DATA_LEN))\n \t\t\trx_buf_len = I40E_RXBUFFER_1536 - NET_IP_ALIGN;\n \t}\n #endif\n@@ -712,6 +713,11 @@ static void i40evf_configure_rx(struct i40evf_adapter *adapter)\n \tfor (i = 0; i < adapter->num_active_queues; i++) {\n \t\tadapter->rx_rings[i].tail = hw->hw_addr + I40E_QRX_TAIL1(i);\n \t\tadapter->rx_rings[i].rx_buf_len = rx_buf_len;\n+\n+\t\tif (adapter->flags & I40EVF_FLAG_LEGACY_RX)\n+\t\t\tclear_ring_build_skb_enabled(&adapter->rx_rings[i]);\n+\t\telse\n+\t\t\tset_ring_build_skb_enabled(&adapter->rx_rings[i]);\n \t}\n }\n \n", "prefixes": [ "next", "S66", "v2", "10/11" ] }