public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ron Rindjunsky" <rindjon@googlemail.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: Thu, 20 Dec 2007 14:32:52 +0200	[thread overview]
Message-ID: <c85cb4470712200432w3640359dje70f57c86be3497a@mail.gmail.com> (raw)
In-Reply-To: <1198145667.16241.23.camel@johannes.berg>

> > This patch handles the reordering of the Rx A-MPDU.
>
> I thought about this a bit more, here's a counter-proposal. :)
>
> Your current patch means that when a monitor mode interface is up, it
> will receive frames twice because the A-MPDU frames have already passed
> __ieee80211_rx() when they were sent up by the hardware, and that copies
> the frame to the monitor first thing.

true, i forgot monitor is no longer a handle like it used to be, and i
do pass there twice. this can be fixed by checking .ordered field
there

> Also, what you're doing means that
> the frame is accounted for channel load twice (yeah, I know, the stats
> there suck... but still...)

here i am already checking the .ordered field (like i proposed for
monitor), and ignore the in-order frames.

>
> What we'd really want I think is to
>  (1) put the frame to monitor regularly [indicating A-MPDU in the
>     radiotap header, this will need radiotap standard work, so not now]
>  (2) "keep" the frame in the ieee80211_rx_h_reorder_ampdu rx-pre-handler
>  (3) "release" the frame with an appropriate status later
>
> Hence, I think it'd be best to first reorganise the current code:
>  (1) split __ieee80211_rx() right after the pre handler invocation and
>     call e.g. __ieee80211_rx_handlers() which contains all the code
>     from "if (sta && !(sta->flags & (WLAN_STA_WDS | WLAN_STA_ASSOC_AP"
>     to "} else dev_kfree_skb(skb);"
>     The function would have certain requirements like a filled
>     ieee80211_txrx_data and running under rcu_read_lock().
>  (2) then, you don't need status.ordered but can drop the frame right
>     away or pass it to __ieee80211_rx_handlers().
>
> That way, we guarantee that each frame only passes through the complete
> RX path once and your dropping the unordered frames is equivalent to the
> reorder_ampdu handler having an oracle that tells it which frames to

so you suggest to remove ieee80211_rx_h_reorder_ampdu in favor of a
function that will call ieee80211_sta_manage_reorder_buf?
in any case, function or handler, i think it is better to leave this
separation - filtering and reordering -  in 2 different place.

> drop and which to keep :)
>
> Comments?
>

I looked at your proposal, generally it can be done, yet there are
pros and cons we need to consider:
1 - (con) by inserting the .ordered check to ieee80211_rx_monitor or
before it i can avoid changing the code - just 2 more lines and
problem is solved
2 - (pro) yet, i'll end up checking the .ordered field in 3 places -
monitor,statistics and reordering buf, which lowers the encapsulation
of work inside ieee80211_rx_h_reorder_ampdu
3 - (con) i will have to free un-needed sk_buffs in
ieee80211_sta_stop_rx_BA_session without going back to __ieee80211_rx,
 which may confuse othere.
4 - (pro) i'll use less variables (with a little more code, but a clear one)

> johannes
>
>

  reply	other threads:[~2007-12-20 12:32 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
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 [this message]
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=c85cb4470712200432w3640359dje70f57c86be3497a@mail.gmail.com \
    --to=rindjon@googlemail.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