Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/724866/?format=api
{ "id": 724866, "url": "http://patchwork.ozlabs.org/api/patches/724866/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170207022608.9864.26216.stgit@localhost.localdomain/", "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": "<20170207022608.9864.26216.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2017-02-07T02:26:15", "name": "[next,v5,05/12] igb: Limit maximum frame Rx based on MTU", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7d2bbbd1096ed5bb9a5cd5549891cee783b42afc", "submitter": { "id": 252, "url": "http://patchwork.ozlabs.org/api/people/252/?format=api", "name": "Alexander Duyck", "email": "alexander.duyck@gmail.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/20170207022608.9864.26216.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/724866/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/724866/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 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 3vHSrY5bCKz9s2P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 7 Feb 2017 13:26:21 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2089830A5A;\n\tTue, 7 Feb 2017 02:26:20 +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 eP2JLnlSWA5J; Tue, 7 Feb 2017 02:26:18 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2061230A47;\n\tTue, 7 Feb 2017 02:26:18 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id C387A1BFEC6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:26:16 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BF2F58A401\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:26:16 +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 K3241JNIQuu7 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:26:16 +0000 (UTC)", "from mail-pg0-f66.google.com (mail-pg0-f66.google.com\n\t[74.125.83.66])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 3ED158A3FA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:26:16 +0000 (UTC)", "by mail-pg0-f66.google.com with SMTP id v184so10617214pgv.1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 06 Feb 2017 18:26:16 -0800 (PST)", "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tg28sm5887899pgn.3.2017.02.06.18.26.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 06 Feb 2017 18:26:15 -0800 (PST)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"AcqTo80w\"; dkim-atps=neutral", "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=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=MBha3egKAIhcUcU47IqE0NHoXVMUUNMsa1q+mekQSTc=;\n\tb=AcqTo80wpVQ6ltJ+LC4tTNQTGUyJPtCRmfd+Y8nSjURvYN+TK3zmIV298uFs7bDIT6\n\tp/70twr3261NjdPI6D30bBSZwRoRS/AlN5KLubj3htitvbmhPaKE4u2GqD86lJHlRXTp\n\tz5IPFU0WXT/lZZGaRjiYRmUhdsDGF5nbSiRPKEEOBFg/Rk2P3C/Ev3CITuPYw4k+TcWB\n\thD6Ebls8KZJv5vt2Uc5WffC4B01+bACBycvBG2u56dp21WVVcd/M7AdvD5hmzwkTmgEC\n\tjZCDHHdFEZzBZWNAA8JZCrmHeJvtUYRNBSXfjuhaVAgYbHtTcIayvNzTkg27Y2x8f/ba\n\t8vlg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\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=MBha3egKAIhcUcU47IqE0NHoXVMUUNMsa1q+mekQSTc=;\n\tb=TYj5bFiPm/c6RWMa0KrpotMxqRR87eitKSSXZpZGTSNSG6IB1I+UcuFkX3uCJBXfCx\n\tVRwImzhipb9epula3ezAomVmRsHGZDR/rB4exV2Nrm4J6OaHk/MSk+e3bFl6DJJmIsCr\n\tnMu+HKMqKvSLwIQHrXmBMsbzD+8nwJeYUGWdRpfa4MQ8CjYAqzhKpTAkozLCB7n7hXpe\n\tkyyh45Yv1cIa5TaLbbJLpsvAaEooS1kPKr6RGOowdM2PtrltLXn/Jp2VCacRF87QWVE/\n\tx3dF05F19laObaVIk3zj18ubbqE31ZhaVJDO4vl/17KMWiBF0S0t+oL56tYoTY2txnmb\n\t1oOg==", "X-Gm-Message-State": "AIkVDXLto4DaCNJKR52FifTDqLXa5IwFQkKqFc2agMYHOMI9J4AlrW9gIXFhNSGEm6MDXw==", "X-Received": "by 10.84.197.69 with SMTP id m63mr22284825pld.19.1486434375870; \n\tMon, 06 Feb 2017 18:26:15 -0800 (PST)", "From": "Alexander Duyck <alexander.duyck@gmail.com>", "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com", "Date": "Mon, 06 Feb 2017 18:26:15 -0800", "Message-ID": "<20170207022608.9864.26216.stgit@localhost.localdomain>", "In-Reply-To": "<20170207022339.9864.87863.stgit@localhost.localdomain>", "References": "<20170207022339.9864.87863.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next PATCH v5 05/12] igb: Limit maximum frame Rx\n\tbased on MTU", "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": "From: Alexander Duyck <alexander.h.duyck@intel.com>\n\nIn order to support the use of build_skb going forward it will be necessary\nto place a maximum limit on the amount of data we can receive when jumbo\nframes is not enabled. In order to do this I am adding a new upper limit\nfor receive based on the size of a 2K buffer minus padding.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\nv5: Fixed bug where RLPML was not set for 82575, i210, and i211 interfaces.\n\n drivers/net/ethernet/intel/igb/igb.h | 10 +++++++++-\n drivers/net/ethernet/intel/igb/igb_main.c | 21 +++++++++++++++++----\n 2 files changed, 26 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h\nindex a638254f4e06..a74928cc0e58 100644\n--- a/drivers/net/ethernet/intel/igb/igb.h\n+++ b/drivers/net/ethernet/intel/igb/igb.h\n@@ -143,8 +143,17 @@ struct vf_data_storage {\n #define IGB_RXBUFFER_256\t256\n #define IGB_RXBUFFER_2048\t2048\n #define IGB_RX_HDR_LEN\t\tIGB_RXBUFFER_256\n+#define IGB_TS_HDR_LEN\t\t16\n #define IGB_RX_BUFSZ\t\tIGB_RXBUFFER_2048\n \n+#define IGB_SKB_PAD\t\t(NET_SKB_PAD + NET_IP_ALIGN)\n+#if (PAGE_SIZE < 8192)\n+#define IGB_MAX_FRAME_BUILD_SKB \\\n+\t(SKB_WITH_OVERHEAD(IGB_RXBUFFER_2048) - IGB_SKB_PAD - IGB_TS_HDR_LEN)\n+#else\n+#define IGB_MAX_FRAME_BUILD_SKB (IGB_RXBUFFER_2048 - IGB_TS_HDR_LEN)\n+#endif\n+\n /* How many Rx Buffers do we bundle into one write to the hardware ? */\n #define IGB_RX_BUFFER_WRITE\t16 /* Must be power of 2 */\n \n@@ -561,7 +570,6 @@ struct igb_adapter {\n #define IGB_DMCTLX_DCFLUSH_DIS\t0x80000000 /* Disable DMA Coal Flush */\n \n #define IGB_82576_TSYNC_SHIFT\t19\n-#define IGB_TS_HDR_LEN\t\t16\n enum e1000_state_t {\n \t__IGB_TESTING,\n \t__IGB_RESETTING,\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 3f3ae098e39a..0820fded7331 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -4250,7 +4250,7 @@ static void igb_set_rx_mode(struct net_device *netdev)\n \tstruct igb_adapter *adapter = netdev_priv(netdev);\n \tstruct e1000_hw *hw = &adapter->hw;\n \tunsigned int vfn = adapter->vfs_allocated_count;\n-\tu32 rctl = 0, vmolr = 0;\n+\tu32 rctl = 0, vmolr = 0, rlpml = MAX_JUMBO_FRAME_SIZE;\n \tint count;\n \n \t/* Check for Promiscuous and All Multicast modes */\n@@ -4308,6 +4308,14 @@ static void igb_set_rx_mode(struct net_device *netdev)\n \t\t\t\t E1000_RCTL_VFE);\n \twr32(E1000_RCTL, rctl);\n \n+#if (PAGE_SIZE < 8192)\n+\tif (!adapter->vfs_allocated_count) {\n+\t\tif (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)\n+\t\t\trlpml = IGB_MAX_FRAME_BUILD_SKB;\n+\t}\n+#endif\n+\twr32(E1000_RLPML, rlpml);\n+\n \t/* In order to support SR-IOV and eventually VMDq it is necessary to set\n \t * the VMOLR to enable the appropriate modes. Without this workaround\n \t * we will have issues with VLAN tag stripping not being done for frames\n@@ -4322,12 +4330,17 @@ static void igb_set_rx_mode(struct net_device *netdev)\n \tvmolr |= rd32(E1000_VMOLR(vfn)) &\n \t\t ~(E1000_VMOLR_ROPE | E1000_VMOLR_MPME | E1000_VMOLR_ROMPE);\n \n-\t/* enable Rx jumbo frames, no need for restriction */\n+\t/* enable Rx jumbo frames, restrict as needed to support build_skb */\n \tvmolr &= ~E1000_VMOLR_RLPML_MASK;\n-\tvmolr |= MAX_JUMBO_FRAME_SIZE | E1000_VMOLR_LPE;\n+#if (PAGE_SIZE < 8192)\n+\tif (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)\n+\t\tvmolr |= IGB_MAX_FRAME_BUILD_SKB;\n+\telse\n+#endif\n+\t\tvmolr |= MAX_JUMBO_FRAME_SIZE;\n+\tvmolr |= E1000_VMOLR_LPE;\n \n \twr32(E1000_VMOLR(vfn), vmolr);\n-\twr32(E1000_RLPML, MAX_JUMBO_FRAME_SIZE);\n \n \tigb_restore_vf_multicasts(adapter);\n }\n", "prefixes": [ "next", "v5", "05/12" ] }