From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
linux-wireless@vger.kernel.org, linville@tuxdriver.com,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Subject: Re: [PATCH 2/2] mac80211: add support for mcs masks
Date: Wed, 4 Jan 2012 17:51:44 +0100 [thread overview]
Message-ID: <20120104165144.GA3381@pandem0nium> (raw)
In-Reply-To: <1325600690.3316.12.camel@jlt3.sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 2279 bytes --]
Hello Johannes,
thanks for all the comments, I can agree to all points you made in this mail
and for the other one and will provide a PATCHv2 which should fix this.
One issue is left which I'd like to discuss, please see below.
On Tue, Jan 03, 2012 at 03:24:50PM +0100, Johannes Berg wrote:
> > @@ -358,10 +462,14 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
> > * the common case.
> > */
> > mask = sdata->rc_rateidx_mask[info->band];
> > + memcpy(mcs_mask, sdata->rc_rateidx_mcs_mask[info->band],
> > + sizeof(mcs_mask));
>
> Do we really have to do this? Might not a pointer be better?
>
> > if (mask != (1 << txrc->sband->n_bitrates) - 1) {
> > if (sta) {
> > /* Filter out rates that the STA does not support */
> > mask &= sta->sta.supp_rates[info->band];
> > + for (i = 0; i < sizeof(mcs_mask); i++)
> > + mcs_mask[i] &= sta->sta.ht_cap.mcs.rx_mask[i];
>
> Oh, so it's filtered by station ... hm ok I guess unless we tie
> lifetimes together we have to do this.
>
> Maybe we could update all stations in the slow-path (changes in the HT
> mask) and then just use the already masked version in the sta entry in
> the fastpath here?
You are right that this definitly adds some load on the fastpath (Although
I don't know how much the compiler optimizes here anyway, its only 10 bytes
which are set and masked).
Currently I see two approaches here:
1.) move the masking into the station handling code (when a new station joins).
We would also need to iterate over the connected station when changing
the mcs_mask while the interface is up.
--> this will probably need to change at quite some palces and might be race-risky
2.) keep the masking in the rate_control_get_rate() function, but mask only
once (first time) and keep the result in the station struct. Next time we
enter it, we use the already masked result. We could then use a flag to
remember that we already computed the mask and just use it, and another
flag to signalize if the mcs_mask was modified externally
--> this is not racy and rather simple, but adds some flags
Maybe you have an even better idea, please let me know what you think. :)
Cheers,
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-01-04 16:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 14:14 [PATCH 0/2] add support for mcs masks Simon Wunderlich
2011-12-19 14:14 ` [PATCH 1/2] nl80211: " Simon Wunderlich
2011-12-19 15:28 ` Ben Greear
2011-12-19 21:14 ` Simon Wunderlich
2011-12-20 15:03 ` Ben Greear
2012-01-03 14:20 ` Johannes Berg
2011-12-19 14:14 ` [PATCH 2/2] mac80211: " Simon Wunderlich
2012-01-03 14:24 ` Johannes Berg
2012-01-04 16:51 ` Simon Wunderlich [this message]
2012-01-04 17:01 ` Johannes Berg
2011-12-19 14:14 ` [PATCH 1/2] iw: add nl80211 bitrates Simon Wunderlich
2011-12-19 14:14 ` [PATCH 2/2] iw: remove ifdefs for mcs mask Simon Wunderlich
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=20120104165144.GA3381@pandem0nium \
--to=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=siwu@hrz.tu-chemnitz.de \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox