--- zzzz-none-000/linux-2.6.39.4/net/bridge/br_private.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/net/bridge/br_private.h 2021-11-10 13:38:18.000000000 +0000 @@ -9,6 +9,10 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +/* + * Includes Intel Corporation's changes/modifications dated: [11/07/2011]. +* Changed/modified portions - Copyright © [2011], Intel Corporation. +*/ #ifndef _BR_PRIVATE_H #define _BR_PRIVATE_H @@ -47,6 +51,20 @@ unsigned char addr[6]; }; +/* Packet Processor Specific Flags */ +#ifdef CONFIG_TI_PACKET_PROCESSOR + +/* The status of a FDB entry is defaulted to this, indicating that there is no + * PP session activity corresponding to this FDB entry and can be deleted + * as per bridge aging logic. */ +#define TI_PP_FDB_INACTIVE 0x0 + +/* When this flag is set in the status of a FDB entry, it indicates that PP has + * a session active corresponding to it and it should not be deleted although + * "aged out" in the bridge. */ +#define TI_PP_FDB_ACTIVE 0x1 + +#endif //CONFIG_TI_PACKET_PROCESSOR struct br_ip { union { @@ -68,6 +86,19 @@ mac_addr addr; unsigned char is_local; unsigned char is_static; + +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* To maintain and monitor FDB entry to PP session mapping, we store + * the corresponding PP session handle in the FDB entry. */ + int ti_pp_session_handle; + + /* The status indicates whether a corresponding session exists + * in the PP for this FDB entry. The legal values for this flag + * are "TI_PP_FDB_INACTIVE" (default) and "TI_PP_FDB_ACTIVE" + * (set when PP has a mapping for this FDB entry). */ + int ti_pp_fdb_status; +#endif /* CONFIG_TI_PACKET_PROCESSOR */ + }; struct net_bridge_port_group { @@ -133,6 +164,7 @@ unsigned long flags; #define BR_HAIRPIN_MODE 0x00000001 +#define BR_ISOLATED 0x00000010 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING u32 multicast_startup_queries_sent; @@ -174,6 +206,21 @@ struct u64_stats_sync syncp; }; +#ifdef CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING +struct l2_sph +{ + /* Function that handles the packet */ + int (*packet_handler)(struct sk_buff *skb); + /* Priority of the function handler. Handlers installed with lower + * priority number are called before a handler installed with + * a higher priority number + */ + int priority; + struct l2_sph *prev; + struct l2_sph *next; +}; +#endif /* CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING */ + struct net_bridge { spinlock_t lock; @@ -250,6 +297,15 @@ struct timer_list topology_change_timer; struct timer_list gc_timer; struct kobject *ifobj; + + int automatic_mac_disabled; /* AVM */ + +#ifdef CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING + struct l2_sph *selective_packet_handler; +#endif /* CONFIG_TI_L2_SELECTIVE_PACKET_HANDLING */ +#ifdef CONFIG_INTEL_L2VPN_L2CP_FORWARD + int (*l2vpn_packet_handler)(struct sk_buff *skb, int *l2vpnRelate); +#endif /* CONFIG_INTEL_L2VPN_L2CP_FORWARD */ }; struct br_input_skb_cb { @@ -258,6 +314,7 @@ int igmp; int mrouters_only; #endif + bool src_port_isolated; }; #define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb) @@ -355,6 +412,10 @@ struct net_bridge_port *source, const unsigned char *addr); +/* AVM */ +extern void br_fdb_delete_by_mac_if_local_without_port(struct net_bridge *br, unsigned char *addr); + + /* br_forward.c */ extern void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb); @@ -366,6 +427,14 @@ extern void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, struct sk_buff *skb2); +/* return true if both source port and dest port are isolated */ +static inline bool br_skb_isolated(const struct net_bridge_port *to, + const struct sk_buff *skb) +{ + return BR_INPUT_SKB_CB(skb)->src_port_isolated && + (to->flags & BR_ISOLATED); +} + /* br_if.c */ extern void br_port_carrier_check(struct net_bridge_port *p); extern int br_add_bridge(struct net *net, const char *name); @@ -508,6 +577,11 @@ u32 path_cost); extern ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id); +/* AVM */ +extern void br_stp_set_bridge_id(struct net_bridge *br, void *addr); + + + /* br_stp_bpdu.c */ struct stp_proto; extern void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,