From: Nikolay Aleksandrov <nikolay@redhat.com>
To: netdev@vger.kernel.org
Cc: kaber@trash.net, davem@davemloft.net
Subject: Re: [PATCH] 8021q: fix vlan 0 inconsistencies
Date: Thu, 20 Jun 2013 16:08:34 +0200 [thread overview]
Message-ID: <51C30CE2.5030803@redhat.com> (raw)
In-Reply-To: <1371731078-12531-1-git-send-email-nikolay@redhat.com>
On 06/20/2013 02:24 PM, nikolay@redhat.com wrote:
> From: Nikolay Aleksandrov <nikolay@redhat.com>
>
> The first part of the patch stops the addition of VLAN 0 to bonding
> devices because we use an internal vlan_list to keep the added vlans and
> after that when checking if we're using vlans on the bond
> (bond_vlan_used) it evaluates to true always, which leads to different
> problems. Since this is intended for HW vlan filters, it's not needed
> for the bonding, and for its slaves it will still get added upon
> NETDEV_UP.
> The second part that does unconditional vlan_vid_del is needed because
> when we add vlan 0 to a bonding device, it can never be removed
> completely (it will always stay in the local vlan_list). Since there's
> refcounting, I don't think this will change the behaviour because if a
> real device is UP then vlan 0 will have at least refcnt == 1 so
> ndo_vlan_rx_kill_vid won't get called until the device is down, but in
> the bonding case we need it while the device is up so we can cleanup
> properly after vlan 0 removal.
> As an addition I'd like to say that I tried many different fixes of this
> issue from inside the bonding, but they all have shortcomings and fixing
> the root cause would be much better. For example I can't filter out vlan
> 0 in the bond's ndo_vlan_rx_add_vid because bond_has_this_ip() (and others)
> rely on being able to check the vlan devices on top through the local
> vlan_list. Also there's no way to differentiate between addition of vlan 0
> from vlan_device_event and from register_vlan_dev.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
In fact I think there's a deeper issue with vlan 0 because if you add it to any
device its refcount will only be incremented (unconditional vlan_vid_add in
register_vlan_dev) and never decremented. And this issue is also fixed by this
patch.
Nik
next prev parent reply other threads:[~2013-06-20 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 12:24 [PATCH] 8021q: fix vlan 0 inconsistencies nikolay
2013-06-20 14:08 ` Nikolay Aleksandrov [this message]
2013-06-28 5:27 ` David Miller
2013-06-28 8:20 ` Nikolay Aleksandrov
2013-06-29 11:46 ` Nikolay Aleksandrov
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=51C30CE2.5030803@redhat.com \
--to=nikolay@redhat.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--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 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.