* [PATCH] mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
@ 2009-11-14 2:29 Felix Fietkau
2009-11-14 9:23 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2009-11-14 2:29 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, John W. Linville
In order to handle association and authentication in AP mode,
hostapd needs access to the tx status info of its own frames
through a cooked monitor interface. Without this patch the
cooked monitor interfaces also passed on tx status information
for packets from other virtual interfaces. This creates a
significant performance issue on embedded system. Hostapd
tries to work around this by installing a Linux Socket Filter
that only captures the frames it's interested in, however
data duplication and socket filter matching still uses up
enough CPU cycles to be very noticeable on small systems.
This patch ensures that tx status information of non-injected
frames does not make it to cooked monitor interfaces.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -587,6 +587,11 @@ void ieee80211_tx_status(struct ieee8021
if (!netif_running(sdata->dev))
continue;
+ if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) &&
+ !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
+ (type == IEEE80211_FTYPE_DATA))
+ continue;
+
if (prev_dev) {
skb2 = skb_clone(skb, GFP_ATOMIC);
if (skb2) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
2009-11-14 2:29 [PATCH] mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces Felix Fietkau
@ 2009-11-14 9:23 ` Johannes Berg
2009-11-14 9:36 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-11-14 9:23 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, John W. Linville
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
On Sat, 2009-11-14 at 03:29 +0100, Felix Fietkau wrote:
> In order to handle association and authentication in AP mode,
> hostapd needs access to the tx status info of its own frames
> through a cooked monitor interface. Without this patch the
> cooked monitor interfaces also passed on tx status information
> for packets from other virtual interfaces. This creates a
> significant performance issue on embedded system. Hostapd
> tries to work around this by installing a Linux Socket Filter
> that only captures the frames it's interested in, however
> data duplication and socket filter matching still uses up
> enough CPU cycles to be very noticeable on small systems.
> This patch ensures that tx status information of non-injected
> frames does not make it to cooked monitor interfaces.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> + if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) &&
> + !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
> + (type == IEEE80211_FTYPE_DATA))
> + continue;
> +
This patch also breaks IEEE 802.11 compliance. :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
2009-11-14 9:23 ` Johannes Berg
@ 2009-11-14 9:36 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2009-11-14 9:36 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, John W. Linville
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
On Sat, 2009-11-14 at 10:23 +0100, Johannes Berg wrote:
> > + if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) &&
> > + !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
> > + (type == IEEE80211_FTYPE_DATA))
> > + continue;
> > +
>
> This patch also breaks IEEE 802.11 compliance. :)
Oh no, it doesn't, wrong code path.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-14 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-14 2:29 [PATCH] mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces Felix Fietkau
2009-11-14 9:23 ` Johannes Berg
2009-11-14 9:36 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox