From: Johannes Berg <johannes@sipsolutions.net> To: Thiraviyam Mariyappan <tmariyap@codeaurora.org>, ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: Re: [PATCHv2] mac80211: increment rx stats according to USES_RSS flag Date: Thu, 08 Apr 2021 12:01:26 +0200 [thread overview] Message-ID: <c0aef41d2ecf09188de372fe4f7d6b1954e54e07.camel@sipsolutions.net> (raw) In-Reply-To: <1613563010-1489-1-git-send-email-tmariyap@codeaurora.org> (sfid-20210217_125904_154301_738B3086) On Wed, 2021-02-17 at 17:26 +0530, Thiraviyam Mariyappan wrote: > Currently, rx_stats were updated regardless of USES_RSS flag is > enabled/disabled. So, updating the rx_stats from percpu pointers > according to the USES_RSS flag. OK actually, I'm not going to fix the commit log, you'll probably have to resend it anyway. > @@ -425,7 +426,8 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, > &basic_rates); > spin_lock_bh(&sta->mesh->plink_lock); > - sta->rx_stats.last_rx = jiffies; > + stats = ieee80211_get_rx_stats(&local->hw, sta); > + stats->last_rx = jiffies; This doesn't really make much sense? Not sure why that is even updating anything at all, it doesn't update anything else? Or at least you didn't change anything else, maybe you should have? > > @@ -1734,49 +1745,49 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) > * something went wrong the first time. > */ > if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { > - u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, > + u8 *bssid = ieee80211_get_bssid(hdr, skb->len, That seems unrelated. > @@ -3625,8 +3648,10 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) > /* queue up frame and kick off work to process it */ > skb_queue_tail(&sdata->skb_queue, rx->skb); > ieee80211_queue_work(&rx->local->hw, &sdata->work); > - if (rx->sta) > - rx->sta->rx_stats.packets++; > + if (rx->sta) { > + stats = ieee80211_get_rx_stats(&rx->sdata->local->hw, rx->sta); > + stats->packets++; > + } > Picking this for no particular reason - everything else in this patch is unnecessary since we have rx_path_lock held afaict, so it doesn't matter. The whole per-cpu status stuff only matters once you get into fast-rx path. I'd argue that had you written a proper commit log that actually says why you need to change things, you'd probably even have noticed these issues yourself. johannes
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net> To: Thiraviyam Mariyappan <tmariyap@codeaurora.org>, ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: Re: [PATCHv2] mac80211: increment rx stats according to USES_RSS flag Date: Thu, 08 Apr 2021 12:01:26 +0200 [thread overview] Message-ID: <c0aef41d2ecf09188de372fe4f7d6b1954e54e07.camel@sipsolutions.net> (raw) In-Reply-To: <1613563010-1489-1-git-send-email-tmariyap@codeaurora.org> (sfid-20210217_125904_154301_738B3086) On Wed, 2021-02-17 at 17:26 +0530, Thiraviyam Mariyappan wrote: > Currently, rx_stats were updated regardless of USES_RSS flag is > enabled/disabled. So, updating the rx_stats from percpu pointers > according to the USES_RSS flag. OK actually, I'm not going to fix the commit log, you'll probably have to resend it anyway. > @@ -425,7 +426,8 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, > &basic_rates); > spin_lock_bh(&sta->mesh->plink_lock); > - sta->rx_stats.last_rx = jiffies; > + stats = ieee80211_get_rx_stats(&local->hw, sta); > + stats->last_rx = jiffies; This doesn't really make much sense? Not sure why that is even updating anything at all, it doesn't update anything else? Or at least you didn't change anything else, maybe you should have? > > @@ -1734,49 +1745,49 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) > * something went wrong the first time. > */ > if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { > - u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, > + u8 *bssid = ieee80211_get_bssid(hdr, skb->len, That seems unrelated. > @@ -3625,8 +3648,10 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) > /* queue up frame and kick off work to process it */ > skb_queue_tail(&sdata->skb_queue, rx->skb); > ieee80211_queue_work(&rx->local->hw, &sdata->work); > - if (rx->sta) > - rx->sta->rx_stats.packets++; > + if (rx->sta) { > + stats = ieee80211_get_rx_stats(&rx->sdata->local->hw, rx->sta); > + stats->packets++; > + } > Picking this for no particular reason - everything else in this patch is unnecessary since we have rx_path_lock held afaict, so it doesn't matter. The whole per-cpu status stuff only matters once you get into fast-rx path. I'd argue that had you written a proper commit log that actually says why you need to change things, you'd probably even have noticed these issues yourself. johannes -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2021-04-08 10:01 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-17 11:56 [PATCHv2] mac80211: increment rx stats according to USES_RSS flag Thiraviyam Mariyappan 2021-02-17 11:56 ` Thiraviyam Mariyappan 2021-04-08 9:39 ` Johannes Berg 2021-04-08 9:39 ` Johannes Berg 2021-04-08 10:01 ` Johannes Berg [this message] 2021-04-08 10:01 ` Johannes Berg 2021-04-21 16:48 ` Thiraviyam Mariyappan 2021-04-21 16:48 ` Thiraviyam Mariyappan 2021-04-23 7:58 ` Johannes Berg 2021-04-23 7:58 ` Johannes Berg 2021-05-06 17:49 ` Thiraviyam Mariyappan 2021-05-06 17:49 ` Thiraviyam Mariyappan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=c0aef41d2ecf09188de372fe4f7d6b1954e54e07.camel@sipsolutions.net \ --to=johannes@sipsolutions.net \ --cc=ath11k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ --cc=tmariyap@codeaurora.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.