get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 887085,
    "url": "http://patchwork.ozlabs.org/api/patches/887085/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1521223747-12018-5-git-send-email-shannon.nelson@oracle.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": "<1521223747-12018-5-git-send-email-shannon.nelson@oracle.com>",
    "list_archive_url": null,
    "date": "2018-03-16T18:09:07",
    "name": "[next-queue,v2,4/4] ixgbe: enable tso with ipsec offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "07568eef4011ec994e71d8181c1f7320aa8e7520",
    "submitter": {
        "id": 70766,
        "url": "http://patchwork.ozlabs.org/api/people/70766/?format=api",
        "name": "Shannon Nelson",
        "email": "shannon.nelson@oracle.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/1521223747-12018-5-git-send-email-shannon.nelson@oracle.com/mbox/",
    "series": [
        {
            "id": 34252,
            "url": "http://patchwork.ozlabs.org/api/series/34252/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34252",
            "date": "2018-03-16T18:09:04",
            "name": "ixgbe: Enable tso and checksum offload with ipsec",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/34252/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/887085/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/887085/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@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"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=oracle.com",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=oracle.com header.i=@oracle.com\n\theader.b=\"rz37b0+Z\"; dkim-atps=neutral"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 402tm32gk9z9sRL\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 17 Mar 2018 05:10:11 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id EC683226AC;\n\tFri, 16 Mar 2018 18:10:09 +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 3QxUqPy3hLfw; Fri, 16 Mar 2018 18:10:07 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id BA7C5220FD;\n\tFri, 16 Mar 2018 18:10:07 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id B438A1CF0A4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 18:09:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AEE05898AA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 18:09:19 +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 nICSfVQ6D3yx for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 18:09:19 +0000 (UTC)",
            "from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id E79EC898D6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 18:09:18 +0000 (UTC)",
            "from pps.filterd (aserp2130.oracle.com [127.0.0.1])\n\tby aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id\n\tw2GHqjRd149113; Fri, 16 Mar 2018 18:09:18 GMT",
            "from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])\n\tby aserp2130.oracle.com with ESMTP id 2grjq102dx-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 16 Mar 2018 18:09:18 +0000",
            "from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])\n\tby aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2GI9HgF028040\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 16 Mar 2018 18:09:17 GMT",
            "from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15])\n\tby userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id\n\tw2GI9GOs008995; Fri, 16 Mar 2018 18:09:17 GMT",
            "from slnelson-mint18.us.oracle.com (/10.159.151.146)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Fri, 16 Mar 2018 11:09:16 -0700"
        ],
        "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=relaxed/relaxed; d=oracle.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references;\n\ts=corp-2017-10-26; \n\tbh=4kEZst93OzEBTjvpKmlCFy5TKuCNMWvTENJNhlMAdk8=;\n\tb=rz37b0+ZBLhnNRTAgaQYdLobfLjXGCvLqHzsZ1WKOZO9r81nhD7F8Uwn6r65xOuaxPrM\n\tNkTrumSp4Mv7jbR7NN1ljnYWEkGUv5f49cVENx0UPNXUT63vtI0lVRu/5MzSoduvR1Eh\n\tGwqq4yvocxuYSaFuBEOuwdwGXJTuntPo9fi/fNC1yJthLuGU1kngdOxCWzhlZmI7H6AO\n\tH6aQBXMHAnp6OY3Bl7JhJscvyqzsH6QvfTSX+OtlD0vVFKj5BuZ3+u7YNeQ+mWdM7LY7\n\tp5WLcLTgh3W14W+2SUJlqXH37OcsacNxYjjafY5sIctq+3qkA+cetmKSYCBEf9y7b47o\n\tHA== ",
        "From": "Shannon Nelson <shannon.nelson@oracle.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 16 Mar 2018 11:09:07 -0700",
        "Message-Id": "<1521223747-12018-5-git-send-email-shannon.nelson@oracle.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1521223747-12018-1-git-send-email-shannon.nelson@oracle.com>",
        "References": "<1521223747-12018-1-git-send-email-shannon.nelson@oracle.com>",
        "X-Proofpoint-Virus-Version": "vendor=nai engine=5900 definitions=8833\n\tsignatures=668690",
        "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 suspectscore=1\n\tmalwarescore=0\n\tphishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=991\n\tadultscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1711220000 definitions=main-1803160153",
        "Subject": "[Intel-wired-lan] [next-queue v2 4/4] ixgbe: enable tso with ipsec\n\toffload",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "steffen.klassert@secunet.com, netdev@vger.kernel.org",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Fix things up to support TSO offload in conjunction\nwith IPsec hw offload.  This raises throughput with\nIPsec offload on to nearly line rate.\n\nSigned-off-by: Shannon Nelson <shannon.nelson@oracle.com>\n---\nv2 updates from Alex's comments:\n - changed feature add from variable to #define\n - fixed a reverse christmas tree miss\n - GSO_PARTIAL'd the ipv4 header checksum\n - dropped an extra blank line\n\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c |  9 +++++++--\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  | 26 ++++++++++++++++++--------\n 2 files changed, 25 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\nindex 5ddea43..68af127 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n@@ -929,8 +929,13 @@ void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter)\n \tixgbe_ipsec_clear_hw_tables(adapter);\n \n \tadapter->netdev->xfrmdev_ops = &ixgbe_xfrmdev_ops;\n-\tadapter->netdev->features |= NETIF_F_HW_ESP;\n-\tadapter->netdev->hw_enc_features |= NETIF_F_HW_ESP;\n+\n+#define IXGBE_ESP_FEATURES\t(NETIF_F_HW_ESP | \\\n+\t\t\t\t NETIF_F_HW_ESP_TX_CSUM | \\\n+\t\t\t\t NETIF_F_GSO_ESP)\n+\n+\tadapter->netdev->features |= IXGBE_ESP_FEATURES;\n+\tadapter->netdev->hw_enc_features |= IXGBE_ESP_FEATURES;\n \n \treturn;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex a54f3d8..b947435 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -7721,7 +7721,8 @@ static void ixgbe_service_task(struct work_struct *work)\n \n static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \t\t     struct ixgbe_tx_buffer *first,\n-\t\t     u8 *hdr_len)\n+\t\t     u8 *hdr_len,\n+\t\t     struct ixgbe_ipsec_tx_data *itd)\n {\n \tu32 vlan_macip_lens, type_tucmd, mss_l4len_idx;\n \tstruct sk_buff *skb = first->skb;\n@@ -7735,6 +7736,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \t\tunsigned char *hdr;\n \t} l4;\n \tu32 paylen, l4_offset;\n+\tu32 fceof_saidx = 0;\n \tint err;\n \n \tif (skb->ip_summed != CHECKSUM_PARTIAL)\n@@ -7760,13 +7762,15 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \tif (ip.v4->version == 4) {\n \t\tunsigned char *csum_start = skb_checksum_start(skb);\n \t\tunsigned char *trans_start = ip.hdr + (ip.v4->ihl * 4);\n+\t\tint len = csum_start - trans_start;\n \n \t\t/* IP header will have to cancel out any data that\n-\t\t * is not a part of the outer IP header\n+\t\t * is not a part of the outer IP header, so set to\n+\t\t * a reverse csum if needed, else init check to 0.\n \t\t */\n-\t\tip.v4->check = csum_fold(csum_partial(trans_start,\n-\t\t\t\t\t\t      csum_start - trans_start,\n-\t\t\t\t\t\t      0));\n+\t\tip.v4->check = (skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) ?\n+\t\t\t\t\t   csum_fold(csum_partial(trans_start,\n+\t\t\t\t\t\t\t\t  len, 0)) : 0;\n \t\ttype_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;\n \n \t\tip.v4->tot_len = 0;\n@@ -7797,12 +7801,15 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \tmss_l4len_idx = (*hdr_len - l4_offset) << IXGBE_ADVTXD_L4LEN_SHIFT;\n \tmss_l4len_idx |= skb_shinfo(skb)->gso_size << IXGBE_ADVTXD_MSS_SHIFT;\n \n+\tfceof_saidx |= itd->sa_idx;\n+\ttype_tucmd |= itd->flags | itd->trailer_len;\n+\n \t/* vlan_macip_lens: HEADLEN, MACLEN, VLAN tag */\n \tvlan_macip_lens = l4.hdr - ip.hdr;\n \tvlan_macip_lens |= (ip.hdr - skb->data) << IXGBE_ADVTXD_MACLEN_SHIFT;\n \tvlan_macip_lens |= first->tx_flags & IXGBE_TX_FLAGS_VLAN_MASK;\n \n-\tixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, 0, type_tucmd,\n+\tixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, fceof_saidx, type_tucmd,\n \t\t\t  mss_l4len_idx);\n \n \treturn 1;\n@@ -8493,7 +8500,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,\n \tif (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))\n \t\tgoto out_drop;\n #endif\n-\ttso = ixgbe_tso(tx_ring, first, &hdr_len);\n+\ttso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx);\n \tif (tso < 0)\n \t\tgoto out_drop;\n \telse if (!tso)\n@@ -9902,8 +9909,11 @@ ixgbe_features_check(struct sk_buff *skb, struct net_device *dev,\n \n \t/* We can only support IPV4 TSO in tunnels if we can mangle the\n \t * inner IP ID field, so strip TSO if MANGLEID is not supported.\n+\t * IPsec offoad sets skb->encapsulation but still can handle\n+\t * the TSO, so it's the exception.\n \t */\n-\tif (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))\n+\tif (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID) &&\n+\t    !skb->sp)\n \t\tfeatures &= ~NETIF_F_TSO;\n \n \treturn features;\n",
    "prefixes": [
        "next-queue",
        "v2",
        "4/4"
    ]
}