public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Toshiaki Makita <toshiaki.makita1@gmail•com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>,
	Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp>
Cc: netdev@vger•kernel.org, bridge@lists•linux-foundation.org,
	"David S . Miller" <davem@davemloft•net>
Subject: Re: [Bridge] [PATCH net-next] bridge: Add netlink support for vlan_protocol attribute
Date: Fri, 28 Aug 2015 20:06:17 +0900	[thread overview]
Message-ID: <55E040A9.8040707@gmail.com> (raw)
In-Reply-To: <63AC6A69-F9A1-4A83-8EF7-D897243743B4@cumulusnetworks.com>

On 15/08/28 (金) 0:48, Nikolay Aleksandrov wrote:
>
>> On Aug 26, 2015, at 11:00 PM, Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp> wrote:
>>
>> This enables bridge vlan_protocol to be configured through netlink.
>>
>> When CONFIG_BRIDGE_VLAN_FILTERING is disabled, kernel behaves the
>> same way as this feature is not implemented.
>>
>> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp>
>> ---
>> include/uapi/linux/if_link.h |  1 +
>> net/bridge/br_netlink.c      | 34 ++++++++++++++++++++++++++++++++++
>> net/bridge/br_private.h      |  1 +
>> net/bridge/br_vlan.c         | 35 +++++++++++++++++++++--------------
>> 4 files changed, 57 insertions(+), 14 deletions(-)
>>
>
> Nice, looks good. I have a similar patch as well and was going to ask wouldn’t it be
> better to make empty stubs which return an error when vlan filtering isn’t configured
> and drop the ifdefs in the netlink handling code ?
> Similar to how vlan_filtering netlink attribute is handled in commit:
> a7854037da00 ("bridge: netlink: add support for vlan_filtering attribute”)
>
> Potential problem would be the return of the protocol, but I think if 0 is returned that
> can be handled.

This is the exact reason why I didn't implement the stub.
I wanted to avoid to charge userspace with that special casing 0.
Also, this is consistent with sysfs implementation, which doesn't expose 
vlan_* entries when CONFIG_BRIDGE_VLAN_PROTOCOL is disabled.

Toshiaki Makita

  reply	other threads:[~2015-08-28 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27  6:00 [PATCH net-next] bridge: Add netlink support for vlan_protocol attribute Toshiaki Makita
2015-08-27  6:22 ` Toshiaki Makita
2015-08-27 15:48 ` Nikolay Aleksandrov
2015-08-28 11:06   ` Toshiaki Makita [this message]
2015-08-28 15:25     ` 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=55E040A9.8040707@gmail.com \
    --to=toshiaki.makita1@gmail$(echo .)com \
    --cc=bridge@lists$(echo .)linux-foundation.org \
    --cc=davem@davemloft$(echo .)net \
    --cc=makita.toshiaki@lab$(echo .)ntt.co.jp \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nikolay@cumulusnetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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