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
140140 __u64 tx_bytes;
141141 __u64 tx_packets;
142142 __u16 vid;
143− __u16 pad1;
143+ __u16 flags;
144144 __u32 pad2;
145145 };
146146
net/bridge/br_netlink.c+1−0
@@ -1321,6 +1321,7 @@ static int br_fill_linkxstats(struct sk_buff *skb, · 1320 unmodified lines
13211321 continue;
13221322 memset(&vxi, 0, sizeof(vxi));
13231323 vxi.vid = v->vid;
1324+ vxi.flags = v->flags;
13241325 br_vlan_get_stats(v, &stats);
13251326 vxi.rx_bytes = stats.rx_bytes;
13261327 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