From: Jiri Pirko <jiri@resnulli.us>
To: Vladislav Yasevich <vyasevich@gmail.com>
Cc: netdev@vger.kernel.org, jpirko@redhat.com, vfalico@gmail.com,
Vladislav Yasevich <vyasevic@redhat.com>
Subject: Re: [PATCH] core: Correct an over-stringent device loop detection.
Date: Sun, 3 May 2015 19:46:32 +0200 [thread overview]
Message-ID: <20150503174632.GA2438@nanopsycho> (raw)
In-Reply-To: <1430616824-9006-1-git-send-email-vyasevic@redhat.com>
Sun, May 03, 2015 at 03:33:44AM CEST, vyasevich@gmail.com wrote:
>The code in __netdev_upper_dev_link() has an over-stringent
>loop detection logic that actually prevents valid configurations
>from working correctly.
>
>In particular, the logic returns an error if an upper device
>is already in the list of all upper devices for a given dev.
>This particular check seems to be a overzealous as it disallows
>perfectly valid configurations. For example:
> # ip l a link eth0 name eth0.10 type vlan id 10
> # ip l a dev br0 typ bridge
> # ip l s eth0.10 master br0
> # ip l s eth0 master br0 <--- Will fail
>
>If you switch the last two commands (add eth0 first), then both
>will succeed. If after that, you remove eth0 and try to re-add
>it, it will fail!
>
>It appears to be enough to simply check adj_list to keeps things
>safe.
>
>I've tried stacking multiple devices multiple times in all different
>combinations, and either rx_handler registration prevented the stacking
>of the device linking cought the error.
>
>Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
next prev parent reply other threads:[~2015-05-03 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 1:33 [PATCH] core: Correct an over-stringent device loop detection Vladislav Yasevich
2015-05-03 17:46 ` Jiri Pirko [this message]
2015-05-03 18:07 ` Veaceslav Falico
2015-05-04 18:58 ` David Miller
2015-05-04 19:55 ` Vlad Yasevich
2015-05-04 20:22 ` David Miller
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=20150503174632.GA2438@nanopsycho \
--to=jiri@resnulli.us \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=vyasevic@redhat.com \
--cc=vyasevich@gmail.com \
/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).