Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/686798/?format=api
{ "id": 686798, "url": "http://patchwork.ozlabs.org/api/patches/686798/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1477436933-13679-2-git-send-email-bimmy.pujari@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": "<1477436933-13679-2-git-send-email-bimmy.pujari@intel.com>", "list_archive_url": null, "date": "2016-10-25T23:08:46", "name": "[next,S51-V2,1/8] i40e: Be much more verbose about what we can and cannot offload", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "eea874bfa81c3abed1d6c3fa6b0d16dc172e2b20", "submitter": { "id": 68919, "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api", "name": "Pujari, Bimmy", "email": "bimmy.pujari@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/1477436933-13679-2-git-send-email-bimmy.pujari@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/686798/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/686798/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3t3TQY185Yz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 26 Oct 2016 10:10:29 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B239295390;\n\tTue, 25 Oct 2016 23:10:27 +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 er29U6hxrRIS; Tue, 25 Oct 2016 23:10:27 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 16A2495373;\n\tTue, 25 Oct 2016 23:10:27 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 218461CF8DB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 25 Oct 2016 23:10:25 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0FE0A31C49\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 25 Oct 2016 23:10:25 +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 gyZWzjqxsZqc for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 25 Oct 2016 23:10:23 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby silver.osuosl.org (Postfix) with ESMTPS id DA98431BB5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 25 Oct 2016 23:10:22 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP; 25 Oct 2016 16:10:22 -0700", "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.167])\n\tby fmsmga006.fm.intel.com with ESMTP; 25 Oct 2016 16:10:22 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.31,399,1473145200\"; d=\"scan'208\";a=\"23607166\"", "From": "Bimmy Pujari <bimmy.pujari@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 25 Oct 2016 16:08:46 -0700", "Message-Id": "<1477436933-13679-2-git-send-email-bimmy.pujari@intel.com>", "X-Mailer": "git-send-email 2.4.11", "In-Reply-To": "<1477436933-13679-1-git-send-email-bimmy.pujari@intel.com>", "References": "<1477436933-13679-1-git-send-email-bimmy.pujari@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S51-V2 1/8] i40e: Be much more\n\tverbose about what we can and cannot offload", "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 change makes it so that we are much more robust about defining what we\ncan and cannot offload. Previously we were just checking for the L4 tunnel\nheader length, however there are other fields we should be verifying as\nthere are multiple scenarios in which we cannot perform hardware offloads.\n\nIn addition the device only supports GSO as long as the MSS is 64 or\ngreater. We were not checking this so an MSS less than that was resulting\nin Tx hangs.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\nChange-ID: I5e2fd5f3075c73601b4b36327b771c64fcb6c31b\n---\nTesting Hints:\n This is half of the fix needed to address MSS less than 64. This\n is the fix for upstream and kernels after 3.18.4, but we will need\n to come up with a separate fix for out-of-tree that can be stripped\n on kernels prior to 3.18.4.\n\n An easy test for this patch is to just set the MTU for an interface\n to a value 102. Without this patch we should see Tx hangs with\n netperf and with we should be able to pass traffic without\n triggering Tx hangs.\n\n drivers/net/ethernet/intel/i40e/i40e_main.c | 52 ++++++++++++++++++++++++-----\n 1 file changed, 44 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 82805fe..d572f1d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9057,10 +9057,6 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,\n \t\t\t\t nlflags, 0, 0, filter_mask, NULL);\n }\n \n-/* Hardware supports L4 tunnel length of 128B (=2^7) which includes\n- * inner mac plus all inner ethertypes.\n- */\n-#define I40E_MAX_TUNNEL_HDR_LEN 128\n /**\n * i40e_features_check - Validate encapsulated packet conforms to limits\n * @skb: skb buff\n@@ -9071,12 +9067,52 @@ static netdev_features_t i40e_features_check(struct sk_buff *skb,\n \t\t\t\t\t struct net_device *dev,\n \t\t\t\t\t netdev_features_t features)\n {\n-\tif (skb->encapsulation &&\n-\t ((skb_inner_network_header(skb) - skb_transport_header(skb)) >\n-\t I40E_MAX_TUNNEL_HDR_LEN))\n-\t\treturn features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);\n+\tsize_t len;\n+\n+\t/* No point in doing any of this if neither checksum nor GSO are\n+\t * being requested for this frame. We can rule out both by just\n+\t * checking for CHECKSUM_PARTIAL\n+\t */\n+\tif (skb->ip_summed != CHECKSUM_PARTIAL)\n+\t\treturn features;\n+\n+\t/* We cannot support GSO if the MSS is going to be less than\n+\t * 64 bytes. If it is then we need to drop support for GSO.\n+\t */\n+\tif (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))\n+\t\tfeatures &= ~NETIF_F_GSO_MASK;\n+\n+\t/* MACLEN can support at most 63 words */\n+\tlen = skb_network_header(skb) - skb->data;\n+\tif (len & ~(63 * 2))\n+\t\tgoto out_err;\n+\n+\t/* IPLEN and EIPLEN can support at most 127 dwords */\n+\tlen = skb_transport_header(skb) - skb_network_header(skb);\n+\tif (len & ~(127 * 4))\n+\t\tgoto out_err;\n+\n+\tif (skb->encapsulation) {\n+\t\t/* L4TUNLEN can support 127 words */\n+\t\tlen = skb_inner_network_header(skb) - skb_transport_header(skb);\n+\t\tif (len & ~(127 * 2))\n+\t\t\tgoto out_err;\n+\n+\t\t/* IPLEN can support at most 127 dwords */\n+\t\tlen = skb_inner_transport_header(skb) -\n+\t\t skb_inner_network_header(skb);\n+\t\tif (len & ~(127 * 4))\n+\t\t\tgoto out_err;\n+\t}\n+\n+\t/* No need to validate L4LEN as TCP is the only protocol with a\n+\t * a flexible value and we support all possible values supported\n+\t * by TCP, which is at most 15 dwords\n+\t */\n \n \treturn features;\n+out_err:\n+\treturn features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);\n }\n \n static const struct net_device_ops i40e_netdev_ops = {\n", "prefixes": [ "next", "S51-V2", "1/8" ] }