get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 616992,
    "url": "http://patchwork.ozlabs.org/api/patches/616992/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20160429224339.12418.53462.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": "<20160429224339.12418.53462.stgit@ahduyck-xeon-server>",
    "list_archive_url": null,
    "date": "2016-04-29T22:43:39",
    "name": "[net-next,v2,6/9] mlx4: Add support for inner IPv6 checksum offloads and TSO",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20160429224339.12418.53462.stgit@ahduyck-xeon-server/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/616992/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/616992/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 3qxTJL3TZTz9t7Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 30 Apr 2016 08:43:46 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752653AbcD2Wnn (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 29 Apr 2016 18:43:43 -0400",
            "from mail-pf0-f178.google.com ([209.85.192.178]:36374 \"EHLO\n\tmail-pf0-f178.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752651AbcD2Wnl (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 29 Apr 2016 18:43:41 -0400",
            "by mail-pf0-f178.google.com with SMTP id c189so54622852pfb.3\n\tfor <netdev@vger.kernel.org>; Fri, 29 Apr 2016 15:43:41 -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\tdr4sm26336069pac.11.2016.04.29.15.43.40\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 29 Apr 2016 15:43:40 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=Vi+YC/Zp; 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=FsZhGyXUK5H42jd9IarZgTM/Bo3NAVwsWu3O7P15px0=;\n\tb=Vi+YC/ZpbgXeBrsCzk/62dBxcduX1b8oZubVs11m9MPbKiC0q1wtsTFM6MZZaZfrss\n\txeTth8W28f/1TEbXZpceJx/E+veLBMp4iAVToNhwWZjG93QwFbk48notUOK3DVavQeJQ\n\tl4k3El5puaMKsqsDui7tsKMUW8Km1wUz1Hzuk=",
        "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=FsZhGyXUK5H42jd9IarZgTM/Bo3NAVwsWu3O7P15px0=;\n\tb=BSXLCanb+XAvLqJu2uqudpiB7lS5fYLjVRBS/HKPzpv/7u60X0NZKk5ps26IdX4LRt\n\tUV3ZnPhbmkMijrrw+zPhdyemSBlNRzvMk1sysAuTjk/7/RdvCqG7TcJegC6508TMKW9Q\n\t+ABr4pQ57HN4vVwME9A82t7PL8X+u0BZidIbMVJmRoBZZaHbXXvyJIUdcIXO4nlskkk7\n\tUQBqoxOD8Ho9gfB3EG8fiHcVD2gGE9N5y2ge+B6tK4m0E3qM4M3WQUaKLv1TU7IAXdW9\n\tsZpd5ksvSh0HgUqy/S2kKStidHE2QCdCJok+NgM+iM533IyIsalHEptI1TzLZ5Wy8Ltg\n\ts90Q==",
        "X-Gm-Message-State": "AOPr4FUS1Ms8sP/izgX3jGz4/dZ/cvkBebLZ9TGUpviqb0JUXNj0noRiEoqha8r3R0Tgp1CL",
        "X-Received": "by 10.98.89.28 with SMTP id n28mr32877313pfb.41.1461969820942;\n\tFri, 29 Apr 2016 15:43:40 -0700 (PDT)",
        "Subject": "[net-next PATCH v2 6/9] 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,\n\tmichael.chan@broadcom.com, davem@davemloft.net, galp@mellanox.com,\n\togerlitz@mellanox.com, eranbe@mellanox.com",
        "Date": "Fri, 29 Apr 2016 15:43:39 -0700",
        "Message-ID": "<20160429224339.12418.53462.stgit@ahduyck-xeon-server>",
        "In-Reply-To": "<20160429222735.12418.61229.stgit@ahduyck-xeon-server>",
        "References": "<20160429222735.12418.61229.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.  This\nassumption is based on the fact that I could see the checksum being\noffloaded for inner header on IPv4 tunnels, but not on IPv6 tunnels.\n\nFor this reason I am adding the feature to the hw_enc_features and adding\nan extra check to the features_check call that will disable GSO and\nchecksum offload in the case that the encapsulated frame has an outer IP\nversion of that is not 4.  The check in mlx4_en_features_check could be\nremoved if at some point in the future a fix is found that allows the\nhardware to offload segmentation/checksum on tunnels with an outer IPv6\nheader.\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 a386f047c1af..0f206a95429c 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@@ -920,8 +921,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",
        "v2",
        "6/9"
    ]
}