/****************************************************************************** ** ** FILE NAME : ifx_ppa_hook.c ** PROJECT : PPA ** MODULES : PPA Protocol Stack Hooks ** ** DATE : 3 NOV 2008 ** AUTHOR : Xu Liang ** DESCRIPTION : PPA Protocol Stack Hook Pointers ** COPYRIGHT : Copyright (c) 2009 ** Lantiq Deutschland GmbH ** Am Campeon 3; 85579 Neubiberg, Germany ** ** For licensing information, see the file 'LICENSE' in the root folder of ** this software module. ** ** HISTORY ** $Date $Author $Comment ** 03 NOV 2008 Xu Liang Initiate Version *******************************************************************************/ /* * #################################### * Version No. * #################################### */ #define VER_FAMILY 0x60 // bit 0: res // 1: Danube // 2: Twinpass // 3: Amazon-SE // 4: res // 5: AR9 // 6: GR9 #define VER_DRTYPE 0x08 // bit 0: Normal Data Path driver // 1: Indirect-Fast Path driver // 2: HAL driver // 3: Hook driver // 4: Stack/System Adaption Layer driver // 5: PPA API driver #define VER_INTERFACE 0x00 // bit 0: MII 0 // 1: MII 1 // 2: ATM WAN // 3: PTM WAN #define VER_ACCMODE 0x03 // bit 0: Routing // 1: Bridging #define VER_MAJOR 0 #define VER_MID 0 #define VER_MINOR 2 /* * #################################### * Head File * #################################### */ /* * Common Head File */ #include #include #include #include #include #include #include #include #include #include /* * Chip Specific Head File */ #include /* * #################################### * Export PPA hook functions * #################################### */ /********************************************************************************************** * PPA initialization hook function:ppa_hook_init_fn * It it used to initialize ppa subsystem. * input parameter PPA_INIT_INFO *, need to fill in this parameter, like max_lan_source_entries and so on * input parameter uint32_t, it is for future purpose. **********************************************************************************************/ int32_t (*ppa_hook_init_fn)(PPA_INIT_INFO *, uint32_t) = NULL; /********************************************************************************************** * PPA de-initialization hook function:ppa_hook_exit_fn * It it used to de-initialize ppa subsystem. **********************************************************************************************/ void (*ppa_hook_exit_fn)(void) = NULL; /********************************************************************************************** * PPA enable hook function: ppa_hook_enable_fn * It it used to enable ppa lan/wan acceleration respectively * input parameter uint32_t *, flag to enable/disable lan acceleratoin * input parameter uint32_t *, flag to enable/disable wan acceleratoin * input parameter uint32_t, it is for future purpose. **********************************************************************************************/ int32_t (*ppa_hook_enable_fn)(uint32_t, uint32_t, uint32_t) = NULL; /********************************************************************************************** * PPA get status hook function:ppa_hook_get_status_fn * It it used to get ppa lan/wan acceleration status * output parameter uint32_t *, lan acceleratoin status, ie, enabled or disabled. * output parameter uint32_t *, wan acceleratoin status * input parameter uint32_t, it is for future purpose. **********************************************************************************************/ int32_t (*ppa_hook_get_status_fn)(uint32_t *, uint32_t *, uint32_t) = NULL; /********************************************************************************************** * PPA unicast routing hook function:ppa_hook_session_add_fn * It it used to check unicast routing session and if necessary, add it to PPE FW to acceleration this session. * This hook will be invoked when a packet is handled before NAT and after NAT * input parameter PPA_BUF *: IP packet * input parameter PPA_SESSION *: routing session in network stack * input parameter uint32_t: this flag mainly to indicate the hook is invoked before NAT or after NAT * return: IFX_PPA_SESSION_ADDED: this session is added into PPE FW, ie, it is accelerated by PPE * IFX_PPA_SESSION_EXISTS: already added into PPE FW * IFX_PPA_SESSION_NOT_ADDED: not added int PPE FW for some reasons. * ... **********************************************************************************************/ int32_t (*ppa_hook_session_add_fn)(PPA_BUF *, PPA_SESSION *, uint32_t) = NULL; /********************************************************************************************** * PPA unicast routing hook function:ppa_hook_session_add_fn * It it used to delete a unicast routing session when it is timeout, reset or purposely. * input parameter PPA_SESSION *: the session pointer * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: this session is deleted sucessfully from PPE FW * ... **********************************************************************************************/ int32_t (*ppa_hook_session_del_fn)(PPA_SESSION *, uint32_t) = NULL; /********************************************************************************************** * PPA unicast routing hook function:ppa_hook_session_modify_fn * It it used to modify unicast routing session. Normally there is no need to call it. * input parameter PPA_SESSION *: the session pointer * input parameter PPA_SESSION_EXTRA *: the paramwter need to modify * input parameter uint32_t: flag indicates which kinds parameter will be modified * return: IFX_SUCCESS: this session is modified sucessfully **********************************************************************************************/ int32_t (*ppa_hook_session_modify_fn)(PPA_SESSION *, PPA_SESSION_EXTRA *, uint32_t) = NULL; int32_t (*ppa_hook_session_get_fn)(PPA_SESSION ***, PPA_SESSION_EXTRA **, int32_t *, uint32_t) = NULL; /********************************************************************************************** * PPA multicast hook function:ppa_hook_mc_group_update_fn * It it used to add/modify/delete a unicast routing session. It will be called manually by IGMP proxy or IGMP snooping module. * Anyway, our PPA now can auto-learn multicast source interface and call this hook automatically. * Note, if the multicast session already exit in PPA, then modify it if necessary. * if it is a new multicast session, it will be added into PPA/PPE FW accordingly. * if there is no lan interface join the multicast session/group and this session already added in PPE FW, then this session * will be removed from PPE FW. * input parameter PPA_MC_GROUP *: the pointer to multicast session * input parameter uint32_t: flag indicates which kinds parameter will be modified * return: IFX_PPA_SESSION_ADDED: this multicast session is added into PPE FW sucessfully **********************************************************************************************/ int32_t (*ppa_hook_mc_group_update_fn)(PPA_MC_GROUP *, uint32_t) = NULL; /********************************************************************************************** * PPA multicast hook function:ppa_hook_mc_group_get_fn * It it used to get a unicast routing session according to the multitcast IP address. * input parameter IPADDR *: multicast IP address/group which will be used to search its session pointer * output parameter PPA_MC_GROUP *, the pointer to multicast session * input parameter uint32_t: for future purpose * return: IFX_PPA_SESSION_ADDED: this multicast session is added into PPE FW sucessfully **********************************************************************************************/ int32_t (*ppa_hook_mc_group_get_fn)(IPADDR, PPA_MC_GROUP *, uint32_t) = NULL; /********************************************************************************************** * PPA multicast hook function:ppa_hook_mc_entry_modify_fn * It it used to modify a multicast session parameters * input parameter IPADDR: multicast IP address/group which will be used to search its session pointer * input parameter PPA_MC_GROUP *, for future purpose * input parameter PPA_SESSION_EXTRA *, new values used to modify multicast session * input parameter uint32_t: indicate which kinds of variable will be updated. * return: IFX_SUCCESS: modified/updated sucessfully. * IFX_FAILURE: failed to update **********************************************************************************************/ int32_t (*ppa_hook_mc_entry_modify_fn)(IPADDR, PPA_MC_GROUP *, PPA_SESSION_EXTRA *, uint32_t) = NULL; /********************************************************************************************** * PPA multicast hook function:ppa_hook_mc_entry_get_fn * It it used to get a multicast session according to the multitcast IP address. * input parameter IPADDR: multicast IP address/group which will be used to search its session pointer * output parameter PPA_SESSION_EXTRA *, the pointer to multicast session's special parameter * input parameter uint32_t: indicate which kinds of paramter's value want to get * return: IFX_SUCCESS: sucessfully get the multicast session's special parameter values. **********************************************************************************************/ int32_t (*ppa_hook_mc_entry_get_fn)(IPADDR, PPA_SESSION_EXTRA *, uint32_t) = NULL; /********************************************************************************************** * PPA multicast hook function:ppa_hook_multicast_pkt_srcif_add_fn * It it used to get a multicast source interface. It will be used at bridge level and IP level. * at bridge level, it will be regarded as a multicast bridging session if sucessfully added, * otherwise it is a multicast routing session * input parameter PPA_BUF *: IP packet * input parameter PPA_NETIF *: the interface pointer which received the ip packet. * If NULL, it can be got from PPA_BUF *. * return: IFX_PPA_SESSION_ADDED: this session is added into PPE FW, ie, it is accelerated by PPE * IFX_PPA_SESSION_EXISTS: already added into PPE FW * IFX_PPA_SESSION_NOT_ADDED: not added int PPE FW for some reasons. * ... **********************************************************************************************/ int32_t (*ppa_hook_multicast_pkt_srcif_add_fn)(PPA_BUF *, PPA_NETIF *) = NULL; /********************************************************************************************** * PPA unicast hook function:ppa_hook_inactivity_status_fn * It it used to check whether a unicast session is timeout or not. * Normally it is called by network stack which want to delete a session without any traffic for sometime. * input parameter PPA_U_SESSION *: the unicast session pointer * return: IFX_PPA_HIT: the session still hit and should keep it * IFX_PPA_TIMEOUT: timeout already **********************************************************************************************/ int32_t (*ppa_hook_inactivity_status_fn)(PPA_U_SESSION *) = NULL; /********************************************************************************************** * PPA unicast hook function:ppa_hook_set_inactivity_fn * It it used to set one unicast session timeout value * Normally it is called to prolong one sessions duration. * input parameter PPA_U_SESSION *: the unicast session pointer * input parameter int32_t: the timeout value * return: IFX_SUCCESS: update timeout sucessfully * IFX_FAILURE: fail to update timeout value **********************************************************************************************/ int32_t (*ppa_hook_set_inactivity_fn)(PPA_U_SESSION*, int32_t) = NULL; /********************************************************************************************** * PPA briding learning hook function:ppa_hook_bridge_entry_add_fn * It it used to add a bridging mac addresss into PPE FW. * This hook will be invoked when bridging learned a mac address or purposely to filter one mac address. * input parameter uint8_t*: the mac address * input parameter PPA_NETIF *: the interface which learned the mac address * input parameter uint32_t: PPA_F_STATIC_ENTRY means static mode, * PPA_F_DROP_PACKET means drop the packet, otherwise accelerate the packet. * return: IFX_PPA_SESSION_ADDED: this session is added into PPE FW, ie, it is accelerated by PPE * IFX_PPA_SESSION_EXISTS: already added into PPE FW * IFX_PPA_SESSION_NOT_ADDED: not added int PPE FW for some reasons. **********************************************************************************************/ int32_t (*ppa_hook_bridge_entry_add_fn)(uint8_t *, PPA_NETIF *, uint32_t) = NULL; /********************************************************************************************** * PPA briding learning hook function:ppa_hook_bridge_entry_delete_fn * It it used to delete a bridging mac addresss from PPE FW. * Normally this hook will be invoked when mac address timeout. * input parameter uint8_t*: the mac address * input parameter uint32_t: flag for future purpose * return: IFX_PPA_SESSION_ADDED: this session is added into PPE FW, ie, it is accelerated by PPE * return: IFX_SUCCESS: set timeout value sucessfully. * IFX_FAILURE: failed to update **********************************************************************************************/ int32_t (*ppa_hook_bridge_entry_delete_fn)(uint8_t *, uint32_t) = NULL; /********************************************************************************************** * PPA bridge hook function:ppa_hook_bridge_entry_hit_time_fn * It it used to get last hit time * input parameter uint8_t *: the mac address * input parameter uint32_t *: the last hit time * return: IFX_PPA_HIT: sucessfully get the last hit time * IFX_PPA_SESSION_NOT_ADDED: the mac address not in PPE FW yet **********************************************************************************************/ int32_t (*ppa_hook_bridge_entry_hit_time_fn)(uint8_t *, uint32_t *) = NULL; /********************************************************************************************** * PPA bridging hook function:ppa_hook_bridge_entry_inactivity_status_fn * It it used to check whether a unicast session is timeout or not. * Normally it is called by network stack which want to delete a mac address without any traffic for sometime. * input parameter uint8_t *: the mac address * return: IFX_PPA_HIT: the mac address still hit * IFX_PPA_TIMEOUT: timeout already **********************************************************************************************/ int32_t (*ppa_hook_bridge_entry_inactivity_status_fn)(uint8_t *) = NULL; /********************************************************************************************** * PPA bridging hook function:ppa_hook_set_bridge_entry_timeout_fn * It it used to set one bridge mac address's timeout value * Normally it is called to prolong one sessions duration. * input parameter uint8_t *: the mac address * input parameter int32_t: the timeout value * return: IFX_SUCCESS: update timeout sucessfully * IFX_FAILURE: fail to update timeout value **********************************************************************************************/ int32_t (*ppa_hook_set_bridge_entry_timeout_fn)(uint8_t *, uint32_t) = NULL; /********************************************************************************************** * PPA bridging hook function:ppa_hook_bridge_enable_fn * It it used to enable/disable PPA bridging mac address learning. * Normally it is called by network stack which want to enable/disable mac address learning. * input parameter uint32_t *: 0--disable, 1--enable * return: IFX_SUCCESS: sucessfully **********************************************************************************************/ int32_t (*ppa_hook_bridge_enable_fn)(uint32_t f_enable, uint32_t flags) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_set_bridge_if_vlan_config_fn * It it used to configure default port vlan property, like what kinds of vlan type conbination will be used by the interface, * and what vlan action will be taken * input parameter PPA_NETIF *: the interface of the port * input parameter PPA_VLAN_TAG_CTRL *: specify the vlan aciton for inner/outer vlan tag: like remove/insert/replace/none * input parameter PPA_VLAN_CFG *: specify the vlan type, like port/ethernet/src ip/tag based vlan * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: set sucessfully * IFX_FAILURE: fail to set vlan property for this interface **********************************************************************************************/ int32_t (*ppa_hook_set_bridge_if_vlan_config_fn)(PPA_NETIF *, PPA_VLAN_TAG_CTRL *, PPA_VLAN_CFG *, uint32_t) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_get_bridge_if_vlan_config_fn * It it used to get default port vlan property, like what kinds of vlan type conbination is used by the interface, * and what vlan action is used by this intereface. * input parameter PPA_NETIF *: the interface of the port * output parameter PPA_VLAN_TAG_CTRL *: specify the vlan aciton for inner/outer vlan tag: like remove/insert/replace/none * output parameter PPA_VLAN_CFG *: specify the vlan type, like port/ethernet/src ip/tag based vlan * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get vlan property from this interface **********************************************************************************************/ int32_t (*ppa_hook_get_bridge_if_vlan_config_fn)(PPA_NETIF *, PPA_VLAN_TAG_CTRL *, PPA_VLAN_CFG *, uint32_t) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_vlan_filter_add_fn * It it used to add vlan rule, like what vlan ID will be used, and which interfaces will be the forwarded interface * input parameter PPA_VLAN_MATCH_FIELD *: specifiy the vlan type and compare ig_criteria for PPE FW to match rule * input parameter PPA_VLAN_INFO *: specify the innner/outer vid and its destination interface membership, and its qid * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: add sucessfully * IFX_FAILURE: fail to add **********************************************************************************************/ int32_t (*ppa_hook_vlan_filter_add_fn)(PPA_VLAN_MATCH_FIELD *, PPA_VLAN_INFO *, uint32_t) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_vlan_filter_del_fn * It it used to delete vlan rule * input parameter PPA_VLAN_MATCH_FIELD *: specifiy the vlan type and compare ig_criteria * input parameter PPA_VLAN_INFO *: no used * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: delete sucessfully * IFX_FAILURE: fail to delete **********************************************************************************************/ int32_t (*ppa_hook_vlan_filter_del_fn)(PPA_VLAN_MATCH_FIELD *, PPA_VLAN_INFO *, uint32_t) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_vlan_filter_get_all_fn * It it used to get all vlan rules * output parameter PPA_VLAN_FILTER_CONFIG *: * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get * Note, it is a dummy function now for constrained memory size. **********************************************************************************************/ int32_t (*ppa_hook_vlan_filter_get_all_fn)(int32_t *, PPA_VLAN_FILTER_CONFIG *, uint32_t) = NULL; /********************************************************************************************** * PPA vlan bridging hook function:ppa_hook_vlan_filter_del_all_fn * It it used to delete all vlan rules * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: delete sucessfully * IFX_FAILURE: fail to delete **********************************************************************************************/ int32_t (*ppa_hook_vlan_filter_del_all_fn)(uint32_t); /********************************************************************************************** * PPA mibs hook function:ppa_hook_get_if_stats_fn * It it used to port mib status, like rx/tx packet number and so on * input parameter PPA_IFNAME *: specify which port's mib want to get * output parameter PPA_IF_STATS * * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get **********************************************************************************************/ int32_t (*ppa_hook_get_if_stats_fn)(PPA_IFNAME *, PPA_IF_STATS *, uint32_t) = NULL; /********************************************************************************************** * PPA mibs hook function:ppa_hook_get_accel_stats_fn * It it used to port acclerated mib status, like accelerated rx/tx packet number and so on * input parameter PPA_IFNAME *: specify which port's acceleration mibs want to get * output parameter PPA_ACCEL_STATS * * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get **********************************************************************************************/ int32_t (*ppa_hook_get_accel_stats_fn)(PPA_IFNAME *, PPA_ACCEL_STATS *, uint32_t) = NULL; /********************************************************************************************** * PPA interface hook function:ppa_hook_set_if_mac_address_fn * It it used to set one interface's mac addres to PPE FW ( note, not set linux network interafce's mac address, but to PPE FW ) * It should match with linux interface's mac address. * input parameter PPA_IFNAME *: specify which interface to set * input parameter uint8_t * : the new mac address * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: set sucessfully * IFX_FAILURE: fail to set **********************************************************************************************/ int32_t (*ppa_hook_set_if_mac_address_fn)(PPA_IFNAME *, uint8_t *, uint32_t) = NULL; /********************************************************************************************** * PPA interface hook function:ppa_hook_get_if_mac_address_fn * It it used to get one interface's mac addres set in PPE FW * input parameter PPA_IFNAME *: specify which interface to set * output parameter uint8_t * : the mac address * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get **********************************************************************************************/ int32_t (*ppa_hook_get_if_mac_address_fn)(PPA_IFNAME *, uint8_t *, uint32_t) = NULL; /********************************************************************************************** * PPA interface hook function:ppa_hook_add_if_fn * It it used to add one LAN or WAN interface to PPA * input parameter PPA_IFINFO *: should specify ifinfo->ifname and ifinfo->if_flags ( PPA_F_LAN_IF or PPA_F_WAN_IF ) * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: add sucessfully * IFX_FAILURE: fail to add **********************************************************************************************/ int32_t (*ppa_hook_add_if_fn)(PPA_IFINFO *, uint32_t) = NULL; /********************************************************************************************** * PPA interface hook function:ppa_hook_del_if_fn * It it used to delete one LAN or WAN interface from PPA * input parameter PPA_IFINFO *: should specify ifinfo->ifname and ifinfo->if_flags ( PPA_F_LAN_IF or PPA_F_WAN_IF ) * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: delete sucessfully * IFX_FAILURE: fail to get **********************************************************************************************/ int32_t (*ppa_hook_del_if_fn)(PPA_IFINFO *, uint32_t) = NULL; /********************************************************************************************** * PPA interface hook function:ppa_hook_get_if_fn * It it used to get all LAN and WAN interface list * output parameter int32_t *: the interface number * output parameter PPA_IFINFO: interface name and its LAN/WAN flag * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: get sucessfully * IFX_FAILURE: fail to get **********************************************************************************************/ int32_t (*ppa_hook_get_if_fn)(int32_t *, PPA_IFINFO **, uint32_t) = NULL; /********************************************************************************************** * PPA Extra ethernet interface hook function :ppa_hook_addppa_hook_directpath_register_dev_fn_if_fn * it is used to register/de-register a device for direct path support * output parameter uint32_t *: return the virtual port id * input parameter PPA_NETIF *: the linux interface name, like wlan0 * input parameter PPA_DIRECTPATH_CB *: mainly provide callback function, like start_tx_fn, stop_tx_fn, rx_fn * input parameter uint32_t: PPA_F_DIRECTPATH_REGISTER for register, otherwise for de-register * return: IFX_SUCCESS: register sucessfully * others: fail to register **********************************************************************************************/ int32_t (*ppa_hook_directpath_register_dev_fn)(uint32_t *, PPA_NETIF *, PPA_DIRECTPATH_CB *, uint32_t) = NULL; /********************************************************************************************** * PPA Extra interface hook function :ppa_hook_directpath_send_fn * it is used to send a packet to PPE FW when extra ethernet interface receive a packet * input parameter uint32_t: the virtual port id * input parameter PPA_BUF *: the packet to send * input parameter int32_t *: the packet length * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: send sucessfully * others: fail to send **********************************************************************************************/ int32_t (*ppa_hook_directpath_send_fn)(uint32_t, PPA_BUF *, int32_t, uint32_t) = NULL; /********************************************************************************************** * PPA Extra interface hook function :ppa_hook_directpath_rx_stop_fn * it is used to stop forward packet to extra ethernet interface * input parameter uint32_t: the virtual port id * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: stop sucessfully * others: fail to stop **********************************************************************************************/ int32_t (*ppa_hook_directpath_rx_stop_fn)(uint32_t, uint32_t) = NULL; /********************************************************************************************** * PPA Extra interface hook function :ppa_hook_directpath_rx_restart_fn * it is used to restart forwarding packet to extra ethernet interface * input parameter uint32_t: the virtual port id * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: restart forwarding sucessfully * others: fail to restart forwarding **********************************************************************************************/ int32_t (*ppa_hook_directpath_rx_restart_fn)(uint32_t, uint32_t) = NULL; /********************************************************************************************** * PPA Extra interface hook function :ppa_hook_get_netif_for_ppa_ifid_fn * it is used to get one extran ethernet interface pointer according to its virtual port id * input parameter uint32_t: the virtual port id * return: non NULL: return the interface pointer * NULL: fail to get **********************************************************************************************/ PPA_NETIF *(*ppa_hook_get_netif_for_ppa_ifid_fn)(uint32_t) = NULL; /********************************************************************************************** * PPA Extra interface hook function :ppa_hook_get_ifid_for_netif_fn * it is used to get one extran ethernet interface virtual port id according to its interface pointer * input parameter uint32_t: network interface pointer * return: virtual port id: if sucessully, otherwise return -1, ie, IFX_FAILURE **********************************************************************************************/ int32_t (*ppa_hook_get_ifid_for_netif_fn)(PPA_NETIF *) = NULL; /********************************************************************************************** * PPA LAN/WAN mixed mode hook function :ppa_hook_wan_mii0_vlan_range_add_fn * it is used to add a vlan range for WAN interface. * input parameter PPA_VLAN_RANGE *: the vlan range for WAN interface * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: add sucessully * IFX_FAILURE: fail to add **********************************************************************************************/ int32_t (*ppa_hook_wan_mii0_vlan_range_add_fn)(PPA_VLAN_RANGE *, uint32_t) = NULL; /********************************************************************************************** * PPA LAN/WAN mixed mode hook function :ppa_hook_wan_mii0_vlan_range_del_fn * it is used to delete a vlan range of WAN interface. * input parameter PPA_VLAN_RANGE *: the vlan range of WAN interface * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: delete sucessully * IFX_FAILURE: fail to delete **********************************************************************************************/ int32_t (*ppa_hook_wan_mii0_vlan_range_del_fn)(PPA_VLAN_RANGE *, int32_t) = NULL ; /********************************************************************************************** * PPA LAN/WAN mixed mode hook function :ppa_hook_wan_mii0_vlan_ranges_get_fn * it is used to get vlan range list of WAN interface. * output parameter int32_t *: the vlan range number * output parameter PPA_VLAN_RANGE *: the list of all vlan ranges * input parameter uint32_t: for future purpose * return: IFX_SUCCESS: delete sucessully * IFX_FAILURE: fail to delete **********************************************************************************************/ int32_t (*ppa_hook_wan_mii0_vlan_ranges_get_fn)(int32_t *, PPA_VLAN_RANGE *, uint32_t) = NULL; #ifdef CONFIG_IFX_PPA_QOS int32_t (*ifx_ppa_hook_get_qos_qnum)( uint32_t portid, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_qos_mib)( uint32_t portid, uint32_t queueid, PPA_QOS_MIB *mib, uint32_t flag) = NULL; #ifdef CONFIG_IFX_PPA_QOS_RATE_SHAPING int32_t (*ifx_ppa_hook_set_ctrl_qos_rate)( uint32_t portid, uint32_t enable, uint32_t flag ) = NULL; int32_t (*ifx_ppa_hook_get_ctrl_qos_rate)( uint32_t portid, uint32_t *enable, uint32_t flag ) = NULL; int32_t (*ifx_ppa_hook_set_qos_rate)( uint32_t portid, uint32_t queueid, uint32_t rate, uint32_t burst, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_qos_rate)( uint32_t portid, uint32_t queueid, uint32_t *rate, uint32_t *burst, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_reset_qos_rate)( uint32_t portid, uint32_t queueid, uint32_t flag ) = NULL; #endif //end of CONFIG_IFX_PPA_QOS_RATE_SHAPING #ifdef CONFIG_IFX_PPA_QOS_WFQ int32_t (*ifx_ppa_hook_set_ctrl_qos_wfq)( uint32_t portid, uint32_t enable, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_ctrl_qos_wfq)( uint32_t portid, uint32_t *enable, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_set_qos_wfq)( uint32_t portid, uint32_t queueid, uint32_t weight_level, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_qos_wfq)( uint32_t portid, uint32_t queueid, uint32_t *weight_level, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_reset_qos_wfq)( uint32_t portid, uint32_t queueid, uint32_t flag ) = NULL; #endif //end of CONFIG_IFX_PPA_QOS_WFQ #endif //end of CONFIG_IFX_PPA_QOS #ifdef CONFIG_IFX_PPA_MFE int32_t (*ifx_ppa_hook_multifield_control)(uint8_t enable, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_multifield_status)(uint8_t* enable, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_get_multifield_max_flow)(uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_add_multifield_flow)( PPA_MULTIFIELD_FLOW_INFO *p_multifield_info, int32_t *index, uint32_t flag) = NULL; int32_t (*ifx_ppa_hook_del_multifield_flow)( PPA_MULTIFIELD_FLOW_INFO *p_multifield_info, uint32_t flag ) = NULL; int32_t (*ifx_ppa_hook_quick_del_multifield_flow)( int32_t index, uint32_t flag) = NULL; #endif //end of CONFIG_IFX_PPA_MFE int32_t (*ifx_ppa_hook_get_dsl_mib)(PPA_DSL_QUEUE_MIB *mib, uint32_t flag) = NULL; EXPORT_SYMBOL(ppa_hook_init_fn); EXPORT_SYMBOL(ppa_hook_exit_fn); EXPORT_SYMBOL(ppa_hook_enable_fn); EXPORT_SYMBOL(ppa_hook_get_status_fn); EXPORT_SYMBOL(ppa_hook_session_add_fn); EXPORT_SYMBOL(ppa_hook_session_del_fn); EXPORT_SYMBOL(ppa_hook_session_modify_fn); EXPORT_SYMBOL(ppa_hook_session_get_fn); EXPORT_SYMBOL(ppa_hook_mc_group_update_fn); EXPORT_SYMBOL(ppa_hook_mc_group_get_fn); EXPORT_SYMBOL(ppa_hook_mc_entry_modify_fn); EXPORT_SYMBOL(ppa_hook_mc_entry_get_fn); EXPORT_SYMBOL(ppa_hook_multicast_pkt_srcif_add_fn); EXPORT_SYMBOL(ppa_hook_inactivity_status_fn); EXPORT_SYMBOL(ppa_hook_set_inactivity_fn); EXPORT_SYMBOL(ppa_hook_bridge_entry_add_fn); EXPORT_SYMBOL(ppa_hook_bridge_entry_delete_fn); EXPORT_SYMBOL(ppa_hook_bridge_entry_hit_time_fn); EXPORT_SYMBOL(ppa_hook_bridge_entry_inactivity_status_fn); EXPORT_SYMBOL(ppa_hook_set_bridge_entry_timeout_fn); EXPORT_SYMBOL(ppa_hook_bridge_enable_fn); EXPORT_SYMBOL(ppa_hook_set_bridge_if_vlan_config_fn); EXPORT_SYMBOL(ppa_hook_get_bridge_if_vlan_config_fn); EXPORT_SYMBOL(ppa_hook_vlan_filter_add_fn); EXPORT_SYMBOL(ppa_hook_vlan_filter_del_fn); EXPORT_SYMBOL(ppa_hook_wan_mii0_vlan_range_add_fn); EXPORT_SYMBOL(ppa_hook_wan_mii0_vlan_range_del_fn); EXPORT_SYMBOL(ppa_hook_wan_mii0_vlan_ranges_get_fn); EXPORT_SYMBOL(ppa_hook_vlan_filter_get_all_fn); EXPORT_SYMBOL(ppa_hook_vlan_filter_del_all_fn); EXPORT_SYMBOL(ppa_hook_get_if_stats_fn); EXPORT_SYMBOL(ppa_hook_get_accel_stats_fn); EXPORT_SYMBOL(ppa_hook_set_if_mac_address_fn); EXPORT_SYMBOL(ppa_hook_get_if_mac_address_fn); EXPORT_SYMBOL(ppa_hook_add_if_fn); EXPORT_SYMBOL(ppa_hook_del_if_fn); EXPORT_SYMBOL(ppa_hook_get_if_fn); EXPORT_SYMBOL(ppa_hook_directpath_register_dev_fn); EXPORT_SYMBOL(ppa_hook_directpath_send_fn); EXPORT_SYMBOL(ppa_hook_directpath_rx_stop_fn); EXPORT_SYMBOL(ppa_hook_directpath_rx_restart_fn); EXPORT_SYMBOL(ppa_hook_get_netif_for_ppa_ifid_fn); EXPORT_SYMBOL(ppa_hook_get_ifid_for_netif_fn); #ifdef CONFIG_IFX_PPA_MFE EXPORT_SYMBOL(ifx_ppa_hook_multifield_control); EXPORT_SYMBOL(ifx_ppa_hook_get_multifield_status); EXPORT_SYMBOL(ifx_ppa_hook_get_multifield_max_flow); EXPORT_SYMBOL(ifx_ppa_hook_add_multifield_flow); EXPORT_SYMBOL(ifx_ppa_hook_del_multifield_flow); EXPORT_SYMBOL(ifx_ppa_hook_quick_del_multifield_flow); #endif // CONFIG_IFX_PPA_MFE #ifdef CONFIG_IFX_PPA_QOS EXPORT_SYMBOL(ifx_ppa_hook_get_qos_qnum); EXPORT_SYMBOL(ifx_ppa_hook_get_qos_mib); #ifdef CONFIG_IFX_PPA_QOS_RATE_SHAPING EXPORT_SYMBOL(ifx_ppa_hook_set_ctrl_qos_rate); EXPORT_SYMBOL(ifx_ppa_hook_get_ctrl_qos_rate); EXPORT_SYMBOL(ifx_ppa_hook_set_qos_rate); EXPORT_SYMBOL(ifx_ppa_hook_get_qos_rate); EXPORT_SYMBOL(ifx_ppa_hook_reset_qos_rate); #endif // CONFIG_IFX_PPA_QOS_RATE_SHAPING #ifdef CONFIG_IFX_PPA_QOS_WFQ EXPORT_SYMBOL(ifx_ppa_hook_set_ctrl_qos_wfq); EXPORT_SYMBOL(ifx_ppa_hook_get_ctrl_qos_wfq); EXPORT_SYMBOL(ifx_ppa_hook_set_qos_wfq); EXPORT_SYMBOL(ifx_ppa_hook_get_qos_wfq); EXPORT_SYMBOL(ifx_ppa_hook_reset_qos_wfq); #endif // end of CONFIG_IFX_PPA_QOS_WFQ #endif //end of CONFIG_IFX_PPA_QOS EXPORT_SYMBOL(ifx_ppa_hook_get_dsl_mib);