--- zzzz-none-000/linux-4.19.183/net/bridge/br_private.h 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/net/bridge/br_private.h 2023-06-28 08:54:21.000000000 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include #define BR_HASH_BITS 8 #define BR_HASH_SIZE (1 << BR_HASH_BITS) @@ -188,6 +189,9 @@ /* write-heavy members should not affect lookups */ unsigned long updated ____cacheline_aligned_in_smp; unsigned long used; +#if defined(CONFIG_BCM_KF_BLOG) && defined(CONFIG_BLOG) + unsigned int blog_fdb_key; +#endif struct rcu_head rcu; }; @@ -334,6 +338,12 @@ bool nf_call_ip6tables; bool nf_call_arptables; #endif +#ifdef CONFIG_AVM_BRIDGE_FLOOD_RATELIMITER + atomic_t avm_flood_credits; + int avm_flood_credits_max; + int avm_flood_credits_recov_rate; + struct timer_list avm_flood_rl_timer; +#endif u16 group_fwd_mask; u16 group_fwd_mask_required; @@ -1061,6 +1071,22 @@ #define br_netfilter_rtable_init(x) #endif +/* br_bcast_rl.c */ +#ifdef CONFIG_AVM_BRIDGE_FLOOD_RATELIMITER +int br_flood_rl_init(void); +void br_flood_rl_fini(void); +void br_flood_rl_setup(struct net_bridge *br); +int br_flood_rl_set_credits(struct net_bridge *br, unsigned long v); +unsigned int br_flood_rl(struct net_bridge *br, + struct sk_buff *skb, + struct net_device *src_dev); +#else +#define br_flood_rl_init() (0) +#define br_flood_rl_fini() do { } while (0) +#define br_flood_rl_setup(br) do { } while (0) +#define br_flood_rl(br, skb, dev) (1) +#endif + /* br_stp.c */ void br_set_state(struct net_bridge_port *p, unsigned int state); struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no);