From patchwork Tue Feb 6 22:27:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 870135 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="HBMqVgCG"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tgV3k/Kn"; 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 3zbfGh1Vwfz9s4q for ; Wed, 7 Feb 2018 09:27:40 +1100 (AEDT) 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=++piiTbn8qyysfMD8sep6xnUYtaRQhTF+k2scrYiH5U=; b=HBMqVgCGQeYHEI QS5+jZ1/IFSoOOMW9rvKdfZOSf35P0j20Xsp73YP92nFaGYKBj7OrfmA2JuCz9gWaJ+7Jui/3B6P8 9CilD7w9NLGAHn6vtX16Gv1KBZ0YoAk6ihiPIALTdImuEKTA7fE+bbD2XY4lxnA79KdTODBIP6gt0 sdS34eN9qQuvX6y+9fpHn5d1uQ1WTqBVToTSNfLpnm+7KCXuiGWboM+sQmWnv957RIkhtx0s7JeUN 3OXkbUBYrZJggV4DCK68sTw13uElfMYd6cWdAprEUBlTw8VIa4DlhlxGQhiHA8AZb18PKOjUZzpEO x0ePqGXDbLnVZEP13q5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ejBiA-0005PU-RO; Tue, 06 Feb 2018 22:27:34 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ejBi6-0005Oh-0d for lede-dev@lists.infradead.org; Tue, 06 Feb 2018 22:27:32 +0000 Received: by mail-pf0-x241.google.com with SMTP id q79so1260149pfl.5 for ; Tue, 06 Feb 2018 14:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SrYnqsjYr+ydAeS8YpzescUc6Rtu5lN5JlOcQ8sVKbw=; b=tgV3k/KnxW1D8Ft58uhnlC+zN3/+SU7xpVgwijcME64MvXHLC8HH4WAec34u88PhI/ 2RgjaTkXj7Srj50Twb7gBZEgCCcLy0zi5CV0gQ1URf1jfGmFSWe/g13JmmrodsL4Atmb RJMp0362GX+YbotdbABmX/E2MBBilVrgvF6fPIch61iwFxGFTvYFFZvTop+NtcCLcc8l UxF1MWj5uoK2hw429MOO3Ms982jDnDEh+4E8uiEvdvMuKdbR8Bd1uhOGS96CXw5uqaD8 WBdRayVL8Fc8kio2yGhTsnbo73enQrbHKsbyprlfUtwsbRvWxsk1D07056Vez4IQ9WjH 4FVg== 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=SrYnqsjYr+ydAeS8YpzescUc6Rtu5lN5JlOcQ8sVKbw=; b=jAw7iESqOhanoNMSjyZRvUlxAjS/LtCc7a5JXayLRLmeGkRbrZ9unBKIx6Eat1Ziy4 7oTFYB/hRmtjP9f++tblq64fycW0ZlyMtqSuW6spbpkg7ekYgYYXtP1c2yxo2wuwhfe/ EP7sUkn1zEB00Shgr3xwkrsR8NKIG0rgMDHXWMEmblQEJ2r/mAkeVG6PBRzCB9uVXjbG kvCIIybv0P8O+Y4WyiBATa/ar1B9aETFRMWkKg4fQkTDq9zL8G/RkWfpIutKyMNL+GoC osgwAhzCLqBTBouZfpjkXSxokZ2Esyca3h8R4xAnaghUIWmqI4TqNNUfO0g+vyqcmECc 2Dqw== X-Gm-Message-State: APf1xPA3WJDW8LAa++TLi/PBqE3LjgL4bJEWIoV0Slc2SNdwYAIThPAK As+q85QNro6G/iS+OgwgHcYi0Ve1 X-Google-Smtp-Source: AH8x226jXDijoEwgsfHfIO1NUaZ25IdrziNRFsmEznkqSxSAnuLHYWOJI3Hy4/WmfLGC4GBM5tF0Xw== X-Received: by 10.98.10.25 with SMTP id s25mr3793957pfi.137.1517956038300; Tue, 06 Feb 2018 14:27:18 -0800 (PST) Received: from DESKTOP-CEH0M93.lan ([2001:470:1f05:c3e:8de7:e3d0:36b6:19fe]) by smtp.gmail.com with ESMTPSA id e26sm60492pfi.76.2018.02.06.14.27.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Feb 2018 14:27:17 -0800 (PST) From: Rosen Penev To: lede-dev@lists.infradead.org Date: Tue, 6 Feb 2018 14:27:28 -0800 Message-Id: <1517956050-32412-1-git-send-email-rosenp@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Note: CRM114 invocation failed 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:c00:0:0:0:241 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 1/3] ag71xx: Remove timestamp struct member and use trans_start instead 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 Small speedup for TX. Based on a Qualcomm commit. ag->timestamp = jiffies was not replaced with netif_trans_update(dev) because of this quote: It should be noted that after this series several instances of netif_trans_update() are useless (if they occur in .ndo_start_xmit and driver doesn't set LLTX flag -- stack already did an update). From: http://lists.openwall.net/netdev/2016/05/03/87 Signed-off-by: Rosen Penev --- target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h | 2 -- .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h index cea172e..d7897a9 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h @@ -172,8 +172,6 @@ struct ag71xx { struct napi_struct napi; u32 msg_enable; - unsigned long timestamp; - /* * From this point onwards we're not looking at per-packet fields. */ 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 47b4c69..13f500b 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 @@ -816,7 +816,6 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff *skb, i = (ring->curr + n - 1) & ring_mask; ring->buf[i].len = skb->len; ring->buf[i].skb = skb; - ag->timestamp = jiffies; netdev_sent_queue(dev, skb->len); @@ -930,7 +929,7 @@ static bool ag71xx_check_dma_stuck(struct ag71xx *ag) { u32 rx_sm, tx_sm, rx_fd; - if (likely(time_before(jiffies, ag->timestamp + HZ/10))) + if (likely(time_before(jiffies, dev_trans_start(ag->dev) + HZ/10))) return false; if (!netif_carrier_ok(ag->dev))