mirror_iproute2/bridge
Nikolay Aleksandrov 7abf5de677 bridge: vlan: add support to display per-vlan statistics
This patch adds support for the stats argument to the bridge
vlan command which will display the per-vlan statistics and the device
each vlan belongs to with its flags. The supported command filtering
options are dev and vid. Also the man page is updated to explain the new
option.
The patch uses the new RTM_GETSTATS interface with a filter_mask to dump
all bridges and ports vlans. Later we can add support for using the
per-device dump and filter it in the kernel instead.

Example:
$ bridge -s vlan show
port             vlan id
br0               1 Egress Untagged
                    RX: 2536 bytes 20 packets
                    TX: 2536 bytes 20 packets
                  101
                    RX: 43158 bytes 50 packets
                    TX: 43158 bytes 50 packets
eth1              1 Egress Untagged
                    RX: 2536 bytes 20 packets
                    TX: 2536 bytes 20 packets
                  100
                    RX: 0 bytes 0 packets
                    TX: 0 bytes 0 packets
                  101
                    RX: 43158 bytes 50 packets
                    TX: 43158 bytes 50 packets
                  102
                    RX: 16897 bytes 93 packets
                    TX: 0 bytes 0 packets

The format is the same as bridge vlan show but with stats, even though
under the hood the calls done to the kernel are different.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2016-08-29 10:58:40 -07:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
br_common.h bridge: add json support for bridge vlan show 2016-07-20 12:02:02 -07:00
bridge.c bridge: add json support for bridge vlan show 2016-07-20 12:02:02 -07:00
fdb.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
link.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
Makefile Make builds default to quiet mode 2016-05-31 12:13:07 -07:00
mdb.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
monitor.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
vlan.c bridge: vlan: add support to display per-vlan statistics 2016-08-29 10:58:40 -07:00