From patchwork Wed Mar 13 03:08:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yibo Zhao X-Patchwork-Id: 10850889 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 C267D1669 for ; Wed, 13 Mar 2019 10:17:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB70927BA5 for ; Wed, 13 Mar 2019 10:17:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FB332873A; Wed, 13 Mar 2019 10:17:26 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 493A227BA5 for ; Wed, 13 Mar 2019 10:17:26 +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: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:In-Reply-To: References:List-Owner; bh=6H0joSigiy8sQAHC86ATK/Dw9tNo2cX/9DKgVzXexIA=; b=LHM oMJVVWbNxn5K4531BPd59e/A3Rj4BE8r6QugSvL8PBsZfBWKnOxYCS3EN1+1+EVtmJ0gve//rAGUJ 4CT/inLAmhYt0++T1ni9gpy2sdCPDxBurX55ipaGUL9TzzUGplwCmni2PbO0x3gTiNFS6X26Wvjlo gQoDpl8/YRHm4fHsk4SYu3gXhO3iHFIGXFU8l3j1iKydAQvjk9PsfYnVRilDU6MFxsgLv6wfNYB/4 k965Xyda/cbd0Gh/eRDlWVZWz6klOnY7gxNsuE+RXO4FxpgM9qDkWR5diSIbGtpJ5zKXWBA/yVTx8 6NUJHqPoyFgCeGQ6aVyIG2yOTRlqDdQ==; 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 1h40wr-0003R1-N0; Wed, 13 Mar 2019 10:17:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h40qJ-0000TD-7x for ath10k@bombadil.infradead.org; Wed, 13 Mar 2019 10:10:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=U30jUTONMjqV6A9kMc5TWqraeERkKqlQsuThtzsxXYY=; b=C9iXAS0R7kupsR064qJYR10hE 6WsVvrDh+kQAMWRjLYsNYgjISbJ5sZ1bALL9bXWxtlx1Dvo1OabEzGqdcal1Qfs+Yo2QLI3D45wtw /MjaitY+EFQAqPOdPesgyaQGYHfXMgOj1yKzJqLBWGxtpXXWC6Po87orUKdVX2pLFeC4sEBno5y6S L9YEUe7zFbWReDM7CH/Ra4ZTSi7/nsTsALfJobGNFa+IV82rWahBRp/uvMg/28DSEjzBQMdNMLFDf kSuPXqfxulWIJZgPteR674ShZtAja/3j649NUDU92QoyNDhkiv/MONivQv6u+MKsKtozTjIZTkSWj Nw5EjWOtA==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3uHu-0001x4-Th for ath10k@lists.infradead.org; Wed, 13 Mar 2019 03:10:40 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D296F608FC; Wed, 13 Mar 2019 03:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1552446519; bh=w/oa3ozzXFC20BirKzqeEO/aMbnEbQR47GvQe4T+L+I=; h=From:To:Cc:Subject:Date:From; b=jMc6Kespsq9orbES8caS4sENC/3cltbtuBgQHD3QY5cPT0PAYeYPjy/hxvprFO+sy /+wmovqeXJh/M5mx4k6/ZuBDVHJJzw1cmpyG7dMM8yJTlLQ7M79FX/n1OLhcV4iOjB x62hEs0M+w3L6W6UpcWGBu1MEg7Vl/2maEVAEEqI= Received: from ybzhao-Latitude-E5440.ap.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: yiboz@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 147A96013C; Wed, 13 Mar 2019 03:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1552446519; bh=w/oa3ozzXFC20BirKzqeEO/aMbnEbQR47GvQe4T+L+I=; h=From:To:Cc:Subject:Date:From; b=jMc6Kespsq9orbES8caS4sENC/3cltbtuBgQHD3QY5cPT0PAYeYPjy/hxvprFO+sy /+wmovqeXJh/M5mx4k6/ZuBDVHJJzw1cmpyG7dMM8yJTlLQ7M79FX/n1OLhcV4iOjB x62hEs0M+w3L6W6UpcWGBu1MEg7Vl/2maEVAEEqI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 147A96013C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=yiboz@codeaurora.org From: Yibo Zhao To: ath10k@lists.infradead.org Subject: [PATCH v2] fq: fix fq_tin tx bytes overflow Date: Wed, 13 Mar 2019 11:08:25 +0800 Message-Id: <1552446505-15444-1-git-send-email-yiboz@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_031039_137000_14A97F1D X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yibo Zhao , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, we are using u32 for tx_bytes in fq_tin. If the throughput stays more than 1.2Gbps, tx_bytes statistics overflow in about 1 min. In order to allow us to trace the tx_bytes statistics for longer time in high throughput, change its type from u32 to u64. Signed-off-by: Yibo Zhao --- include/net/fq.h | 2 +- net/mac80211/debugfs_netdev.c | 2 +- net/mac80211/debugfs_sta.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/fq.h b/include/net/fq.h index ac944a6..70f8b12 100644 --- a/include/net/fq.h +++ b/include/net/fq.h @@ -53,7 +53,7 @@ struct fq_tin { u32 overlimit; u32 collisions; u32 flows; - u32 tx_bytes; + u64 tx_bytes; u32 tx_packets; }; diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index cff0fb3..8d66f41 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -499,7 +499,7 @@ static ssize_t ieee80211_if_fmt_aqm( len = scnprintf(buf, buflen, "ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets\n" - "%u %u %u %u %u %u %u %u %u %u\n", + "%u %u %u %u %u %u %u %u %llu %u\n", txqi->txq.ac, txqi->tin.backlog_bytes, txqi->tin.backlog_packets, diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 3aa618d..e54a6d6 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c @@ -168,7 +168,7 @@ static ssize_t sta_aqm_read(struct file *file, char __user *userbuf, continue; txqi = to_txq_info(sta->sta.txq[i]); p += scnprintf(p, bufsz+buf-p, - "%d %d %u %u %u %u %u %u %u %u %u 0x%lx(%s%s%s)\n", + "%d %d %u %u %u %u %u %u %u %llu %u 0x%lx(%s%s%s)\n", txqi->txq.tid, txqi->txq.ac, txqi->tin.backlog_bytes,