History

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.

Nikolay Aleksandrov committed 10 years ago

Commit 61ba1a21 parent d5ff8c42 files · +2 −1Browse files

Unified · Split

2 files
  1. include/uapi/linux/if_bridge.h +1 −1
  2. net/bridge/br_netlink.c +1 −0
include/uapi/linux/if_bridge.h+1−1
@@ -140,7 +140,7 @@ struct bridge_vlan_xstats { · 139 unmodified lines
140 __u64 tx_bytes;140 __u64 tx_bytes;
141 __u64 tx_packets;141 __u64 tx_packets;
142 __u16 vid;142 __u16 vid;
143 __u16 pad1;143 __u16 flags;
144 __u32 pad2;144 __u32 pad2;
145};145};
146 146
net/bridge/br_netlink.c+1−0
@@ -1321,6 +1321,7 @@ static int br_fill_linkxstats(struct sk_buff *skb, · 1320 unmodified lines
1321 continue;1321 continue;
1322 memset(&vxi, 0, sizeof(vxi));1322 memset(&vxi, 0, sizeof(vxi));
1323 vxi.vid = v->vid;1323 vxi.vid = v->vid;
1324 vxi.flags = v->flags;
1324 br_vlan_get_stats(v, &stats);1325 br_vlan_get_stats(v, &stats);
1325 vxi.rx_bytes = stats.rx_bytes;1326 vxi.rx_bytes = stats.rx_bytes;
1326 vxi.rx_packets = stats.rx_packets;1327 vxi.rx_packets = stats.rx_packets;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t