From patchwork Sun Sep 3 18:35:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 809350 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jcYP0OHU"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UOLaZjsm"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xlhWr3RJ8z9sPs for ; Mon, 4 Sep 2017 04:36:24 +1000 (AEST) 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:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aZe1qBr7hPpb2WW1TXAeon8m++npM92dyZW8nH1XZYY=; b=jcYP0OHUnVWu8T pIlR92rVBDQfAOkoI753X5r13F74Zkx22E+8+2nHt/kb/3HK9Ic4iu/7KJw8vRdMf5UeCKmPwHmOk OO64k8zi7CetJFsmS+Q7i7wLaMG/JFfFswIUy/sel7nBzIs1ezVbFYxnyv53NtTkK+IqfPidQQ8m1 7/3zgxOEMEm8zMa35K170vK6jBJWUG3TyEd2GhhZnNH1ufpWclkP6GmbRSgjZiberD09vfeBYx9AU /Q+trlccd4pbLMJXFJQuAfqSj5v31u/z1FmegSiF7bWt64beDlNrL0h7D+cwPHZLa4B2BlmXHY4Ob FtfWY95KUVqWrtg5rX6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1doZkl-0007uR-1u; Sun, 03 Sep 2017 18:36:15 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1doZkh-0007tc-Vk for lede-dev@lists.infradead.org; Sun, 03 Sep 2017 18:36:13 +0000 Received: by mail-pg0-x244.google.com with SMTP id 83so3190542pgb.3 for ; Sun, 03 Sep 2017 11:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=tQDaXQ2lyAWEwZoj66VAAGzCGJjm5Ef6lS4GuYKJQoo=; b=UOLaZjsmKxsdkFG7NGqy4rF+gcGxYtNpemEEUZFy4cXDRNKzqhGez8A0n9AunKr7H7 eLWzLWiY1XcjGtZElAddqCitRUV9AN2aNmlgeNl0sIF09y0y+NYCjW+AR+LNrXzHCY6B 2nzvxoeB5Y9UhQGnYdvOk6MOKnqZzAZiaAXO6W0c+dvKrLY4oBf8SBroOgdeBlhrSH1l PXetYAG/haPS9eJmKmMgb3ePCoyExg+MIa/Io2+9WAjcnDD1ZXzjvJ8WzEzBbCC45x3P 3SIUNtESQsrLloqTqmLhoAAMBCd84TSKHnWSTew6FwVrfYg1Xemt/T6PRy5S2cnw4ZEx m+ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tQDaXQ2lyAWEwZoj66VAAGzCGJjm5Ef6lS4GuYKJQoo=; b=Vi6telCz/aDWOpbn5Va/iYeoMvik5cyFYu0SOitjrzQHTiswmNBr170TNHHPiZ2+9E w7Capac3oP/V57M3cfFCXFQ2Zx04tsyAVfIJr22gMtMBW5T91Sa7q3e0DfuAJD/AYcOj 8oGOGJSMGuycIy3w/womw57aD/ilrY+vTMKbVs/1qLClmcf6DSOZoAaqg0bDLQoWJlQj 4Mq53LvOr600LyPYFPf8qtdBdYW+oMVXe94piOBJABE0x7s34D+9nMqPQ77hC2WnsvyQ Ak2Io9yR9NRc9mwEOwTy8J1FfGRwcfiZ49e7drTXwaS/8sGadHD1eN5o8gWW0OO7k3ih hWKw== X-Gm-Message-State: AHPjjUjiK+VVTFdG4QmoXAXmJWt4ChqGU/uK1RtCBPjAfiatkmf68lIu fr/NvKWEu7dKewC4SUk= X-Google-Smtp-Source: ADKCNb765vjfvojU0ZaBLimCtbZR6wNgdeW+yZRmHiYus6o0LbYCfLSYbZ8FfT0629kCqLWksOusSA== X-Received: by 10.84.197.69 with SMTP id m63mr5476690pld.345.1504463750407; Sun, 03 Sep 2017 11:35:50 -0700 (PDT) Received: from mangix.lan ([2001:470:1f05:c3e::8ce]) by smtp.gmail.com with ESMTPSA id d12sm8206625pgn.53.2017.09.03.11.35.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Sep 2017 11:35:49 -0700 (PDT) From: Rosen Penev To: lede-dev@lists.infradead.org Date: Sun, 3 Sep 2017 11:35:46 -0700 Message-Id: <20170903183546.16749-1-rosenp@gmail.com> X-Mailer: git-send-email 2.13.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170903_113612_078730_71314C0D X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH] ar71xx: Add GRO support to ag71xx X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rosen Penev MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On a TL-WN710N, this patch increases iperf performance from ~92.5 to ~93.5 mbps. Keep in mind the WN710N is a 100mbps device. I expect greater numbers from gigabit devices. Signed-off-by: Rosen Penev --- .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 566e9513d8..ae1bdf6066 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -1089,7 +1089,7 @@ next: while ((skb = __skb_dequeue(&queue)) != NULL) { skb->protocol = eth_type_trans(skb, dev); - netif_receive_skb(skb); + napi_gro_receive(&ag->napi, skb); } DBG("%s: rx finish, curr=%u, dirty=%u, done=%d\n", @@ -1141,7 +1141,7 @@ static int ag71xx_poll(struct napi_struct *napi, int limit) DBG("%s: disable polling mode, rx=%d, tx=%d,limit=%d\n", dev->name, rx_done, tx_done, limit); - napi_complete(napi); + napi_complete_done(napi, rx_done); /* enable interrupts */ spin_lock_irqsave(&ag->lock, flags); @@ -1160,7 +1160,7 @@ oom: pr_info("%s: out of memory\n", dev->name); mod_timer(&ag->oom_timer, jiffies + AG71XX_OOM_REFILL); - napi_complete(napi); + napi_complete_done(napi, rx_done); return 0; }