From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org, roopa@cumulusnetworks.com
Subject: Re: [PATCH iproute2 net-next v2] bridge: vlan: add support to display per-vlan statistics
Date: Tue, 21 Jun 2016 20:08:11 +0200 [thread overview]
Message-ID: <5769828B.5080104@cumulusnetworks.com> (raw)
In-Reply-To: <1466532430-29090-1-git-send-email-nikolay@cumulusnetworks.com>
On 21/06/16 20:07, Nikolay Aleksandrov wrote:
> This patch adds support for the stats argument to the bridge
> vlan command which will display the per-vlan statistics and the bridge
> device each vlan belongs to. The supported command filtering options are
> dev and vid. Also the man page is updated to explain the new option.
> This patch uses the new RTM_GETSTATS interface with a filter_mask to dump
> only the bridge vlans. Later we can add support for using the per-device
> dump and filter it in the kernel instead.
>
> Example:
> $ bridge vlan stats
> port vlan id
> br0 1
> RX: 34816114 bytes 495195 packets
> TX: 68501306 bytes 987149 packets
> 100
> RX: 0 bytes 0 packets
> TX: 0 bytes 0 packets
> 200
> RX: 0 bytes 0 packets
> TX: 0 bytes 0 packets
> 300
> RX: 0 bytes 0 packets
> TX: 0 bytes 0 packets
> 301
> RX: 169562135 bytes 790877 packets
> TX: 169550926 bytes 790824 packets
> br1 1
> RX: 0 bytes 0 packets
> TX: 0 bytes 0 packets
>
> Note that it will print the per-vlan statistics for all vlans in a bridge
> even if the vlan is only added to ports. Later when we add per-port
> per-vlan statistics support, we'll be able to print the exact ports each
> vlan belongs to, not only the bridge.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> ---
> v2: Change the output format as per Stephen's comment and change the -s use
> to a subcommand called stats in order to have a different format than show,
> update the man page appropriately.
>
I forgot to add - I also tested this in a small VM window and it fits
well. :-)
Cheers,
Nik
prev parent reply other threads:[~2016-06-21 18:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 10:13 [PATCH iproute2 net-next] bridge: vlan: add support to display per-vlan statistics Nikolay Aleksandrov
2016-06-21 16:01 ` Stephen Hemminger
2016-06-21 16:10 ` Nikolay Aleksandrov
2016-06-21 16:11 ` Nikolay Aleksandrov
2016-07-01 0:06 ` Stephen Hemminger
2016-07-01 9:24 ` Nikolay Aleksandrov
2016-06-21 18:07 ` [PATCH iproute2 net-next v2] " Nikolay Aleksandrov
2016-06-21 18:08 ` Nikolay Aleksandrov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5769828B.5080104@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.