Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1175410/?format=api
{ "id": 1175410, "url": "http://patchwork.ozlabs.org/api/patches/1175410/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1570812820-20052-2-git-send-email-johunt@akamai.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": "<1570812820-20052-2-git-send-email-johunt@akamai.com>", "list_archive_url": null, "date": "2019-10-11T16:53:38", "name": "[v3,1/3] igb: Add UDP segmentation offload support", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "31911b81458e50159741ff2ff3f445599b43dbaf", "submitter": { "id": 4788, "url": "http://patchwork.ozlabs.org/api/people/4788/?format=api", "name": "Josh Hunt", "email": "johunt@akamai.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/1570812820-20052-2-git-send-email-johunt@akamai.com/mbox/", "series": [ { "id": 135642, "url": "http://patchwork.ozlabs.org/api/series/135642/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=135642", "date": "2019-10-11T16:53:37", "name": "igb, ixgbe, i40e UDP segmentation offload support", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/135642/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1175410/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1175410/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; dmarc=fail (p=quarantine dis=none)\n\theader.from=akamai.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tsecure) header.d=akamai.com header.i=@akamai.com header.b=\"bGCvaeYn\";\n\tdkim-atps=neutral" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 46qYw31KCLz9sP4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 12 Oct 2019 03:54:43 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 94D94259FF;\n\tFri, 11 Oct 2019 16:54:41 +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 Ut6eQ1BC52Ki; Fri, 11 Oct 2019 16:54:39 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3291720426;\n\tFri, 11 Oct 2019 16:54:39 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3C7291BF2C7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 11 Oct 2019 16:54:38 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 310168502B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 11 Oct 2019 16:54:38 +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 FmIi1HgYx44k for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 11 Oct 2019 16:54:37 +0000 (UTC)", "from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com\n\t[67.231.157.127])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 7846284FB2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 11 Oct 2019 16:54:37 +0000 (UTC)", "from pps.filterd (m0050096.ppops.net [127.0.0.1])\n\tby m0050096.ppops.net-00190b01. (8.16.0.42/8.16.0.42) with SMTP id\n\tx9BGqHEK015284; Fri, 11 Oct 2019 17:53:30 +0100", "from prod-mail-ppoint4 (prod-mail-ppoint4.akamai.com [96.6.114.87]\n\t(may be forged))\n\tby m0050096.ppops.net-00190b01. with ESMTP id 2vekk97acb-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Fri, 11 Oct 2019 17:53:30 +0100", "from pps.filterd (prod-mail-ppoint4.akamai.com [127.0.0.1])\n\tby prod-mail-ppoint4.akamai.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx9BGloDA030555; Fri, 11 Oct 2019 12:53:29 -0400", "from prod-mail-relay14.akamai.com ([172.27.17.39])\n\tby prod-mail-ppoint4.akamai.com with ESMTP id 2veph4gxkt-1;\n\tFri, 11 Oct 2019 12:53:28 -0400", "from bos-lpwg1 (bos-lpwg1.kendall.corp.akamai.com [172.29.171.203])\n\tby prod-mail-relay14.akamai.com (Postfix) with ESMTP id 35B8480F5B; \n\tFri, 11 Oct 2019 16:53:13 +0000 (GMT)", "from johunt by bos-lpwg1 with local (Exim 4.86_2)\n\t(envelope-from <johunt@akamai.com>)\n\tid 1iIyAg-0005EQ-JI; Fri, 11 Oct 2019 12:53:42 -0400" ], "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=akamai.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references; s=jan2016.eng;\n\tbh=u2S429gynxciYOuJT6Ibev3TFsNjNPSem8Np8R/iwjQ=;\n\tb=bGCvaeYnJyimNX5WR+G1/3iacHnJ/0bpck75MXWy6z4PqE8fegAIAcPXbbRgMZkEdFJ5\n\trRNF9cbAL6mq5FDjhshdR6BX7MRW2+mhxRDeZ88P1SUA/klyLZQ5AJarddLwIqjbIBx/\n\tgnN5V2GZniFL9XWHhdZ09P9ZirsBMrZ+6y2gq2DVXnhWF5Rgt1e764mOucHm8euPAa8I\n\tMfvleUNAT4v4zD9xWjNTa3Rc29obiCjvdTtrN0Nzk7rBfu6Ag9zDvpCtq4UN1+EOznJX\n\tYm7dbij0nP7DrI8rmdrMsdlqWmljz9gdBGHl7IP8H0EQ/vZfNuEVaZcEhSK7OtOsf5F7\n\t6g== ", "From": "Josh Hunt <johunt@akamai.com>", "To": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tjeffrey.t.kirsher@intel.com", "Date": "Fri, 11 Oct 2019 12:53:38 -0400", "Message-Id": "<1570812820-20052-2-git-send-email-johunt@akamai.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1570812820-20052-1-git-send-email-johunt@akamai.com>", "References": "<1570812820-20052-1-git-send-email-johunt@akamai.com>", "X-Proofpoint-Virus-Version": [ "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-10-11_10:, , signatures=0", "vendor=fsecure engine=2.50.10434:6.0.95,1.0.8\n\tdefinitions=2019-10-11_10:2019-10-10,2019-10-11 signatures=0" ], "X-Proofpoint-Spam-Details": [ "rule=notspam policy=default score=0 suspectscore=0\n\tmalwarescore=0\n\tphishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999\n\tadultscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1908290000 definitions=main-1910110148", "rule=notspam policy=default score=0 bulkscore=0\n\tclxscore=1015 mlxscore=0\n\tlowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0\n\tsuspectscore=0 phishscore=0 mlxlogscore=999 impostorscore=0\n\tmalwarescore=0\n\tclassifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.12.0-1908290000\n\tdefinitions=main-1910110149" ], "Subject": "[Intel-wired-lan] [PATCH v3 1/3] igb: Add UDP segmentation offload\n\tsupport", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "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": "Alexander Duyck <alexander.h.duyck@intel.com>, willemb@google.com,\n\tJosh Hunt <johunt@akamai.com>, alexander.h.duyck@linux.intel.com", "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": "Based on a series from Alexander Duyck this change adds UDP segmentation\noffload support to the igb driver.\n\nCC: Alexander Duyck <alexander.h.duyck@intel.com>\nCC: Willem de Bruijn <willemb@google.com>\nSigned-off-by: Josh Hunt <johunt@akamai.com>\n---\n drivers/net/ethernet/intel/igb/e1000_82575.h | 1 +\n drivers/net/ethernet/intel/igb/igb_main.c | 23 +++++++++++++++++------\n 2 files changed, 18 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.h b/drivers/net/ethernet/intel/igb/e1000_82575.h\nindex 6ad775b1a4c5..63ec253ac788 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_82575.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_82575.h\n@@ -127,6 +127,7 @@ struct e1000_adv_tx_context_desc {\n };\n \n #define E1000_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */\n+#define E1000_ADVTXD_TUCMD_L4T_UDP 0x00000000 /* L4 Packet TYPE of UDP */\n #define E1000_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */\n #define E1000_ADVTXD_TUCMD_L4T_TCP 0x00000800 /* L4 Packet TYPE of TCP */\n #define E1000_ADVTXD_TUCMD_L4T_SCTP 0x00001000 /* L4 packet TYPE of SCTP */\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 105b0624081a..b65e8a063aef 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -2516,6 +2516,7 @@ igb_features_check(struct sk_buff *skb, struct net_device *dev,\n \tif (unlikely(mac_hdr_len > IGB_MAX_MAC_HDR_LEN))\n \t\treturn features & ~(NETIF_F_HW_CSUM |\n \t\t\t\t NETIF_F_SCTP_CRC |\n+\t\t\t\t NETIF_F_GSO_UDP_L4 |\n \t\t\t\t NETIF_F_HW_VLAN_CTAG_TX |\n \t\t\t\t NETIF_F_TSO |\n \t\t\t\t NETIF_F_TSO6);\n@@ -2524,6 +2525,7 @@ igb_features_check(struct sk_buff *skb, struct net_device *dev,\n \tif (unlikely(network_hdr_len > IGB_MAX_NETWORK_HDR_LEN))\n \t\treturn features & ~(NETIF_F_HW_CSUM |\n \t\t\t\t NETIF_F_SCTP_CRC |\n+\t\t\t\t NETIF_F_GSO_UDP_L4 |\n \t\t\t\t NETIF_F_TSO |\n \t\t\t\t NETIF_F_TSO6);\n \n@@ -3120,7 +3122,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\t\t NETIF_F_HW_CSUM;\n \n \tif (hw->mac.type >= e1000_82576)\n-\t\tnetdev->features |= NETIF_F_SCTP_CRC;\n+\t\tnetdev->features |= NETIF_F_SCTP_CRC | NETIF_F_GSO_UDP_L4;\n \n \tif (hw->mac.type >= e1000_i350)\n \t\tnetdev->features |= NETIF_F_HW_TC;\n@@ -5694,6 +5696,7 @@ static int igb_tso(struct igb_ring *tx_ring,\n \t} ip;\n \tunion {\n \t\tstruct tcphdr *tcp;\n+\t\tstruct udphdr *udp;\n \t\tunsigned char *hdr;\n \t} l4;\n \tu32 paylen, l4_offset;\n@@ -5713,7 +5716,8 @@ static int igb_tso(struct igb_ring *tx_ring,\n \tl4.hdr = skb_checksum_start(skb);\n \n \t/* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */\n-\ttype_tucmd = E1000_ADVTXD_TUCMD_L4T_TCP;\n+\ttype_tucmd = (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) ?\n+\t\t E1000_ADVTXD_TUCMD_L4T_UDP : E1000_ADVTXD_TUCMD_L4T_TCP;\n \n \t/* initialize outer IP header fields */\n \tif (ip.v4->version == 4) {\n@@ -5741,12 +5745,19 @@ static int igb_tso(struct igb_ring *tx_ring,\n \t/* determine offset of inner transport header */\n \tl4_offset = l4.hdr - skb->data;\n \n-\t/* compute length of segmentation header */\n-\t*hdr_len = (l4.tcp->doff * 4) + l4_offset;\n-\n \t/* remove payload length from inner checksum */\n \tpaylen = skb->len - l4_offset;\n-\tcsum_replace_by_diff(&l4.tcp->check, htonl(paylen));\n+\tif (type_tucmd & E1000_ADVTXD_TUCMD_L4T_TCP) {\n+\t\t/* compute length of segmentation header */\n+\t\t*hdr_len = (l4.tcp->doff * 4) + l4_offset;\n+\t\tcsum_replace_by_diff(&l4.tcp->check,\n+\t\t\t(__force __wsum)htonl(paylen));\n+\t} else {\n+\t\t/* compute length of segmentation header */\n+\t\t*hdr_len = sizeof(*l4.udp) + l4_offset;\n+\t\tcsum_replace_by_diff(&l4.udp->check,\n+\t\t\t\t (__force __wsum)htonl(paylen));\n+\t}\n \n \t/* update gso size and bytecount with header size */\n \tfirst->gso_segs = skb_shinfo(skb)->gso_segs;\n", "prefixes": [ "v3", "1/3" ] }