--- zzzz-none-000/linux-5.15.111/net/bridge/br_private.h 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/bridge/br_private.h 2024-02-07 09:28:09.000000000 +0000 @@ -5,6 +5,10 @@ * Authors: * Lennert Buytenhek */ +/* + * 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 @@ -67,6 +71,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 { @@ -269,6 +288,19 @@ unsigned long used; 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) @@ -446,6 +478,21 @@ BROPT_MCAST_VLAN_SNOOPING_ENABLED, }; +#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; spinlock_t hash_lock; @@ -535,6 +582,12 @@ #if IS_ENABLED(CONFIG_BRIDGE_CFM) struct hlist_head mep_list; #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 {