get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 886467,
    "url": "http://patchwork.ozlabs.org/api/patches/886467/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1521149003-1433-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": "<1521149003-1433-5-git-send-email-shannon.nelson@oracle.com>",
    "list_archive_url": null,
    "date": "2018-03-15T21:23:23",
    "name": "[next-queue,4/4] ixgbe: enable tso with ipsec offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "37a970c8866fc410d7e182fa529215efa13678fb",
    "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/1521149003-1433-5-git-send-email-shannon.nelson@oracle.com/mbox/",
    "series": [
        {
            "id": 34073,
            "url": "http://patchwork.ozlabs.org/api/series/34073/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34073",
            "date": "2018-03-15T21:23:19",
            "name": "ixgbe: Enable tso and checksum offload with ipsec",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/34073/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/886467/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/886467/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.133; helo=hemlock.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=\"ZrRzCatC\"; dkim-atps=neutral"
        ],
        "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 402M5t0dSBz9sQx\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 16 Mar 2018 08:23:46 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 652CB8A29D;\n\tThu, 15 Mar 2018 21:23:44 +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 vgz7BEha8S6A; Thu, 15 Mar 2018 21:23:42 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 522F18A2A2;\n\tThu, 15 Mar 2018 21:23:41 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 06E8D1C033D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 15 Mar 2018 21:23:39 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 041D688259\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 15 Mar 2018 21:23:39 +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 77lw6nV2Q8Ej for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 15 Mar 2018 21:23:38 +0000 (UTC)",
            "from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 5806988282\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 15 Mar 2018 21:23:38 +0000 (UTC)",
            "from pps.filterd (userp2130.oracle.com [127.0.0.1])\n\tby userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id\n\tw2FKiVLn053155; Thu, 15 Mar 2018 21:23:37 GMT",
            "from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])\n\tby userp2130.oracle.com with ESMTP id 2gr04jg4ry-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 15 Mar 2018 21:23:37 +0000",
            "from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])\n\tby aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tw2FLNaAM026859\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 15 Mar 2018 21:23:36 GMT",
            "from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])\n\tby aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tw2FLNaA7028303; Thu, 15 Mar 2018 21:23:36 GMT",
            "from slnelson-mint18.us.oracle.com (/10.159.152.19)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Thu, 15 Mar 2018 14:23:36 -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=o9kboxVjSzBGwFW9I7dDsZRn60n/7qHWWZGL5KABLDE=;\n\tb=ZrRzCatC7ASWR0T+TXYF/dvVZOfFBWFRzamSpOo8I+Nf79Xc0+JAz0bpixmqwrin+KqH\n\tY1xBXWwn8dg/olgzrng9wYz4qcs2bvSZfepxMHHiyRH3Ua/06vLRu63oRVT78evojMIj\n\tHIlcCoT35GSN8XEadZxXO8K9dmEkOWzDX8H2bPvElyu6DK42yGjoEP5NxkQMnLD9S8m6\n\tsNvtxxuK7uqKcAZ9tSco7RWtHg8u9gd6swKGhAeRGMJMCAHEIDHQoHhlWEKv79Q0+IKE\n\t9Q8VQVvm2Ymj778lsYU6sm14oCoJ/9z8IyGoUGxrq4yxhqqgwvJZcuW8mM4ZTbnmh2oW\n\teA== ",
        "From": "Shannon Nelson <shannon.nelson@oracle.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu, 15 Mar 2018 14:23:23 -0700",
        "Message-Id": "<1521149003-1433-5-git-send-email-shannon.nelson@oracle.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1521149003-1433-1-git-send-email-shannon.nelson@oracle.com>",
        "References": "<1521149003-1433-1-git-send-email-shannon.nelson@oracle.com>",
        "X-Proofpoint-Virus-Version": "vendor=nai engine=5900 definitions=8832\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=939\n\tadultscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1711220000 definitions=main-1803150169",
        "Subject": "[Intel-wired-lan] [next-queue 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---\n drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c |  7 +++++--\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  | 25 +++++++++++++++++++------\n 2 files changed, 24 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\nindex 5ddea43..bfbcfc2 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c\n@@ -896,6 +896,7 @@ void ixgbe_ipsec_rx(struct ixgbe_ring *rx_ring,\n void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter)\n {\n \tstruct ixgbe_ipsec *ipsec;\n+\tnetdev_features_t features;\n \tsize_t size;\n \n \tif (adapter->hw.mac.type == ixgbe_mac_82598EB)\n@@ -929,8 +930,10 @@ 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+\tfeatures = NETIF_F_HW_ESP | NETIF_F_HW_ESP_TX_CSUM | NETIF_F_GSO_ESP;\n+\tadapter->netdev->features |= features;\n+\tadapter->netdev->hw_enc_features |= 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..6022666 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -7721,9 +7721,11 @@ 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+\tu32 fceof_saidx = 0;\n \tstruct sk_buff *skb = first->skb;\n \tunion {\n \t\tstruct iphdr *v4;\n@@ -7762,9 +7764,13 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,\n \t\tunsigned char *trans_start = ip.hdr + (ip.v4->ihl * 4);\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, except for\n+\t\t * IPsec where we want the IP+ESP header.\n \t\t */\n-\t\tip.v4->check = csum_fold(csum_partial(trans_start,\n+\t\tif (first->tx_flags & IXGBE_TX_FLAGS_IPSEC)\n+\t\t\tip.v4->check = 0;\n+\t\telse\n+\t\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\ttype_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;\n@@ -7797,12 +7803,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 +8502,8 @@ 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+\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 +9912,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",
        "4/4"
    ]
}