]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: add bitfield for options and convert vlan opts
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Wed, 26 Sep 2018 14:01:00 +0000 (17:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 17:04:22 +0000 (10:04 -0700)
commit3b793e498a8e380d6bcf6951758cba5c10af10b0
tree57826657093c9e7ddbbef377cf6e98fab0d5c5ef
parent34a8d8718beeb1e5252eaa9f5ab358873c8f1a9e
net: bridge: add bitfield for options and convert vlan opts

Bridge options have usually been added as separate fields all over the
net_bridge struct taking up space and ending up in different cache lines.
Let's move them to a single bitfield to save up space and speedup lookups.
This patch adds a simple API for option modifying and retrieving using
bitops and converts the first user of the API - the bridge vlan options
(vlan_enabled and vlan_stats_enabled).

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br.c
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_sysfs_br.c
net/bridge/br_vlan.c