From patchwork Tue Sep 4 06:45:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anilkumar Kolli X-Patchwork-Id: 10586761 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 44EF4112B for ; Tue, 4 Sep 2018 06:43:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32E4528C31 for ; Tue, 4 Sep 2018 06:43:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 269EC28F2B; Tue, 4 Sep 2018 06:43:38 +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,RCVD_IN_DNSWL_NONE autolearn=unavailable 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 ACBED28C31 for ; Tue, 4 Sep 2018 06:43:37 +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=ZtPDGGZUyq1DQnO10FHxnzd3FwqrUjz59+RzerIH0Vs=; b=Hpp ypQwVO3gFeDA8rp40qEIT1juCE44rTQBXhKCi9B2sd+KFFc2LWeil3ZVKBmYXqJegpshrLfSXr3t7 BYXepXe3vDc7arxzIcyg0uIaXU/cuoFGN8VBMpmhAR7nTb+GuS+Tot5C0iYerO2yADlgu8M9bDeWD XJkQb0QZ5ZL/+bk8LxXL6KXshQJenPoH0Ud0rJj/vN798t46Gc0GSnJyuzxWrjqd73bE+CWTWyFyG UW6H8dOiXfzshl0wgQr5HyjwlEbG04yJAnDZMGauQuC7VtqOlP0iTEBE7H79U8ZSyxCIO3hgsHfkT 2x47ySB8Xqm3EjsRmoiUukzXQtpeBlQ==; 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 1fx53k-0008OL-Kq; Tue, 04 Sep 2018 06:43:32 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fx53d-0008LS-Dq for ath10k@lists.infradead.org; Tue, 04 Sep 2018 06:43:27 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9177C6034F; Tue, 4 Sep 2018 06:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536043393; bh=RGMw3VD6GEOqkGSjkkQMqALAPaVhApJOcqIAozWk7+0=; h=From:To:Cc:Subject:Date:From; b=AtCYyMvGDwnK5JA9VlpZ5jjGdNOY3lRxf5gRlCwq6rUpF/YQxn9Lt3UPktRrB5xxN wu7ygOPpWJHIp7etCJlD4kHRPMhZf64i74Gi9LFRlMT6HTi5pWhg+LUfw6TpBkKKzF xEb6TfA8nC+ILFnUdoO1nfECoOZgrxwUvG1EPi7g= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: akolli@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A54096044E; Tue, 4 Sep 2018 06:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536043392; bh=RGMw3VD6GEOqkGSjkkQMqALAPaVhApJOcqIAozWk7+0=; h=From:To:Cc:Subject:Date:From; b=bdmaiEM0z8PIpxmyfMzoX732LehwrE2ZthtXiwCLi3Mb8IlZ7fp021kUOhwdLIfk2 aWk4diYaUDr3zczPWO5QttZ2nFQTNhemBNypp2+BwUoKTW8uAYKnxs/3hwPpi6xsgo AwuSuNMnH2hVYp5SHqsPmF0qj7VbgfwWfRZWFPAo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A54096044E 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=akolli@codeaurora.org From: akolli@codeaurora.org To: ath10k@lists.infradead.org Subject: [PATCHv2 0/4] Add support to dump tx stats histogram Date: Tue, 4 Sep 2018 12:15:12 +0530 Message-Id: <1536043516-12462-1-git-send-email-akolli@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180903_234325_554686_9C9C3CFF X-CRM114-Status: UNSURE ( 7.14 ) 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: Anilkumar Kolli , 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 From: Anilkumar Kolli This patch series adds support to dump per station tx stats histogram. These stats can be enabled through ath10k/enable_extd_tx_stats debugfs entry, enabling this may impact in cpu usage and throughput. ath10k/enable_extd_tx_stats is disabled by default. Tx histogram has Per station tx stats which includes, - pkts/bytes transmitted at all possible rates(mcs/nss/bw/gi). - ACK fails count - ampdu bytes/pkts transmitted at all possible rates(mcs/nss/bw/gi). - BA fails count - tx duration Tested on QCA9984/QCA4019/QCA988x Firmware: 10.4-3.5.3-00057 10.2.4-1.0-00037 Example output format: # cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/stations/8c\: fd\:f0\:0a\:8c\:14/tx_stats succ_pkts VHT MCS packets 0 0 0 0 0 138 26 18 23 38747 HT MCS packets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW packets (20,40,80,160 MHz) 41 337 38574 0 NSS packets (1x1,2x2,3x3,4x4) 38952 0 0 0 GI packets (LGI,SGI) 38 38914 legacy rate packets (1,2 ... Mbps) 0 0 0 0 68 0 0 0 0 0 0 0 succ_bytes VHT MCS bytes 0 0 0 0 0 16407 3288 2360 2703 4651892 HT MCS bytes 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW bytes (20,40,80,160 MHz) 5163 40962 4630525 0 NSS bytes (1x1,2x2,3x3,4x4) 4676650 0 0 0 GI bytes (LGI,SGI) 4471 4672179 legacy rate bytes (1,2 ... Mbps) 0 0 0 0 3270 0 0 0 0 0 0 0 ampdu_pkts VHT MCS packets 0 0 0 8 20 7872 34 21 33 39730 HT MCS packets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW packets (20,40,80,160 MHz) 72 567 47079 0 NSS packets (1x1,2x2,3x3,4x4) 40035 7683 0 0 GI packets (LGI,SGI) 7698 40020 legacy rate packets (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 ampdu_bytes VHT MCS bytes 0 0 0 896 2579 941417 4222 2666 3857 4774284 HT MCS bytes 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW bytes (20,40,80,160 MHz) 9262 70052 5650607 0 NSS bytes (1x1,2x2,3x3,4x4) 4811265 918656 0 0 GI bytes (LGI,SGI) 920650 4809271 legacy rate bytes (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 fail_pkts VHT MCS packets 0 0 0 0 0 0 0 0 0 0 HT MCS packets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW packets (20,40,80,160 MHz) 0 0 0 0 NSS packets (1x1,2x2,3x3,4x4) 0 0 0 0 GI packets (LGI,SGI) 0 0 legacy rate packets (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 fail_bytes VHT MCS bytes 0 0 0 0 0 0 0 0 0 0 HT MCS bytes 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW bytes (20,40,80,160 MHz) 0 0 0 0 NSS bytes (1x1,2x2,3x3,4x4) 0 0 0 0 GI bytes (LGI,SGI) 0 0 legacy rate bytes (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 retry_pkts VHT MCS packets 0 0 0 8 20 7734 8 3 10 983 HT MCS packets 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW packets (20,40,80,160 MHz) 31 230 8505 0 NSS packets (1x1,2x2,3x3,4x4) 1083 7683 0 0 GI packets (LGI,SGI) 7660 1106 legacy rate packets (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 retry_bytes VHT MCS bytes 0 0 0 896 2579 925010 934 306 1154 122392 HT MCS bytes 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BW bytes (20,40,80,160 MHz) 4099 29090 1020082 0 NSS bytes (1x1,2x2,3x3,4x4) 134615 918656 0 0 GI bytes (LGI,SGI) 916179 137092 legacy rate bytes (1,2 ... Mbps) 0 0 0 0 0 0 0 0 0 0 0 0 TX duration 6639098 usecs BA fails 8610 ack fails 0 Anilkumar Kolli (4): ath10k: get the legacy rate index to update the txrate table ath10k: add debugfs entry to enable extended tx stats ath10k: add extended per sta tx statistics support ath10k: add debugfs support to dump per sta tx stats drivers/net/wireless/ath/ath10k/core.h | 32 ++++++ drivers/net/wireless/ath/ath10k/debug.c | 62 +++++++++++- drivers/net/wireless/ath/ath10k/debug.h | 9 ++ drivers/net/wireless/ath/ath10k/debugfs_sta.c | 101 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/htt_rx.c | 133 ++++++++++++++++++++++--- drivers/net/wireless/ath/ath10k/mac.c | 10 ++ drivers/net/wireless/ath/ath10k/wmi.h | 13 ++- 7 files changed, 341 insertions(+), 19 deletions(-)