Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/614591/?format=api
{ "id": 614591, "url": "http://patchwork.ozlabs.org/api/patches/614591/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20160425183133.11331.54774.stgit@ahduyck-xeon-server/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20160425183133.11331.54774.stgit@ahduyck-xeon-server>", "list_archive_url": null, "date": "2016-04-25T18:31:33", "name": "[net-next,6/8] mlx4: Add support for inner IPv6 checksum offloads and TSO", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": true, "hash": "651fae72a76592f195d03e16c390606f7a88e2ad", "submitter": { "id": 67293, "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api", "name": "Alexander Duyck", "email": "aduyck@mirantis.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20160425183133.11331.54774.stgit@ahduyck-xeon-server/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/614591/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/614591/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3qtvvG2d81z9t5P\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 Apr 2016 04:31:38 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S933374AbcDYSbg (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Apr 2016 14:31:36 -0400", "from mail-pf0-f182.google.com ([209.85.192.182]:35570 \"EHLO\n\tmail-pf0-f182.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S933271AbcDYSbe (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Apr 2016 14:31:34 -0400", "by mail-pf0-f182.google.com with SMTP id n1so71833511pfn.2\n\tfor <netdev@vger.kernel.org>; Mon, 25 Apr 2016 11:31:34 -0700 (PDT)", "from [192.168.1.143] (static-50-53-29-36.bvtn.or.frontiernet.net.\n\t[50.53.29.36]) by smtp.gmail.com with ESMTPSA id\n\tzs16sm20923277pab.13.2016.04.25.11.31.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Apr 2016 11:31:33 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=Dk58eKMX; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=mirantis.com; s=google;\n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=3vjMLiW2ajbJOt5NDcKnQv1YtGXugNlxTh2OEoIyMmQ=;\n\tb=Dk58eKMX+VKnesrFgCKm7lmaxBsMMi+U4HZ+P8aKNbcnVYPxAY/gvWQS/JmvJcE+FE\n\txxEYPmFtMoYYOuYmQ1aau5A0sAxP7x0547+hsqVOfaKw7OoDW0/UgNNWlp3AjbbcMLdS\n\tt9db5qnkmfZok5lWogi227/lP+RCgsy8cjh2U=", "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=3vjMLiW2ajbJOt5NDcKnQv1YtGXugNlxTh2OEoIyMmQ=;\n\tb=lD/uqHbgrn/fmK17mAWhma7a2XMgMXZpddIZGtqgG4lg7J8DtpkTa9T8/gJt2TNJ3K\n\tUSgu9kTh503NiYWfBnLMBCfJSv5nOYRASPAtTElJKzgDYTlRxXCYUaPekvofm3/SGB/L\n\t4yH8P91bqbCr3jVfYT6P3JnzmtyMk204RuKv9tvIm4b13VEmF8fGC8ML0BNh7iJZOGhz\n\tvRa8LWoakQoGLswSjNe6Pqr8vY1cNLgClP3I0XPLlZWyZFlw1EuTts8gNrYKyXMMo+eW\n\tBudacMccFCU5JTVehUJ9otAjNxqWRAYpH2wmUxfAFPNBwHWT6+0a/DnFzOuL4sBYk0VE\n\tZXoQ==", "X-Gm-Message-State": "AOPr4FWkyXgyp+E2q2LwyECKv+4qtOTKQquMsbMeUuk0DDuCMEeZDW3++OTC0u8kqQOTwPAG", "X-Received": "by 10.98.65.203 with SMTP id g72mr51174476pfd.138.1461609094164; \n\tMon, 25 Apr 2016 11:31:34 -0700 (PDT)", "Subject": "[net-next PATCH 6/8] mlx4: Add support for inner IPv6 checksum\n\toffloads and TSO", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "talal@mellanox.com, netdev@vger.kernel.org, davem@davemloft.net,\n\tgalp@mellanox.com, ogerlitz@mellanox.com, eranbe@mellanox.com", "Date": "Mon, 25 Apr 2016 11:31:33 -0700", "Message-ID": "<20160425183133.11331.54774.stgit@ahduyck-xeon-server>", "In-Reply-To": "<20160425182442.11331.88349.stgit@ahduyck-xeon-server>", "References": "<20160425182442.11331.88349.stgit@ahduyck-xeon-server>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": ">From what I can tell the ConnectX-3 will support an inner IPv6 checksum and\nsegmentation offload, however it cannot support outer IPv6 headers. For\nthis reason I am adding the feature to the hw_enc_features and adding an\nextra check to the features_check call that will disable GSO and checksum\noffload in the case that the encapsulated frame has an outer IP version of\nthat is not 4.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 25 +++++++++++++++++++-----\n drivers/net/ethernet/mellanox/mlx4/en_tx.c | 15 ++++++++++++--\n 2 files changed, 33 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c\nindex bce37cbfde24..6f28ac58251c 100644\n--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c\n+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c\n@@ -2357,8 +2357,10 @@ out:\n \t}\n \n \t/* set offloads */\n-\tpriv->dev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM |\n-\t\t\t\t NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL |\n+\tpriv->dev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |\n+\t\t\t\t NETIF_F_RXCSUM |\n+\t\t\t\t NETIF_F_TSO | NETIF_F_TSO6 |\n+\t\t\t\t NETIF_F_GSO_UDP_TUNNEL |\n \t\t\t\t NETIF_F_GSO_UDP_TUNNEL_CSUM |\n \t\t\t\t NETIF_F_GSO_PARTIAL;\n }\n@@ -2369,8 +2371,10 @@ static void mlx4_en_del_vxlan_offloads(struct work_struct *work)\n \tstruct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv,\n \t\t\t\t\t\t vxlan_del_task);\n \t/* unset offloads */\n-\tpriv->dev->hw_enc_features &= ~(NETIF_F_IP_CSUM | NETIF_F_RXCSUM |\n-\t\t\t\t\tNETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL |\n+\tpriv->dev->hw_enc_features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |\n+\t\t\t\t\tNETIF_F_RXCSUM |\n+\t\t\t\t\tNETIF_F_TSO | NETIF_F_TSO6 |\n+\t\t\t\t\tNETIF_F_GSO_UDP_TUNNEL |\n \t\t\t\t\tNETIF_F_GSO_UDP_TUNNEL_CSUM |\n \t\t\t\t\tNETIF_F_GSO_PARTIAL);\n \n@@ -2431,7 +2435,18 @@ static netdev_features_t mlx4_en_features_check(struct sk_buff *skb,\n \t\t\t\t\t\tnetdev_features_t features)\n {\n \tfeatures = vlan_features_check(skb, features);\n-\treturn vxlan_features_check(skb, features);\n+\tfeatures = vxlan_features_check(skb, features);\n+\n+\t/* The ConnectX-3 doesn't support outer IPv6 checksums but it does\n+\t * support inner IPv6 checksums and segmentation so we need to\n+\t * strip that feature if this is an IPv6 encapsulated frame.\n+\t */\n+\tif (skb->encapsulation &&\n+\t (skb->ip_summed == CHECKSUM_PARTIAL) &&\n+\t (ip_hdr(skb)->version != 4))\n+\t\tfeatures &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);\n+\n+\treturn features;\n }\n #endif\n \ndiff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c\nindex c0d7b7296236..c9f5388ea22a 100644\n--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c\n+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c\n@@ -41,6 +41,7 @@\n #include <linux/vmalloc.h>\n #include <linux/tcp.h>\n #include <linux/ip.h>\n+#include <linux/ipv6.h>\n #include <linux/moduleparam.h>\n \n #include \"mlx4_en.h\"\n@@ -918,8 +919,18 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)\n \t\t\t\t tx_ind, fragptr);\n \n \tif (skb->encapsulation) {\n-\t\tstruct iphdr *ipv4 = (struct iphdr *)skb_inner_network_header(skb);\n-\t\tif (ipv4->protocol == IPPROTO_TCP || ipv4->protocol == IPPROTO_UDP)\n+\t\tunion {\n+\t\t\tstruct iphdr *v4;\n+\t\t\tstruct ipv6hdr *v6;\n+\t\t\tunsigned char *hdr;\n+\t\t} ip;\n+\t\tu8 proto;\n+\n+\t\tip.hdr = skb_inner_network_header(skb);\n+\t\tproto = (ip.v4->version == 4) ? ip.v4->protocol :\n+\t\t\t\t\t\tip.v6->nexthdr;\n+\n+\t\tif (proto == IPPROTO_TCP || proto == IPPROTO_UDP)\n \t\t\top_own |= cpu_to_be32(MLX4_WQE_CTRL_IIP | MLX4_WQE_CTRL_ILP);\n \t\telse\n \t\t\top_own |= cpu_to_be32(MLX4_WQE_CTRL_IIP);\n", "prefixes": [ "net-next", "6/8" ] }