]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: add support for per-port vlan stats
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 12 Oct 2018 10:41:16 +0000 (13:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Oct 2018 17:18:58 +0000 (10:18 -0700)
commitd16db5fb04b87d7f06b6ad14a3e91f16a82e4cca
tree29e5963bf0c717041926c19dc71eed46b09b4ba0
parente93db88dff4d8052e70872515562aa8102671b2a
net: bridge: add support for per-port vlan stats

This patch adds an option to have per-port vlan stats instead of the
default global stats. The option can be set only when there are no port
vlans in the bridge since we need to allocate the stats if it is set
when vlans are being added to ports (and respectively free them
when being deleted). Also bump RTNL_MAX_TYPE as the bridge is the
largest user of options. The current stats design allows us to add
these without any changes to the fast-path, it all comes down to
the per-vlan stats pointer which, if this option is enabled, will
be allocated for each port vlan instead of using the global bridge-wide
one.

CC: bridge@lists.linux-foundation.org
CC: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_link.h
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_sysfs_br.c
net/bridge/br_vlan.c
net/core/rtnetlink.c