Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/605391/?format=api
{ "id": 605391, "url": "http://patchwork.ozlabs.org/api/patches/605391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160402070520.13504.3716.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": "<20160402070520.13504.3716.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2016-04-02T07:06:56", "name": "[next,2/2] i40e/i40evf: Add support for IPIP and SIT offloads", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2b17b7557572fc1cdba52e216f4255f8ff35bc1a", "submitter": { "id": 67293, "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api", "name": "Alexander Duyck", "email": "aduyck@mirantis.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/20160402070520.13504.3716.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/605391/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/605391/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\tby ozlabs.org (Postfix) with ESMTP id 3qcTnx32Jfz9ssP\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Apr 2016 18:07:01 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B680B8B1D8;\n\tSat, 2 Apr 2016 07:07:00 +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 1c7Iu411YtgL; Sat, 2 Apr 2016 07:06:59 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E751C8AFE7;\n\tSat, 2 Apr 2016 07:06:59 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 863991C11DF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 2 Apr 2016 07:06:59 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7FAABA6132\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 2 Apr 2016 07:06: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 cIT61iFNlhD3 for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 2 Apr 2016 07:06:57 +0000 (UTC)", "from mail-pa0-f53.google.com (mail-pa0-f53.google.com\n\t[209.85.220.53])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id D4BAEA5FE6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 2 Apr 2016 07:06:57 +0000 (UTC)", "by mail-pa0-f53.google.com with SMTP id td3so106459888pab.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 02 Apr 2016 00:06:57 -0700 (PDT)", "from localhost.localdomain\n\t(static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36])\n\tby smtp.gmail.com with ESMTPSA id\n\ttc8sm26478891pac.29.2016.04.02.00.06.56\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 02 Apr 2016 00:06:57 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=FEa0vJMF; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=wd22vAF14ELATTwcFA0crMZ5KRyORQSsdCY2c+XK9p4=;\n\tb=FEa0vJMFJGXDXHmvB1pUg+JLQy66T8WtfrnFx6ed+7LCeWiHMwldcfQNMki9Xyafm4\n\tvW1GtfPrd47KLvDRS7QCm+tBJnBSZOLZ0veK1CBXd64GjdiL9WAFUkBdyfZalVe8pkyb\n\tl14l84NfFuYML7wSPABjsVmMpMXCpHB/nwQfE=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\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=wd22vAF14ELATTwcFA0crMZ5KRyORQSsdCY2c+XK9p4=;\n\tb=RFOmYiVFM1uFuY6Dv+y5+FSVOrX9caBl39Pw2LZj3raR0Ai101pQcOulDayGxzNzsx\n\tFvZAsj0Pu38R0iXfaQWRT6a61JDW4IjQoS09faCovvDL73PyYol7RY70ijv/7gdrG4RT\n\t8Zf774LXAzHzBTRs1nwb3+pIjUGwc3HB5X7GZ45pjvxMvXLHXD+t5KAxpED+mP65HxyH\n\tWE+KvEZth726xcLuYzNikgnh1x8w8QkUdiIO6jP7ghzV4iaUPic2wvUgWuZ+Y+0vLZ+C\n\tJ8yvLzLSZgp494DlPv6vToQWRSjs38P0lKNZYLu0+/bdZi+6Vem9wDOGg1IreMfXX39W\n\taX6A==", "X-Gm-Message-State": "AD7BkJLpdthnOtn4GBrkajzmLgUL+qQ6sRJV0Gg+/ZY8UaHV5NZlSsjzu3gj9H3LmbAhWNck", "X-Received": "by 10.66.190.229 with SMTP id gt5mr37026674pac.118.1459580817457;\n\tSat, 02 Apr 2016 00:06:57 -0700 (PDT)", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com,\n\talexander.duyck@gmail.com", "Date": "Sat, 02 Apr 2016 00:06:56 -0700", "Message-ID": "<20160402070520.13504.3716.stgit@localhost.localdomain>", "In-Reply-To": "<20160402070114.13504.22615.stgit@localhost.localdomain>", "References": "<20160402070114.13504.22615.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next PATCH 2/2] i40e/i40evf: Add support for\n\tIPIP and SIT offloads", "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": "Looking over the documentation it turns out enabling IPIP and SIT offloads\nfor i40e is pretty straighforward. As such I decided to enable them with\nthis patch. In my testing I am seeing an improvement of 8 to 10 Gb/s\nfor IPIP and SIT tunnels with this offload enabled.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n\nTesting-hints:\n All that should be needed is to setup a pair of systems with a tunnel and\n pass traffic over it. Documentation on how to setup IPIP and SIT tunnels\n can be found at:\n\n http://www.linuxfoundation.org/collaborate/workgroups/networking/tunneling\n\n drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 24 +++++++++++++++--------\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 24 +++++++++++++++--------\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++\n 4 files changed, 36 insertions(+), 16 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 9100d34913a7..d5f2417c0851 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9119,6 +9119,8 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \t\t\t\t NETIF_F_TSO_ECN\t\t|\n \t\t\t\t NETIF_F_TSO6\t\t\t|\n \t\t\t\t NETIF_F_GSO_GRE\t\t|\n+\t\t\t\t NETIF_F_GSO_IPIP\t\t|\n+\t\t\t\t NETIF_F_GSO_SIT\t\t|\n \t\t\t\t NETIF_F_GSO_UDP_TUNNEL\t|\n \t\t\t\t NETIF_F_GSO_UDP_TUNNEL_CSUM\t|\n \t\t\t\t NETIF_F_SCTP_CRC\t\t|\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 6bf705add321..0d2a34cec6a9 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -2297,7 +2297,10 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t\tip.v6->payload_len = 0;\n \t}\n \n-\tif (skb_shinfo(skb)->gso_type & (SKB_GSO_UDP_TUNNEL | SKB_GSO_GRE |\n+\tif (skb_shinfo(skb)->gso_type & (SKB_GSO_GRE |\n+\t\t\t\t\t SKB_GSO_IPIP |\n+\t\t\t\t\t SKB_GSO_SIT |\n+\t\t\t\t\t SKB_GSO_UDP_TUNNEL |\n \t\t\t\t\t SKB_GSO_UDP_TUNNEL_CSUM)) {\n \t\tif (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM) {\n \t\t\t/* determine offset of outer transport header */\n@@ -2439,13 +2442,6 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\t\t\t\t &l4_proto, &frag_off);\n \t\t}\n \n-\t\t/* compute outer L3 header size */\n-\t\ttunnel |= ((l4.hdr - ip.hdr) / 4) <<\n-\t\t\t I40E_TXD_CTX_QW0_EXT_IPLEN_SHIFT;\n-\n-\t\t/* switch IP header pointer from outer to inner header */\n-\t\tip.hdr = skb_inner_network_header(skb);\n-\n \t\t/* define outer transport */\n \t\tswitch (l4_proto) {\n \t\tcase IPPROTO_UDP:\n@@ -2456,6 +2452,11 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\ttunnel |= I40E_TXD_CTX_GRE_TUNNELING;\n \t\t\t*tx_flags |= I40E_TX_FLAGS_UDP_TUNNEL;\n \t\t\tbreak;\n+\t\tcase IPPROTO_IPIP:\n+\t\tcase IPPROTO_IPV6:\n+\t\t\t*tx_flags |= I40E_TX_FLAGS_UDP_TUNNEL;\n+\t\t\tl4.hdr = skb_inner_network_header(skb);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tif (*tx_flags & I40E_TX_FLAGS_TSO)\n \t\t\t\treturn -1;\n@@ -2464,6 +2465,13 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\treturn 0;\n \t\t}\n \n+\t\t/* compute outer L3 header size */\n+\t\ttunnel |= ((l4.hdr - ip.hdr) / 4) <<\n+\t\t\t I40E_TXD_CTX_QW0_EXT_IPLEN_SHIFT;\n+\n+\t\t/* switch IP header pointer from outer to inner header */\n+\t\tip.hdr = skb_inner_network_header(skb);\n+\n \t\t/* compute tunnel header size */\n \t\ttunnel |= ((ip.hdr - l4.hdr) / 2) <<\n \t\t\t I40E_TXD_CTX_QW0_NATLEN_SHIFT;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 519256bb63e8..07ce8e4e35e0 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -1564,7 +1564,10 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t\tip.v6->payload_len = 0;\n \t}\n \n-\tif (skb_shinfo(skb)->gso_type & (SKB_GSO_UDP_TUNNEL | SKB_GSO_GRE |\n+\tif (skb_shinfo(skb)->gso_type & (SKB_GSO_GRE |\n+\t\t\t\t\t SKB_GSO_IPIP |\n+\t\t\t\t\t SKB_GSO_SIT |\n+\t\t\t\t\t SKB_GSO_UDP_TUNNEL |\n \t\t\t\t\t SKB_GSO_UDP_TUNNEL_CSUM)) {\n \t\tif (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM) {\n \t\t\t/* determine offset of outer transport header */\n@@ -1664,13 +1667,6 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\t\t\t\t &l4_proto, &frag_off);\n \t\t}\n \n-\t\t/* compute outer L3 header size */\n-\t\ttunnel |= ((l4.hdr - ip.hdr) / 4) <<\n-\t\t\t I40E_TXD_CTX_QW0_EXT_IPLEN_SHIFT;\n-\n-\t\t/* switch IP header pointer from outer to inner header */\n-\t\tip.hdr = skb_inner_network_header(skb);\n-\n \t\t/* define outer transport */\n \t\tswitch (l4_proto) {\n \t\tcase IPPROTO_UDP:\n@@ -1681,6 +1677,11 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\ttunnel |= I40E_TXD_CTX_GRE_TUNNELING;\n \t\t\t*tx_flags |= I40E_TX_FLAGS_VXLAN_TUNNEL;\n \t\t\tbreak;\n+\t\tcase IPPROTO_IPIP:\n+\t\tcase IPPROTO_IPV6:\n+\t\t\t*tx_flags |= I40E_TX_FLAGS_VXLAN_TUNNEL;\n+\t\t\tl4.hdr = skb_inner_network_header(skb);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tif (*tx_flags & I40E_TX_FLAGS_TSO)\n \t\t\t\treturn -1;\n@@ -1689,6 +1690,13 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \t\t\treturn 0;\n \t\t}\n \n+\t\t/* compute outer L3 header size */\n+\t\ttunnel |= ((l4.hdr - ip.hdr) / 4) <<\n+\t\t\t I40E_TXD_CTX_QW0_EXT_IPLEN_SHIFT;\n+\n+\t\t/* switch IP header pointer from outer to inner header */\n+\t\tip.hdr = skb_inner_network_header(skb);\n+\n \t\t/* compute tunnel header size */\n \t\ttunnel |= ((ip.hdr - l4.hdr) / 2) <<\n \t\t\t I40E_TXD_CTX_QW0_NATLEN_SHIFT;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex a24966e4873a..1bb9d61ec171 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -2327,6 +2327,8 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \t\t\t\t NETIF_F_TSO_ECN\t\t|\n \t\t\t\t NETIF_F_TSO6\t\t\t|\n \t\t\t\t NETIF_F_GSO_GRE\t\t|\n+\t\t\t\t NETIF_F_GSO_IPIP\t\t|\n+\t\t\t\t NETIF_F_GSO_SIT\t\t|\n \t\t\t\t NETIF_F_GSO_UDP_TUNNEL\t|\n \t\t\t\t NETIF_F_GSO_UDP_TUNNEL_CSUM\t|\n \t\t\t\t NETIF_F_SCTP_CRC\t\t|\n", "prefixes": [ "next", "2/2" ] }