Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/610654/?format=api
{ "id": 610654, "url": "http://patchwork.ozlabs.org/api/patches/610654/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160414211925.14141.43481.stgit@ahduyck-xeon-server/", "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": "<20160414211925.14141.43481.stgit@ahduyck-xeon-server>", "list_archive_url": null, "date": "2016-04-14T21:19:25", "name": "[next-queue,v2,1/3] i40e/i40evf: Add support for GSO partial with UDP_TUNNEL_CSUM and GRE_CSUM", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1252327cbe112b308315dab28f1f3032a98a76ce", "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/20160414211925.14141.43481.stgit@ahduyck-xeon-server/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/610654/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/610654/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 3qmD883SB5z9sDC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Apr 2016 07:19:36 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C51298A801;\n\tThu, 14 Apr 2016 21:19:35 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id UH13TUS6d+8X; Thu, 14 Apr 2016 21:19:34 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C8DF08A521;\n\tThu, 14 Apr 2016 21:19:34 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 563FB1C0DF4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 14 Apr 2016 21:19:33 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4ED0F85A55\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 14 Apr 2016 21:19:33 +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 dGXqKIfQSdIl for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 14 Apr 2016 21:19:32 +0000 (UTC)", "from mail-pf0-f172.google.com (mail-pf0-f172.google.com\n\t[209.85.192.172])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 1EA4C859E6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 14 Apr 2016 21:19:32 +0000 (UTC)", "by mail-pf0-f172.google.com with SMTP id n1so49612889pfn.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 14 Apr 2016 14:19:32 -0700 (PDT)", "from [192.168.1.144] (static-50-53-29-36.bvtn.or.frontiernet.net.\n\t[50.53.29.36]) by smtp.gmail.com with ESMTPSA id\n\ta86sm19308610pfc.42.2016.04.14.14.19.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 14 Apr 2016 14:19:30 -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=bRioQ6ev; 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=idi1kqViz0asIEnsWuzYdpZTXPUnzZ08tB5MfarXfLE=;\n\tb=bRioQ6evdoxve7O1Re+dlGb3CtVrwgErASvQS5d5PL8fvAVnvNnqIj/ahgPwhecChX\n\tGaaetddH3EscPeqpgFcUX61EmyMJr/HO7tTtJr9DTDJWQRRuB5GAHj0HoqwpNi1d6yPl\n\ti8mR5wwVmUxXQOkOPPqTCOYy66SjKE9cRCsKw=", "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=idi1kqViz0asIEnsWuzYdpZTXPUnzZ08tB5MfarXfLE=;\n\tb=fM0usDP8+X2CfNZ2AgQzi9D6Sm86YfLO++k7pqzYW3raIxD3OZi8S40Ye7RFEysOFl\n\tDICnTXGr+CaCAeM2bcbJQBALyHpYlkqrttru8mODza/iJOdjh8gEesUXn42eFU3JvH2y\n\tx7fxzAxF4Q0O6lOHtQlKkuUCQzKkuYeCB8HcexbmMIdLvf1DwlsGeSU1eKds7zJCoTSS\n\t8hQA95oUQFQ0fzw0FXU4vsMNzJweBN0ANB9eNJyU1sFGctZqZyi0j3i5irS9IISHFAkG\n\tjbI+mTl1CceamFDleoFFCOrEs0EsMJ+jHT70wd4+Hv7J1fiI/mfBdndpfOw/kF5lbec7\n\teFNQ==", "X-Gm-Message-State": "AOPr4FVMVBDr+k7cawRralYCJSf31YNh8Gt3oOTQcwFR28xiKzLHKCkgDV7GTwCKum+Q3/Ma", "X-Received": "by 10.98.7.153 with SMTP id 25mr24556893pfh.38.1460668771596;\n\tThu, 14 Apr 2016 14:19:31 -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": "Thu, 14 Apr 2016 17:19:25 -0400", "Message-ID": "<20160414211925.14141.43481.stgit@ahduyck-xeon-server>", "In-Reply-To": "<20160414210725.14141.25917.stgit@ahduyck-xeon-server>", "References": "<20160414210725.14141.25917.stgit@ahduyck-xeon-server>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next-queue PATCH v2 1/3] i40e/i40evf: Add\n\tsupport for GSO partial with UDP_TUNNEL_CSUM and GRE_CSUM", "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": "This patch makes it so that i40e and i40evf can use GSO_PARTIAL to support\nsegmentation for frames with checksums enabled in outer headers. As a\nresult we can now send data over these types of tunnels at over 20Gb/s\nversus the 12Gb/s that was previously possible on my system.\n\nThe advantage with the i40e parts is that this offload is mostly\ntransparent as the hardware still deals with the inner and/or outer IPv4\nheaders so the IP ID is still incrementing for both when this offload is\nperformed.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 10 ++++++++--\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++++++-\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 7 ++++++-\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 ++++++++--\n 4 files changed, 28 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 19a2d3033f7f..8e6c0f2487d7 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -9130,20 +9130,25 @@ 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_GRE_CSUM\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_GSO_PARTIAL\t\t|\n \t\t\t\t NETIF_F_SCTP_CRC\t\t|\n \t\t\t\t NETIF_F_RXHASH\t\t|\n \t\t\t\t NETIF_F_RXCSUM\t\t|\n \t\t\t\t 0;\n \n \tif (!(pf->flags & I40E_FLAG_OUTER_UDP_CSUM_CAPABLE))\n-\t\tnetdev->hw_enc_features ^= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\t\tnetdev->gso_partial_features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\n+\tnetdev->gso_partial_features |= NETIF_F_GSO_GRE_CSUM;\n \n \t/* record features VLANs can make use of */\n-\tnetdev->vlan_features |= netdev->hw_enc_features;\n+\tnetdev->vlan_features |= netdev->hw_enc_features |\n+\t\t\t\t NETIF_F_TSO_MANGLEID;\n \n \tif (!(pf->flags & I40E_FLAG_MFP_ENABLED))\n \t\tnetdev->hw_features |= NETIF_F_NTUPLE;\n@@ -9153,6 +9158,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)\n \t\t\t NETIF_F_HW_VLAN_CTAG_RX;\n \n \tnetdev->features |= netdev->hw_features | NETIF_F_HW_VLAN_CTAG_FILTER;\n+\tnetdev->hw_enc_features |= NETIF_F_TSO_MANGLEID;\n \n \tif (vsi->type == I40E_VSI_MAIN) {\n \t\tSET_NETDEV_DEV(netdev, &pf->pdev->dev);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 17ee438d1e03..4e5ecc36313c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -2319,11 +2319,15 @@ static int i40e_tso(struct sk_buff *skb, u8 *hdr_len, u64 *cd_type_cmd_tso_mss)\n \t}\n \n \tif (skb_shinfo(skb)->gso_type & (SKB_GSO_GRE |\n+\t\t\t\t\t SKB_GSO_GRE_CSUM |\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\tif (!(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) &&\n+\t\t (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM)) {\n+\t\t\tl4.udp->len = 0;\n+\n \t\t\t/* determine offset of outer transport header */\n \t\t\tl4_offset = l4.hdr - skb->data;\n \n@@ -2500,6 +2504,7 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \n \t\t/* indicate if we need to offload outer UDP header */\n \t\tif ((*tx_flags & I40E_TX_FLAGS_TSO) &&\n+\t\t !(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) &&\n \t\t (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM))\n \t\t\ttunnel |= I40E_TXD_CTX_QW0_L4T_CS_MASK;\n \ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 4633235ee70b..ede8dfc189bc 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -1566,11 +1566,15 @@ static int i40e_tso(struct sk_buff *skb, u8 *hdr_len, u64 *cd_type_cmd_tso_mss)\n \t}\n \n \tif (skb_shinfo(skb)->gso_type & (SKB_GSO_GRE |\n+\t\t\t\t\t SKB_GSO_GRE_CSUM |\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\tif (!(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) &&\n+\t\t (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM)) {\n+\t\t\tl4.udp->len = 0;\n+\n \t\t\t/* determine offset of outer transport header */\n \t\t\tl4_offset = l4.hdr - skb->data;\n \n@@ -1705,6 +1709,7 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags,\n \n \t\t/* indicate if we need to offload outer UDP header */\n \t\tif ((*tx_flags & I40E_TX_FLAGS_TSO) &&\n+\t\t !(skb_shinfo(skb)->gso_type & SKB_GSO_PARTIAL) &&\n \t\t (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM))\n \t\t\ttunnel |= I40E_TXD_CTX_QW0_L4T_CS_MASK;\n \ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex b9b1dd831a16..9f0bd7acc22a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -2240,20 +2240,25 @@ 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_GRE_CSUM\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_GSO_PARTIAL\t\t|\n \t\t\t\t NETIF_F_SCTP_CRC\t\t|\n \t\t\t\t NETIF_F_RXHASH\t\t|\n \t\t\t\t NETIF_F_RXCSUM\t\t|\n \t\t\t\t 0;\n \n \tif (!(adapter->flags & I40EVF_FLAG_OUTER_UDP_CSUM_CAPABLE))\n-\t\tnetdev->hw_enc_features ^= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\t\tnetdev->gso_partial_features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;\n+\n+\tnetdev->gso_partial_features |= NETIF_F_GSO_GRE_CSUM;\n \n \t/* record features VLANs can make use of */\n-\tnetdev->vlan_features |= netdev->hw_enc_features;\n+\tnetdev->vlan_features |= netdev->hw_enc_features |\n+\t\t\t\t NETIF_F_TSO_MANGLEID;\n \n \t/* Write features and hw_features separately to avoid polluting\n \t * with, or dropping, features that are set when we registgered.\n@@ -2261,6 +2266,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)\n \tnetdev->hw_features |= netdev->hw_enc_features;\n \n \tnetdev->features |= netdev->hw_enc_features | I40EVF_VLAN_FEATURES;\n+\tnetdev->hw_enc_features |= NETIF_F_TSO_MANGLEID;\n \n \t/* disable VLAN features if not supported */\n \tif (!(vfres->vf_offload_flags & I40E_VIRTCHNL_VF_OFFLOAD_VLAN))\n", "prefixes": [ "next-queue", "v2", "1/3" ] }