From patchwork Wed Aug 8 15:27:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 10560267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9339F1057 for ; Wed, 8 Aug 2018 15:40:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 813832B121 for ; Wed, 8 Aug 2018 15:40:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74B5E2B1A9; Wed, 8 Aug 2018 15:40:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 27F532B121 for ; Wed, 8 Aug 2018 15:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0sXIAU+8it7vjwWEGm1iC6RiP456PiIi8ZK9cUYpdyw=; b=qIggChn2c/f/yOkphnxYsInlAL GI4FlMVxSy8NI4xktoX3ylARbGtJMIX9AafBOylSO+PCnTRZ+hZkJy0uZuMxyeFUEnczZ88o4wl/T DZRNuMgh15XwpT5n6ffGA7pztHuWpyw5SdubrdyJA2pDUZnydRrL5zsOW7/QxXJeIGfaer6qF4VcN hFwQqynjbrNvO6mUd4/7geR9JtMbUOEpkQP+57PUOfIkmIINg+djaQLumI9w860A9+DaFijtdxtQg Fu5Syer9R+BxcJgS0lXYhY5O5V+fyByC0YvZlK6F7HHqYGoehrWy1E7zfO6fxhvpAxoYXIhwIWujU 4mn62l6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnQZr-0003no-43; Wed, 08 Aug 2018 15:40:47 +0000 Received: from mail.nic.cz ([217.31.204.67]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnQNe-0000V7-Oe for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2018 15:28:14 +0000 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id CA9996084B; Wed, 8 Aug 2018 17:27:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1533742062; bh=B5kKOb1z6/ajPvjWjXvrcRPMqO2VRtyu2JV+9h6Oh2c=; h=From:To:Date; b=AFRczxiwXVURo3tXA/f2Ih2XP+vJi+p7ED5fBmQ24wPxR5Li4jQ3WP1aNamNdKYU6 noTQxwEX7GfIwbtRia2yXi1cIde8lgvM/z2nVWdeshB8O8COAjaQmETmTOtDnwFTlZ uCjECBpA4E2JJEkWJFxVyAeMavaHjlJ7LjX9lV38= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 6/7] net: mvneta: Don't use GRO on Armada 3720 Date: Wed, 8 Aug 2018 17:27:05 +0200 Message-Id: <20180808152706.21727-7-marek.behun@nic.cz> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180808152706.21727-1-marek.behun@nic.cz> References: <20180808152706.21727-1-marek.behun@nic.cz> X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180808_082811_529856_8913A30C X-CRM114-Status: UNSURE ( 8.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , Tomas Hlavacek , Russell King - ARM Linux , =?utf-8?q?Marek_Beh=C3=BA?= =?utf-8?q?n?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP For some reason on Armada 3720 boards (EspressoBin and Turris Mox) the networking driver behaves weirdly when using napi_gro_receive. For example downloading a big file from a local network (low ping) is fast, but when downloading from a remote server (higher ping), the download speed is at first high but drops rapidly to almost nothing or absolutely nothing. This is fixed when using netif_receive_skb instead of napi_gro_receive. Signed-off-by: Marek Behun Cc: Russell King - ARM Linux Cc: netdev@vger.kernel.org diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 0ad2f3f7da85..27f3017d94c5 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -1959,7 +1959,10 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo, skb->protocol = eth_type_trans(skb, dev); mvneta_rx_csum(pp, rx_status, skb); - napi_gro_receive(&port->napi, skb); + if (pp->neta_armada3700) + netif_receive_skb(skb); + else + napi_gro_receive(&port->napi, skb); rcvd_pkts++; rcvd_bytes += rx_bytes; @@ -2001,7 +2004,10 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo, mvneta_rx_csum(pp, rx_status, skb); - napi_gro_receive(&port->napi, skb); + if (pp->neta_armada3700) + netif_receive_skb(skb); + else + napi_gro_receive(&port->napi, skb); } if (rcvd_pkts) {