From patchwork Wed Feb 28 13:17:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10247509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7959C60365 for ; Wed, 28 Feb 2018 13:18:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65715285EC for ; Wed, 28 Feb 2018 13:18:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59F9F286AD; Wed, 28 Feb 2018 13:18:27 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 AEB4F285EC for ; Wed, 28 Feb 2018 13:18: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To: Date:References: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=hGvPUfLipEY1RxBhFIOsVA2Ixji7ki+OH+rkhN+A/a8=; b=WPx78GA3V9tPbJ QKj0rCUEJ8HiNdylvSVt2UeUnRkWc0ZAXd4xx/Fg7v5kCegKmrhNUyaGW0tEabe2RE/o2wrlfNM3m F07LFuXyKiFdO+w6m9U1p1rpyi4dLaYiq5YQZSQZg2uXzUZQntMApGa5HbISuvvqK3Vh52RLl3opW dX5KfUxqz0eXo/CMhQyPihDu+UXpMaorJqYG6NDSN5CPh7aqbVChB2rOBjHYEVjL+thElszc7SK8G mG4iybLXgHImNq6jCAyA5zVOyBsgqGYqT6ALNkjsBK9P7VzGJgWL33xhzN/pTJ7efTBWAZbkwhrvt Q9xyTW+FgTXnik4VkeTg==; 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 1er1cf-0005m5-HE; Wed, 28 Feb 2018 13:18:17 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1er1c9-0005SG-04 for ath10k@bombadil.infradead.org; Wed, 28 Feb 2018 13:17:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hzfbsLe+ojXD4Bj7s0ZychVqlbmM3jjMpAbrE1DnCaY=; b=kPJKwCdXmJ4HPpuKoBX/8fkA9 rKLe+sUAfZnInXTaEU08k4plAHUWHHa/w4yY/n0EPzXGn/gT+q2+cyfMK4TPnmBk+/8VDrQnbTsm1 KE9Emuu5R0obJG27cLfzg8OIT0QwVZiV2DOLoAyqLGz3Ptvjsj460x/tqcBX21acs7DO97Q2QdHjP uvXNRSR0lwtO9vk4iWBh5c6BAPMFotvF8wbGh7g3tpcPmVAWPDF1oLlnpe17VOheOgMvGKeGKtbQS gohXcGgGkDEy8y/DmeJAyLsxv+d6nKNynAWRawZRVZ3PsQ2GOlFseW94hLrdmXYlmySZhaZNwmOlG UNSnbzynA==; Received: from smtp.codeaurora.org ([198.145.29.96]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1er1c6-0007Fk-11 for ath10k@lists.infradead.org; Wed, 28 Feb 2018 13:17:42 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DC61460265; Wed, 28 Feb 2018 13:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519823847; bh=/qaCJtQLzHKl9rBX51xRa7J17qBOgPfEmxNmVdfV0tU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KEKZVQk2JLJs++weLDSMF0fEnep5Se9zCchr7OWmW7A51npmu97d9ZbRw1qdZ5qKQ sXcY7e8kN+2kWxhFXwvIbOvhQC42KE+vkUCPfEmKagOxOukmehApM/1Im/9u52togb 1jggK4fsD2+iZoVqw4xgESaYINUDMwnQSh/UfOmA= Received: from potku.adurom.net (88-114-240-52.elisa-laajakaista.fi [88.114.240.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9BE51608BF; Wed, 28 Feb 2018 13:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519823846; bh=/qaCJtQLzHKl9rBX51xRa7J17qBOgPfEmxNmVdfV0tU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CXBc3Qa7+2biNzWaeXPVohI+uUPpkiQj8AjIW3723B3xqAcIEmaqi59k7OliMrjcv y/tuVWMaTTES3/9vA3euRL69iS3vj13rBris/YyLWMr8tOjS+wKzqyD3A3iPeN8uHq /x0C8WlIXXPqBA4/foi4YBo3Om/cLCr5emT21D0Q= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9BE51608BF 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=kvalo@codeaurora.org From: Kalle Valo To: Vasanthakumar Thiagarajan Subject: Re: [PATCH] ath10k: Add sta rx packet stats per tid References: <1517400072-9204-1-git-send-email-vthiagar@codeaurora.org> Date: Wed, 28 Feb 2018 15:17:22 +0200 In-Reply-To: <1517400072-9204-1-git-send-email-vthiagar@codeaurora.org> (Vasanthakumar Thiagarajan's message of "Wed, 31 Jan 2018 17:31:12 +0530") Message-ID: <87606hs17h.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180228_081742_193007_7C2EB414 X-CRM114-Status: GOOD ( 16.78 ) 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: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Vasanthakumar Thiagarajan writes: > Added per tid sta counters for the following > > - Total number MSDUs received from firmware > - Number of MSDUs received with errors like decryption, crc, mic ,etc. > - Number of MSDUs dropped in the driver > - A-MPDU/A-MSDU subframe stats > - Number of MSDUS passed to mac80211 > > All stats other than A-MPDU stats are only for received data frames. > A-MPDU stats might have stats for management frames when monitor > interface is active where management frames are notified both in wmi > and HTT interfaces. > > These per tid stats can be enabled with tid bitmask through a debugfs > like below > > echo > /sys/kernel/debug/ieee80211/phyX/ath10k/sta_tid_stats_mask > > tid 16 (tid_bitmask 0x10000) is used for non-qos data/management frames > > The stats are read from > /sys/kernel/debug/ieee80211/phyX/netdev\:wlanX/stations//dump_tid_stats > > Sample output: > > To enable rx stats for tid 0, 5 and 6, > > echo 0x00000061 > /sys/kernel/debug/ieee80211/phy0/ath10k/sta_tid_stats_mask > > cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan15/stations/8c\:fd\:f0\:0a\:8e\:df/dump_tid_stats > > Driver Rx pkt stats per tid, ([tid] count) > ------------------------------------------ > MSDUs from FW [00] 2567 [05] 3178 [06] 1089 > MSDUs unchained [00] 0 [05] 0 [06] 0 > MSDUs locally dropped:chained [00] 0 [05] 0 [06] 0 > MSDUs locally dropped:filtered [00] 0 [05] 0 [06] 0 > MSDUs queued for mac80211 [00] 2567 [05] 3178 [06] 1089 > MSDUs with error:fcs_err [00] 0 [05] 0 [06] 2 > MSDUs with error:tkip_err [00] 0 [05] 0 [06] 0 > MSDUs with error:crypt_err [00] 0 [05] 0 [06] 0 > MSDUs with error:peer_idx_inval [00] 0 [05] 0 [06] 0 > > A-MPDU num subframes upto 10 [00] 2567 [05] 3178 [06] 1087 > A-MPDU num subframes 11-20 [00] 0 [05] 0 [06] 0 > A-MPDU num subframes 21-30 [00] 0 [05] 0 [06] 0 > A-MPDU num subframes 31-40 [00] 0 [05] 0 [06] 0 > A-MPDU num subframes 41-50 [00] 0 [05] 0 [06] 0 > A-MPDU num subframes 51-60 [00] 0 [05] 0 [06] 0 > A-MPDU num subframes >60 [00] 0 [05] 0 [06] 0 > > A-MSDU num subframes 1 [00] 2567 [05] 3178 [06] 1089 > A-MSDU num subframes 2 [00] 0 [05] 0 [06] 0 > A-MSDU num subframes 3 [00] 0 [05] 0 [06] 0 > A-MSDU num subframes 4 [00] 0 [05] 0 [06] 0 > A-MSDU num subframes >4 [00] 0 [05] 0 [06] 0 > > Signed-off-by: Vasanthakumar Thiagarajan This added new ath10k-check warnings, I fixed those in the pending branch: drivers/net/wireless/ath/ath10k/debug.h:203: Alignment should match open parenthesis drivers/net/wireless/ath/ath10k/debug.h:226: Alignment should match open parenthesis drivers/net/wireless/ath/ath10k/debugfs_sta.c:24: Alignment should match open parenthesis drivers/net/wireless/ath/ath10k/debugfs_sta.c:40: Alignment should match open parenthesis drivers/net/wireless/ath/ath10k/debugfs_sta.c:60: Alignment should match open parenthesis Also I fixed the typo "rages" in debug.h. My changes: diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index 306796dcedae..7ebb9b1e7e69 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h @@ -200,9 +200,9 @@ void ath10k_sta_update_rx_tid_stats(struct ath10k *ar, u8 *first_hdr, unsigned long int drop_cnt_filter, unsigned long int queued_msdus); void ath10k_sta_update_rx_tid_stats_ampdu(struct ath10k *ar, - u16 peer_id, u8 tid, - struct htt_rx_indication_mpdu_range *mpdu_ranges, - int num_mpdu_rages); + u16 peer_id, u8 tid, + struct htt_rx_indication_mpdu_range *ranges, + int num_ranges); #else static inline void ath10k_sta_update_rx_duration(struct ath10k *ar, @@ -223,9 +223,9 @@ void ath10k_sta_update_rx_tid_stats(struct ath10k *ar, u8 *first_hdr, static inline void ath10k_sta_update_rx_tid_stats_ampdu(struct ath10k *ar, - u16 peer_id, u8 tid, - struct htt_rx_indication_mpdu_range *mpdu_ranges, - int num_mpdu_rages) + u16 peer_id, u8 tid, + struct htt_rx_indication_mpdu_range *ranges, + int num_ranges) { } #endif /* CONFIG_MAC80211_DEBUGFS */ diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c index c6301324af82..8f688f136c22 100644 --- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c @@ -21,8 +21,8 @@ #include "debug.h" static void ath10k_rx_stats_update_amsdu_subfrm(struct ath10k *ar, - struct ath10k_sta_tid_stats *stats, - u32 msdu_count) + struct ath10k_sta_tid_stats *stats, + u32 msdu_count) { if (msdu_count == 1) stats->rx_pkt_amsdu[ATH10K_AMSDU_SUBFRM_NUM_1]++; @@ -37,8 +37,8 @@ static void ath10k_rx_stats_update_amsdu_subfrm(struct ath10k *ar, } static void ath10k_rx_stats_update_ampdu_subfrm(struct ath10k *ar, - struct ath10k_sta_tid_stats *stats, - u32 mpdu_count) + struct ath10k_sta_tid_stats *stats, + u32 mpdu_count) { if (mpdu_count <= 10) stats->rx_pkt_ampdu[ATH10K_AMPDU_SUBFRM_NUM_10]++; @@ -57,8 +57,8 @@ static void ath10k_rx_stats_update_ampdu_subfrm(struct ath10k *ar, } void ath10k_sta_update_rx_tid_stats_ampdu(struct ath10k *ar, u16 peer_id, u8 tid, - struct htt_rx_indication_mpdu_range *mpdu_ranges, - int num_mpdu_ranges) + struct htt_rx_indication_mpdu_range *ranges, + int num_ranges) { struct ath10k_sta *arsta; struct ath10k_peer *peer; @@ -76,10 +76,10 @@ void ath10k_sta_update_rx_tid_stats_ampdu(struct ath10k *ar, u16 peer_id, u8 tid arsta = (struct ath10k_sta *)peer->sta->drv_priv; - for (i = 0; i < num_mpdu_ranges; i++) + for (i = 0; i < num_ranges; i++) ath10k_rx_stats_update_ampdu_subfrm(ar, &arsta->tid_stats[tid], - mpdu_ranges[i].mpdu_count); + ranges[i].mpdu_count); out: spin_unlock_bh(&ar->data_lock);