linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 0/5] Improve wireless netdev detection
Date: Fri, 8 Jul 2016 10:22:06 -0500	[thread overview]
Message-ID: <577FC51E.7010901@gmail.com> (raw)
In-Reply-To: <1467973953.4837.3.camel@sipsolutions.net>

Hi Johannes,

On 07/08/2016 05:32 AM, Johannes Berg wrote:
> On Thu, 2016-07-07 at 02:08 -0500, Denis Kenzior wrote:
>> The current mechanism to detect hot-plug / unplug of wireless devices
>> is
>> somewhat arcane.  One has to listen to NEW_WIPHY/DEL_WIPHY events
>> over
>> nl80211 as well as RTM_NEWLINK / RTM_DELLINK events over rtnl, then
>> somehow find a correlation between these events.  This involves
>> userspace
>> sending GET_INTERFACE or GET_WIPHY commands to the kernel, which
>> incurs
>> additional roundtrips.
>>
>> This patch series proposes that NEW_INTERFACE and DEL_INTERFACE
>> events are
>> always emitted, regardless of whether a netdev was added/removed by
>> the
>> driver or explicitly via NEW_INTERFACE/DEL_INTERFACE commands.
>>
>> One side effect of this approach is that multiple
>> NEW_INTERFACE/DEL_INTERFACE
>> events might be generated for P2P interfaces.  Once when a wdev is
>> created
>> or destroyed, and once when the associated p2p netdev is connecte or
>> disconnected.
>
> I think you got some things mixed up. Are you talking of P2P GO/client
> interfaces, which have netdevs, but are really the same as AP/BSS
> client and thus the issue here would affect the others? Or are you
> talking about the P2P-Device wdev? but that has no netdev.

Apologies, I've only been looking at the kernel side for several days, 
so my understanding is still incomplete.

I was looking at mac80211/iface.c: ieee80211_if_add() which seems to 
handle NL80211_IFTYPE_P2P_DEVICE specially by not creating/registering a 
net_device object.  For some reason I thought that this object was 
registered somewhere later, but my understanding was incorrect.  So the 
entire 'side effect' paragraph above does not apply.

Are you okay with the general approach?  Are there any locking issues I 
might be overlooking?

>
>> It is likely that only the caller of P2P oriented
>> NEW_INTERFACE / DEL_INTERFACE commands is interested in the status of
>> these
>> operations.  E.g. the caller is / should be using SOCKET_OWNER
>> attribute.
>> Thus one possibility is to not emit NEW_INTERFACE/DEL_INTERFACE
>> events in
>> such cases.
>>
>
> The breaking up of patches is also confusing. You seem to be
> introducing things in the first, then breaking them again, and then
> fixing them?

Sorry, this was meant to be posted as an RFC.

First patch just introduces a notification utility.  The rest of the 
patches were broken up for ease of review.

>
> Couldn't the whole thing be done in one or maybe two (new/del)
> patch(es)?

Sure, I can squash them together however you like.

>
> (You obviously also need to sign off your patches, see the kernel
> Documentation/)
>

Apologies, still working the kinks out of my environment setup.

Regards,
-Denis


  reply	other threads:[~2016-07-08 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  7:08 [PATCH 0/5] Improve wireless netdev detection Denis Kenzior
2016-07-07  7:08 ` [PATCH 1/5] nl80211: Add nl80211_notify_iface Denis Kenzior
2016-07-07  7:08 ` [PATCH 2/5] core: Notify of new wireless netdevs Denis Kenzior
2016-07-07  7:08 ` [PATCH 3/5] nl80211: Emit NEW_INTERFACE only in special cases Denis Kenzior
2016-07-07  7:08 ` [PATCH 4/5] core: Notify when wireless netdev is removed Denis Kenzior
2016-07-07  7:08 ` [PATCH 5/5] nl80211: Emit DEL_INTERFACE only in special cases Denis Kenzior
2016-07-08 10:32 ` [PATCH 0/5] Improve wireless netdev detection Johannes Berg
2016-07-08 15:22   ` Denis Kenzior [this message]
2016-07-08 15:26     ` Johannes Berg
2016-07-08 15:31       ` Denis Kenzior

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=577FC51E.7010901@gmail.com \
    --to=denkenz@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).