All of lore.kernel.org
 help / color / mirror / Atom feed
From: Toshiaki Makita <toshiaki.makita1@gmail.com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	netdev@vger.kernel.org
Cc: vyasevich@gmail.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net
Subject: Re: [Bridge] [PATCH net-next] bridge: vlan: flush the dynamically learned entries on port vlan delete
Date: Wed, 24 Jun 2015 00:02:33 +0900	[thread overview]
Message-ID: <55897509.8010205@gmail.com> (raw)
In-Reply-To: <1435062496-14596-1-git-send-email-nikolay@cumulusnetworks.com>

On 15/06/23 (火) 21:28, Nikolay Aleksandrov wrote:
> Add a new argument to br_fdb_delete_by_port which allows to specify a
> vid to match when flushing entries and use it in nbp_vlan_delete() to
> flush the dynamically learned entries of the vlan/port pair when removing
> a vlan from a port. Before this patch only the local mac was being
> removed and the dynamically learned ones were left to expire.
> Note that the do_all argument is still respected and if specified, the
> vid will be ignored.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> ---
> note: There are 2 warnings, the C99 comment was already there and the 81
>        char line is the prototype and I think it looks better this way.
>        One unclear thing is about vid 0, I see that it can be passed to
>        nbp_vlan_(add|delete) although the comment says it shouldn't.

nbp_vlan_add() should not be called with vid 0 because vid 0 of fdb
entries is internally used when vlan_filtering is disabled, and such
entries are exposed to userspace as those without any vlan id.
bridge's vlan_filtering is respecting 802.1Q-2011 spec, which says vid 0
cannot be used as a normal vlan id.
If vlan 0 can be added, it should be a bug.

Toshiaki Makita

WARNING: multiple messages have this Message-ID (diff)
From: Toshiaki Makita <toshiaki.makita1@gmail.com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	netdev@vger.kernel.org
Cc: vyasevich@gmail.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net
Subject: Re: [PATCH net-next] bridge: vlan: flush the dynamically learned entries on port vlan delete
Date: Wed, 24 Jun 2015 00:02:33 +0900	[thread overview]
Message-ID: <55897509.8010205@gmail.com> (raw)
In-Reply-To: <1435062496-14596-1-git-send-email-nikolay@cumulusnetworks.com>

On 15/06/23 (火) 21:28, Nikolay Aleksandrov wrote:
> Add a new argument to br_fdb_delete_by_port which allows to specify a
> vid to match when flushing entries and use it in nbp_vlan_delete() to
> flush the dynamically learned entries of the vlan/port pair when removing
> a vlan from a port. Before this patch only the local mac was being
> removed and the dynamically learned ones were left to expire.
> Note that the do_all argument is still respected and if specified, the
> vid will be ignored.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> ---
> note: There are 2 warnings, the C99 comment was already there and the 81
>        char line is the prototype and I think it looks better this way.
>        One unclear thing is about vid 0, I see that it can be passed to
>        nbp_vlan_(add|delete) although the comment says it shouldn't.

nbp_vlan_add() should not be called with vid 0 because vid 0 of fdb
entries is internally used when vlan_filtering is disabled, and such
entries are exposed to userspace as those without any vlan id.
bridge's vlan_filtering is respecting 802.1Q-2011 spec, which says vid 0
cannot be used as a normal vlan id.
If vlan 0 can be added, it should be a bug.

Toshiaki Makita

  reply	other threads:[~2015-06-23 15:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 12:28 [Bridge] [PATCH net-next] bridge: vlan: flush the dynamically learned entries on port vlan delete Nikolay Aleksandrov
2015-06-23 12:28 ` Nikolay Aleksandrov
2015-06-23 15:02 ` Toshiaki Makita [this message]
2015-06-23 15:02   ` Toshiaki Makita
2015-06-23 15:16   ` [Bridge] " Nikolay Aleksandrov
2015-06-23 15:16     ` Nikolay Aleksandrov
2015-06-30 13:50 ` [Bridge] " Vlad Yasevich
2015-06-30 13:50   ` Vlad Yasevich

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=55897509.8010205@gmail.com \
    --to=toshiaki.makita1@gmail.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.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 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.