提交 61ba1a2d 编写于 作者: N Nikolay Aleksandrov 提交者: David S. Miller

net: bridge: export vlan flags with the stats

Use one of the vlan xstats padding fields to export the vlan flags. This is
needed in order to be able to distinguish between master (bridge) and port
vlan entries in user-space when dumping the bridge vlan stats.
Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d5ff8c41
...@@ -140,7 +140,7 @@ struct bridge_vlan_xstats { ...@@ -140,7 +140,7 @@ struct bridge_vlan_xstats {
__u64 tx_bytes; __u64 tx_bytes;
__u64 tx_packets; __u64 tx_packets;
__u16 vid; __u16 vid;
__u16 pad1; __u16 flags;
__u32 pad2; __u32 pad2;
}; };
......
...@@ -1321,6 +1321,7 @@ static int br_fill_linkxstats(struct sk_buff *skb, ...@@ -1321,6 +1321,7 @@ static int br_fill_linkxstats(struct sk_buff *skb,
continue; continue;
memset(&vxi, 0, sizeof(vxi)); memset(&vxi, 0, sizeof(vxi));
vxi.vid = v->vid; vxi.vid = v->vid;
vxi.flags = v->flags;
br_vlan_get_stats(v, &stats); br_vlan_get_stats(v, &stats);
vxi.rx_bytes = stats.rx_bytes; vxi.rx_bytes = stats.rx_bytes;
vxi.rx_packets = stats.rx_packets; vxi.rx_packets = stats.rx_packets;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册