--- zzzz-none-000/linux-4.9.279/net/bridge/br_private.h 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/bridge/br_private.h 2023-02-08 10:58:16.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 @@ -57,6 +61,21 @@ unsigned char addr[ETH_ALEN]; }; +/* 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 + #ifdef CONFIG_BRIDGE_IGMP_SNOOPING /* our own querier */ struct bridge_mcast_own_query { @@ -164,6 +183,19 @@ added_by_user:1, added_by_external_learn:1; struct rcu_head rcu; + +#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 */ + }; #define MDB_PG_FLAGS_PERMANENT BIT(0) @@ -272,6 +304,21 @@ rtnl_dereference(dev->rx_handler_data) : NULL; } +#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; @@ -333,6 +380,8 @@ u32 multicast_last_member_count; u32 multicast_startup_query_count; + u8 multicast_igmp_version; + unsigned long multicast_last_member_interval; unsigned long multicast_membership_interval; unsigned long multicast_querier_interval; @@ -353,6 +402,7 @@ struct bridge_mcast_other_query ip6_other_query; struct bridge_mcast_own_query ip6_own_query; struct bridge_mcast_querier ip6_querier; + u8 multicast_mld_version; #endif /* IS_ENABLED(CONFIG_IPV6) */ #endif @@ -374,6 +424,12 @@ __be16 vlan_proto; u16 default_pvid; #endif +#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 { @@ -582,6 +638,10 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val); int br_multicast_set_querier(struct net_bridge *br, unsigned long val); int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val); +int br_multicast_set_igmp_version(struct net_bridge *br, unsigned long val); +#if IS_ENABLED(CONFIG_IPV6) +int br_multicast_set_mld_version(struct net_bridge *br, unsigned long val); +#endif struct net_bridge_mdb_entry * br_mdb_ip_get(struct net_bridge_mdb_htable *mdb, struct br_ip *dst); struct net_bridge_mdb_entry *