All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning
@ 2018-11-24  2:34 ` Nikolay Aleksandrov
  0 siblings, 0 replies; 34+ messages in thread
From: Nikolay Aleksandrov @ 2018-11-24  2:34 UTC (permalink / raw)
  To: netdev; +Cc: roopa, andrew, davem, bridge, Nikolay Aleksandrov

Hi,
This set adds a new bridge option which can control learning from
link-local packets, by default learning is on to be consistent and avoid
breaking users expectations. If the new no_linklocal_learn option is
enabled then the bridge will stop learning from link-local packets.

In order to save space for future boolean options, patch 01 adds a new
bool option API that uses a bitmask to control boolean options. The
bridge is by far the largest netlink attr user and we keep adding simple
boolean options which waste nl attr ids and space. We're not directly
mapping these to the in-kernel bridge flags because some might require
more complex configuration changes (e.g. if we were to add the per port
vlan stats now, it'd require multiple checks before changing value).
Any new bool option needs to be handled by both br_boolopt_toggle and get
in order to be able to retrieve its state later. All such options are
automatically exported via netlink. The behaviour of setting such
options is consistent with netlink option handling when a missing
option is being set (silently ignored), e.g. when a newer iproute2 is used
on older kernel. All supported options are exported via bm's optmask
when dumping the new attribute.

v2: address Andrew Lunn's comments, squash a minor change into patch 01,
    export all supported options via optmask when dumping, add patch 03,
    pass down extack so options can return meaningful errors, add
    WARN_ON on unsupported options (should not happen)

Thanks,
 Nik

Nikolay Aleksandrov (3):
  net: bridge: add support for user-controlled bool options
  net: bridge: add no_linklocal_learn bool option
  net: bridge: export supported boolopts

 include/uapi/linux/if_bridge.h | 21 ++++++++++
 include/uapi/linux/if_link.h   |  1 +
 net/bridge/br.c                | 76 ++++++++++++++++++++++++++++++++++
 net/bridge/br_input.c          |  4 +-
 net/bridge/br_netlink.c        | 17 +++++++-
 net/bridge/br_private.h        |  9 ++++
 net/bridge/br_sysfs_br.c       | 22 ++++++++++
 net/core/rtnetlink.c           |  2 +-
 8 files changed, 149 insertions(+), 3 deletions(-)

-- 
2.17.2

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2018-11-28 10:04 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24  2:34 [PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning Nikolay Aleksandrov
2018-11-24  2:34 ` [Bridge] " Nikolay Aleksandrov
2018-11-24  2:34 ` [PATCH net-next v2 1/3] net: bridge: add support for user-controlled bool options Nikolay Aleksandrov
2018-11-24  2:34   ` [Bridge] " Nikolay Aleksandrov
2018-11-24 16:10   ` Andrew Lunn
2018-11-24 16:10     ` [Bridge] " Andrew Lunn
2018-11-24 16:18     ` nikolay
2018-11-24 16:18       ` [Bridge] " nikolay
2018-11-24 16:25       ` Andrew Lunn
2018-11-24 16:25         ` [Bridge] " Andrew Lunn
2018-11-24 16:46         ` nikolay
2018-11-24 16:46           ` [Bridge] " nikolay
2018-11-25  8:12           ` Nikolay Aleksandrov
2018-11-25  8:12             ` [Bridge] " Nikolay Aleksandrov
2018-11-26 17:39             ` Stephen Hemminger
2018-11-26 17:39               ` [Bridge] " Stephen Hemminger
2018-11-26 17:41               ` Nikolay Aleksandrov
2018-11-26 17:41                 ` [Bridge] " Nikolay Aleksandrov
2018-11-25 15:45   ` Andrew Lunn
2018-11-25 15:45     ` [Bridge] " Andrew Lunn
2018-11-24  2:34 ` [PATCH net-next v2 2/3] net: bridge: add no_linklocal_learn bool option Nikolay Aleksandrov
2018-11-24  2:34   ` [Bridge] " Nikolay Aleksandrov
2018-11-24 16:27   ` Andrew Lunn
2018-11-24 16:27     ` [Bridge] " Andrew Lunn
2018-11-24  2:34 ` [PATCH net-next v2 3/3] net: bridge: export supported boolopts Nikolay Aleksandrov
2018-11-24  2:34   ` [Bridge] " Nikolay Aleksandrov
2018-11-24 16:16   ` Andrew Lunn
2018-11-24 16:16     ` [Bridge] " Andrew Lunn
2018-11-24 16:20     ` nikolay
2018-11-24 16:20       ` [Bridge] " nikolay
2018-11-24 16:26   ` Andrew Lunn
2018-11-24 16:26     ` [Bridge] " Andrew Lunn
2018-11-27 23:04 ` [PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning David Miller
2018-11-27 23:04   ` [Bridge] " David Miller

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.