mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
f2be6d710d
204 changed files with 1829 additions and 1121 deletions
|
|
@ -102,12 +102,18 @@ struct br_tunnel_info {
|
|||
struct metadata_dst *tunnel_dst;
|
||||
};
|
||||
|
||||
/* private vlan flags */
|
||||
enum {
|
||||
BR_VLFLAG_PER_PORT_STATS = BIT(0),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct net_bridge_vlan - per-vlan entry
|
||||
*
|
||||
* @vnode: rhashtable member
|
||||
* @vid: VLAN id
|
||||
* @flags: bridge vlan flags
|
||||
* @priv_flags: private (in-kernel) bridge vlan flags
|
||||
* @stats: per-cpu VLAN statistics
|
||||
* @br: if MASTER flag set, this points to a bridge struct
|
||||
* @port: if MASTER flag unset, this points to a port struct
|
||||
|
|
@ -127,6 +133,7 @@ struct net_bridge_vlan {
|
|||
struct rhash_head tnode;
|
||||
u16 vid;
|
||||
u16 flags;
|
||||
u16 priv_flags;
|
||||
struct br_vlan_stats __percpu *stats;
|
||||
union {
|
||||
struct net_bridge *br;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void nbp_vlan_rcu_free(struct rcu_head *rcu)
|
|||
v = container_of(rcu, struct net_bridge_vlan, rcu);
|
||||
WARN_ON(br_vlan_is_master(v));
|
||||
/* if we had per-port stats configured then free them here */
|
||||
if (v->brvlan->stats != v->stats)
|
||||
if (v->priv_flags & BR_VLFLAG_PER_PORT_STATS)
|
||||
free_percpu(v->stats);
|
||||
v->stats = NULL;
|
||||
kfree(v);
|
||||
|
|
@ -264,6 +264,7 @@ static int __vlan_add(struct net_bridge_vlan *v, u16 flags)
|
|||
err = -ENOMEM;
|
||||
goto out_filt;
|
||||
}
|
||||
v->priv_flags |= BR_VLFLAG_PER_PORT_STATS;
|
||||
} else {
|
||||
v->stats = masterv->stats;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue