From: "Ron Rindjunsky" <ron.rindjunsky@intel.com>
To: "Johannes Berg" <johannes@sipsolutions.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
flamingice@sourmilk.net, tomas.winkler@intel.com,
yi.zhu@intel.com
Subject: Re: [PATCH 5/8] mac80211: A-MPDU Rx handling aggregation reordering
Date: Tue, 18 Dec 2007 15:44:50 +0200 [thread overview]
Message-ID: <c85cb4470712180544m682a93b1v9a7a34d2148a770b@mail.gmail.com> (raw)
In-Reply-To: <1197915515.4885.86.camel@johannes.berg>
>
> > struct ieee80211_rx_status {
> > @@ -388,6 +389,7 @@ struct ieee80211_rx_status {
> > int noise;
> > int antenna;
> > int rate;
> > + int ordered;
>
> That's not an int, and it's only used internally. Can we somehow avoid
> putting it into the rx status, have it in the txrx status structure
> instead and give it the proper type (txrx result)? More of a question
> than a suggestion, I'd like to have that but I'm not sure it's doable.
well, i was asking myself this same question, and went to
ieee80211_rx_status as ieee80211_txrx_data derives its data from
ieee80211_rx_status in __ieee80211_rx, so i have no other way to pass
info per sk_buff.
type int was chosen as it is not a bool type (can be
drop/continue/queue) so it can't be fit to flags. i can put it in u8,
but i don't think it will change much, especially if alignment is
involved.
>
> > @@ -1252,6 +1254,20 @@ void ieee80211_sta_stop_rx_BA_session(struct net_device *dev, u8 *ra, u16 tid,
> > ieee80211_send_delba(dev, ra, tid, 0, reason);
> >
> > /* free the reordering buffer */
> > + for (i = 0; i < sta->ampdu_mlme.tid_rx[tid].buf_size; i++) {
> > + if (sta->ampdu_mlme.tid_rx[tid].reorder_buf[i]) {
> > + /* release the reordered frames to stack,
> > + * but drop them there */
> > + memcpy(&status, sta->ampdu_mlme.tid_rx[tid].
> > + reorder_buf[i]->cb, sizeof(status));
> > + status.ordered = TXRX_DROP;
> > + __ieee80211_rx(hw, sta->ampdu_mlme.
> > + tid_rx[tid].reorder_buf[i],
> > + &status);
>
> This is strange. Why are they even passed to __ieee80211_rx?
of course i can get rid from there here, but thought it will be more
systematic and clearer to pass them back to __ieee80211_rx. if you
have any objection to this (efficiency considerations or like) i will
reconsider it.
>
> > +#define SEQ_MODULO 0x1000
> > +#define SEQ_MASK 0xfff
> > +
> > +static inline int seq_less(u16 sq1, u16 sq2)
> > +{
> > + return (((sq1 - sq2) & SEQ_MASK) > (SEQ_MODULO >> 1));
>
> Is it really correct to subtract before masking?
as these values are already "masked" as sequence numbers the answer is yes.
if this is not the case, and somehow we deal internally with sequence
numbers > 4095 this function should be the least to worry about ;-)
>
> > +static inline u16 seq_sub(u16 sq1, u16 sq2)
> > +{
> > + return ((sq1 - sq2) & SEQ_MASK);
> > +}
>
> Same here.
this is modulo arithmetic. looks fine to me.
> And maybe seq_less should use seq_sub and the SEQ_MODULO
> define should be (SEQ_MASK+1)?
>
the fact these 2 #defines are 1 number apart shouldn't confuse. it is
just a more
convenient way for the 802.11 reader (used to sequence number limit)
to look at it. i could have, if i would like, decide that pass
criteria for seq_less is not 2048, but only the closest 200 frames, in
that case i would have give it the value of 200.
> I think I need to take a second look at this patch to even understand
> the problem it solves.
>
no one guarantees you get the frames in the right order... please see
the patch description for such a case.
> johannes
>
>
next prev parent reply other threads:[~2007-12-18 13:44 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 15:57 [PATCH 0/8] mac80211/iwlwifi: integrate IEEE802.11n A-MPDU Rx MLME Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 1/8] mac80211: A-MPDU Rx add low level driver API Ron Rindjunsky
2007-12-17 17:54 ` Johannes Berg
2007-12-17 22:38 ` Johannes Berg
2007-12-18 13:41 ` Ron Rindjunsky
2007-12-18 14:01 ` Johannes Berg
2007-12-17 15:57 ` [PATCH 2/8] mac80211: A-MPDU Rx add MLME structures Ron Rindjunsky
2007-12-17 18:08 ` Johannes Berg
2007-12-18 13:41 ` Ron Rindjunsky
2007-12-18 13:59 ` Johannes Berg
2007-12-18 21:18 ` Johannes Berg
2007-12-19 18:59 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 3/8] mac80211: A-MPDU Rx adding basic functionality Ron Rindjunsky
2007-12-17 18:06 ` Johannes Berg
2007-12-18 13:42 ` Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 4/8] mac80211: A-MPDU Rx MLME data initialization Ron Rindjunsky
2007-12-17 18:09 ` Johannes Berg
2007-12-18 13:43 ` Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 5/8] mac80211: A-MPDU Rx handling aggregation reordering Ron Rindjunsky
2007-12-17 18:18 ` Johannes Berg
2007-12-18 13:44 ` Ron Rindjunsky [this message]
2007-12-18 13:57 ` Johannes Berg
2007-12-19 10:57 ` Rindjunsky, Ron
2007-12-19 15:47 ` Johannes Berg
2007-12-19 16:29 ` Winkler, Tomas
2007-12-19 16:36 ` Johannes Berg
2007-12-20 10:14 ` Johannes Berg
2007-12-20 12:32 ` Ron Rindjunsky
2007-12-20 12:41 ` Johannes Berg
2007-12-20 14:15 ` Ron Rindjunsky
2007-12-23 16:15 ` Ron Rindjunsky
2007-12-23 17:28 ` Johannes Berg
2007-12-23 17:38 ` Ron Rindjunsky
2007-12-23 18:15 ` Johannes Berg
2007-12-17 15:57 ` [PATCH 6/8] mac80211: A-MPDU Rx adding BAR handling capability Ron Rindjunsky
2007-12-17 18:24 ` Johannes Berg
2007-12-18 13:45 ` Ron Rindjunsky
2007-12-18 13:53 ` Johannes Berg
2007-12-19 13:25 ` Rindjunsky, Ron
2007-12-19 15:45 ` Johannes Berg
2007-12-19 18:59 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 7/8] mac80211: A-MPDU Rx handling DELBA requests Ron Rindjunsky
2007-12-17 18:26 ` Johannes Berg
2007-12-18 13:46 ` Ron Rindjunsky
2007-12-18 13:51 ` Johannes Berg
2007-12-19 13:22 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 8/8] iwlwifi: A-MPDU Rx flow enabled Ron Rindjunsky
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=c85cb4470712180544m682a93b1v9a7a34d2148a770b@mail.gmail.com \
--to=ron.rindjunsky@intel.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.com \
--cc=yi.zhu@intel.com \
/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