]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: bridge: add bitfield for options and convert vlan opts
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 26 Jul 2019 00:20:00 +0000 (02:20 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commit33c3933abd36fef5b1da29b7ac95246deecdfbc1
tree6c8ff94924f25278a4491d1fab447aa6a80fea28
parent1475a1b528581c0bf4e8b3ad1fc4a0b4dd4f6182
net: bridge: add bitfield for options and convert vlan opts

BugLink: https://bugs.launchpad.net/bugs/1836910
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>
(cherry picked from commit ae75767ec206c6f445973e5e6c5af8a865016e15)
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
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