From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 01/11] netdev: Add a wdev_id based frame watch API
Date: Wed, 23 Oct 2019 21:53:59 -0500 [thread overview]
Message-ID: <35fddec5-0c10-fed0-8e47-10709445f783@gmail.com> (raw)
In-Reply-To: <CAOq732+um_VY=6saqOLxFeTZSyKSBUFjsiqW=YzqSLDLBGBW_A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4213 bytes --]
Hi Andrew,
On 10/23/19 7:59 PM, Andrew Zaborowski wrote:
> Hi Denis,
>
> On Wed, 23 Oct 2019 at 03:32, Denis Kenzior <denkenz@gmail.com> wrote:
>> On 10/22/19 8:04 PM, Andrew Zaborowski wrote:
>>> On Wed, 23 Oct 2019 at 02:23, Denis Kenzior <denkenz@gmail.com> wrote:
>>>> On 10/22/19 6:56 PM, Andrew Zaborowski wrote:
>>>>> On Tue, 22 Oct 2019 at 16:53, Denis Kenzior <denkenz@gmail.com> wrote:
>>>>>> This would allow
>>>>>> us to also track iftype changes and wipe out those frame watches that
>>>>>> are no longer registered with the kernel. And also allow us not to try
>>>>>> and register frame watches that are already live (and bounce with an
>>>>>> -EAGAIN from the kernel).
>>>>>
>>>>> The problem is how we will know what logic is implemented in the
>>>>> running kernel version. We also watch iftype changes inside netdev so
>>>>
>>>> Well, the particular fix from me got backported into every single LTS
>>>> kernel. So we just assume the fix is included. Unless you want to go
>>>> full wpa_s and use a separate socket for each frame watch.
>>>
>>> Ok, so we add a framewatch.c or similar, it'll keep a list of all
>>> registered frame types+prefixes even after our local users have
>>> unregistered from them. It will listen for SET_INTERFACE events and
>>> drop the watches matching the wdev_id from the list.
>>>
>>
>> Yes, something like this. One thing we might want to do is simply have
>> station, adhoc, ap, etc modules simply tell framewatch which events they
>> care about. And framewatch will register to these whenever iftype changes.
>
> I took a look at netdev and ap.c and we don't really have frames that
> we need to be unconditionally listening to. In ap.c we only register
> the watches when starting the AP and in netdev some of the watches
> should be registered for either when we connect, when we send a
> Neighbor Report Request or SA Query Request. So in the end it looks
> like we'll be using the separate socket per set/group everywhere.
Perhaps you're right. Might make sense from a consistency point of view
anyway. So we only implement one way and be done with it. Do note:
there are frames which are protected, (SA Query family for example). So
the kernel would simply never forward them to us if the management
encryption key is not setup. These do not need to be part of a socket
set... There may be others that fit this pattern. So maybe we can
cheat for at least some of these...
For AP, you know more than I. I imagine that AP only needs a single set
for the most part? Can we even receive frames if AP hasn't been started
yet?
>
> Even if we had frames that we cared about for the whole time a
> specific iftype is active, we'd still need the netdev/adhoc/ap modules
> to update the user_data for the callbacks everytime we switch to that
> iftype so it doesn't seem useful to automatically register to any
> frames.
Depends... It can always fire off a callback with just the wdev/ifindex
and let the station/adhoc/ap module figure it out. Yes we'd need to run
a find by ifindex/wdev, but that's not really a big deal in the common case.
> So I take it you're fine with the whole group/set concept being
> limited to the group_id (or set_id) parameter, in the user's view,
> instead of the user having to issue a separate call to create or
> destroy a "set". So I wouldn't add calls like frame_watch_set_new().
>
What I'm a bit worried about is that I'm not sure you're really winning
anything by trying to hide the set behind an id. You probably end up
having to look up the 'set' object every time based on the id, which is
sort of wasteful.
Also, how would one pick IDs anyway? You can't or shouldn't share the
id between different wdevs/netdevs anyway since their lifetimes are
distinct. So you end up trying to have these unique gids which might
as well be proper objects. Also, the set is likely to be setup once and
destroyed when the interface is cleaned up (e.g. on iftype change or
ifdown).
So it wouldn't be the direction I'd go, but if you think it can work I'm
okay with giving that a try.
Regards,
-Denis
next prev parent reply other threads:[~2019-10-24 2:53 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 13:55 [PATCH 01/11] netdev: Add a wdev_id based frame watch API Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 02/11] netdev: Report RSSI to frame watch callbacks Andrew Zaborowski
2019-10-22 3:34 ` Denis Kenzior
2019-10-22 13:46 ` Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 03/11] netdev: Extend checks for P2P scenarios Andrew Zaborowski
2019-10-22 3:36 ` Denis Kenzior
2019-10-21 13:55 ` [PATCH 04/11] eapol: Move the EAP event handler to handshake state Andrew Zaborowski
2019-10-22 4:11 ` Denis Kenzior
2019-10-22 14:00 ` Andrew Zaborowski
2019-10-22 14:34 ` Denis Kenzior
2019-10-21 13:55 ` [PATCH 05/11] unit: Update test-wsc to use handshake_state_set_eap_event_func Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 06/11] wsc: Replace netdev_connect_wsc with netdev_connect usage Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 07/11] netdev: Drop unused netdev_connect_wsc Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 08/11] wsc: Add wsc_new_p2p_enrollee, refactor Andrew Zaborowski
2019-10-22 14:47 ` Denis Kenzior
2019-10-22 23:46 ` Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 09/11] wsc: Accept extra IEs in wsc_new_p2p_enrollee Andrew Zaborowski
2019-10-21 13:55 ` [PATCH 10/11] wiphy: Add wiphy_get_max_roc_duration Andrew Zaborowski
2019-10-22 3:26 ` Denis Kenzior
2019-10-21 13:55 ` [PATCH 11/11] wiphy: Add wiphy_get_supported_rates Andrew Zaborowski
2019-10-22 14:53 ` [PATCH 01/11] netdev: Add a wdev_id based frame watch API Denis Kenzior
2019-10-22 23:56 ` Andrew Zaborowski
2019-10-23 0:23 ` Denis Kenzior
2019-10-23 1:04 ` Andrew Zaborowski
2019-10-23 1:32 ` Denis Kenzior
2019-10-24 0:59 ` Andrew Zaborowski
2019-10-24 2:53 ` Denis Kenzior [this message]
2019-10-24 3:22 ` Andrew Zaborowski
2019-10-24 15:29 ` Denis Kenzior
2019-10-24 21:47 ` Andrew Zaborowski
2019-10-24 22:16 ` Denis Kenzior
2019-10-24 22:45 ` Andrew Zaborowski
2019-10-25 1:27 ` Denis Kenzior
2019-10-25 2:59 ` Andrew Zaborowski
2019-10-25 3:56 ` Denis Kenzior
2019-10-25 4:42 ` Andrew Zaborowski
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=35fddec5-0c10-fed0-8e47-10709445f783@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.