linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5] net/tun: Call netdev notifiers
Date: Mon, 23 Nov 2020 07:18:07 +0100	[thread overview]
Message-ID: <a00d2725bce23f451cd030b9e621a764@dev.tdt.de> (raw)
In-Reply-To: <20201120102827.6b432dc5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 2020-11-20 19:28, Jakub Kicinski wrote:
> On Wed, 18 Nov 2020 07:39:19 +0100 Martin Schiller wrote:
>> Call netdev notifiers before and after changing the device type.
>> 
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> 
> This is a fix, right? Can you give an example of something that goes
> wrong without this patch?

This change is related to my latest patches to the X.25 Subsystem:
https://patchwork.kernel.org/project/netdevbpf/list/?series=388087

I use a tun interface in a XoT (X.25 over TCP) application and use the
TUNSETLINK ioctl to change the device type to ARPHRD_X25.
As the default device type is ARPHRD_NONE the initial NETDEV_REGISTER
event won't be catched by the X.25 Stack.

Therefore I have to use the NETDEV_POST_TYPE_CHANGE to make sure that
the corresponding neighbour structure is created.

I could imagine that other protocols have similar requirements.

Whether this is a fix or a functional extension is hard to say.

Some time ago there was also a corresponding patch for the WAN/HDLC
subsystem:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=2f8364a291e8

  reply	other threads:[~2020-11-23  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  6:39 [PATCH net-next v5] net/tun: Call netdev notifiers Martin Schiller
2020-11-20 18:28 ` Jakub Kicinski
2020-11-23  6:18   ` Martin Schiller [this message]
2020-11-23 18:40     ` Jakub Kicinski

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=a00d2725bce23f451cd030b9e621a764@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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).