Re: [RFC 3/3] mac80211: support bpf monitor filter

2017-04-12 Thread Johannes Berg
> @@ -551,6 +551,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t > priv_data_len, >      NL80211_FEATURE_FULL_AP_CLIENT_STATE; >   wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_STA); >   > + if (IS_ENABLED(CONFIG_BPF_WIFIMON)) > + wiphy_ext_fe

Re: [RFC 3/3] mac80211: support bpf monitor filter

2017-04-12 Thread Johannes Berg
On Wed, 2017-04-12 at 11:22 -0400, David Miller wrote: > From: Johannes Berg > Date: Wed, 12 Apr 2017 16:29:07 +0200 > > > On Wed, 2017-04-12 at 13:07 +0200, Johannes Berg wrote: > >>  > >>  struct ieee80211_if_mntr { > >>  u32 flags; > >>  > > [...] > > + bool deliver; > >  > > That's ..

Re: [RFC 3/3] mac80211: support bpf monitor filter

2017-04-12 Thread David Miller
From: Johannes Berg Date: Wed, 12 Apr 2017 16:29:07 +0200 > On Wed, 2017-04-12 at 13:07 +0200, Johannes Berg wrote: >> >>  struct ieee80211_if_mntr { >>  u32 flags; >> > [...] > + bool deliver; > > That's ... broken for multi-queue RX. I haven't really found a good > other way to do it

Re: [RFC 3/3] mac80211: support bpf monitor filter

2017-04-12 Thread Johannes Berg
On Wed, 2017-04-12 at 13:07 +0200, Johannes Berg wrote: > >  struct ieee80211_if_mntr { >   u32 flags; > [...] + bool deliver; That's ... broken for multi-queue RX. I haven't really found a good other way to do it. The best way will likely be to copy the SKB the first time it's needed,

[RFC 3/3] mac80211: support bpf monitor filter

2017-04-12 Thread Johannes Berg
From: Johannes Berg Add the necessary hooks for running monitor filter programs in mac80211's RX path, before a frame is handed off to a monitor interface. If the frame isn't accepted then this will save the overhead of creating a new SKB and building the radiotap header. Signed-off-by: Johannes