FreeBSD kernel BXE device code
ecore_sp.c File Reference
#include <sys/cdefs.h>
#include "bxe.h"
#include "ecore_init.h"
Include dependency graph for ecore_sp.c:

Go to the source code of this file.

Data Structures

struct  ecore_mcast_mac_elem
 
struct  ecore_pending_mcast_cmd
 

Macros

#define list_next_entry(pos, member)    list_entry((pos)->member.next, typeof(*(pos)), member)
 
#define ECORE_57711_SET_MC_FILTER(filter, bit)
 
#define ECORE_CAM_SIZE_EMUL   5
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void ecore_exe_queue_init (struct bxe_softc *sc, struct ecore_exe_queue_obj *o, int exe_len, union ecore_qable_obj *owner, exe_q_validate validate, exe_q_remove remove, exe_q_optimize optimize, exe_q_execute exec, exe_q_get get)
 
static void ecore_exe_queue_free_elem (struct bxe_softc *sc, struct ecore_exeq_elem *elem)
 
static int ecore_exe_queue_length (struct ecore_exe_queue_obj *o)
 
static int ecore_exe_queue_add (struct bxe_softc *sc, struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem, bool restore)
 
static void __ecore_exe_queue_reset_pending (struct bxe_softc *sc, struct ecore_exe_queue_obj *o)
 
static int ecore_exe_queue_step (struct bxe_softc *sc, struct ecore_exe_queue_obj *o, unsigned long *ramrod_flags)
 
static bool ecore_exe_queue_empty (struct ecore_exe_queue_obj *o)
 
static struct ecore_exeq_elemecore_exe_queue_alloc_elem (struct bxe_softc *sc)
 
static bool ecore_raw_check_pending (struct ecore_raw_obj *o)
 
static void ecore_raw_clear_pending (struct ecore_raw_obj *o)
 
static void ecore_raw_set_pending (struct ecore_raw_obj *o)
 
static int ecore_state_wait (struct bxe_softc *sc, int state, unsigned long *pstate)
 
static int ecore_raw_wait (struct bxe_softc *sc, struct ecore_raw_obj *raw)
 
static bool ecore_get_cam_offset_mac (struct ecore_vlan_mac_obj *o, int *offset)
 
static bool ecore_get_credit_mac (struct ecore_vlan_mac_obj *o)
 
static bool ecore_get_cam_offset_vlan (struct ecore_vlan_mac_obj *o, int *offset)
 
static bool ecore_get_credit_vlan (struct ecore_vlan_mac_obj *o)
 
static bool ecore_get_credit_vlan_mac (struct ecore_vlan_mac_obj *o)
 
static bool ecore_put_cam_offset_mac (struct ecore_vlan_mac_obj *o, int offset)
 
static bool ecore_put_credit_mac (struct ecore_vlan_mac_obj *o)
 
static bool ecore_put_cam_offset_vlan (struct ecore_vlan_mac_obj *o, int offset)
 
static bool ecore_put_credit_vlan (struct ecore_vlan_mac_obj *o)
 
static bool ecore_put_credit_vlan_mac (struct ecore_vlan_mac_obj *o)
 
static int __ecore_vlan_mac_h_write_trylock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static void __ecore_vlan_mac_h_exec_pending (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static void __ecore_vlan_mac_h_pend (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, unsigned long ramrod_flags)
 
static void __ecore_vlan_mac_h_write_unlock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
void ecore_vlan_mac_h_write_unlock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static int __ecore_vlan_mac_h_read_lock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
int ecore_vlan_mac_h_read_lock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static void __ecore_vlan_mac_h_read_unlock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
void ecore_vlan_mac_h_read_unlock (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static int ecore_get_n_elements (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, int n, uint8_t *base, uint8_t stride, uint8_t size)
 
static int ecore_check_mac_add (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static int ecore_check_vlan_add (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static int ecore_check_vlan_mac_add (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static int ecore_check_vxlan_fltr_add (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static struct ecore_vlan_mac_registry_elemecore_check_mac_del (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static struct ecore_vlan_mac_registry_elemecore_check_vlan_del (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static struct ecore_vlan_mac_registry_elemecore_check_vlan_mac_del (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static struct ecore_vlan_mac_registry_elemecore_check_vxlan_fltr_del (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union ecore_classification_ramrod_data *data)
 
static bool ecore_check_move (struct bxe_softc *sc, struct ecore_vlan_mac_obj *src_o, struct ecore_vlan_mac_obj *dst_o, union ecore_classification_ramrod_data *data)
 
static bool ecore_check_move_always_err (struct bxe_softc *sc, struct ecore_vlan_mac_obj *src_o, struct ecore_vlan_mac_obj *dst_o, union ecore_classification_ramrod_data *data)
 
static uint8_t ecore_vlan_mac_get_rx_tx_flag (struct ecore_vlan_mac_obj *o)
 
void ecore_set_mac_in_nig (struct bxe_softc *sc, bool add, unsigned char *dev_addr, int index)
 
static void ecore_vlan_mac_set_cmd_hdr_e2 (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, bool add, int opcode, struct eth_classify_cmd_header *hdr)
 
static void ecore_vlan_mac_set_rdata_hdr_e2 (uint32_t cid, int type, struct eth_classify_header *hdr, int rule_cnt)
 
static void ecore_set_one_mac_e2 (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static void ecore_vlan_mac_set_rdata_hdr_e1x (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, int type, int cam_offset, struct mac_configuration_hdr *hdr)
 
static void ecore_vlan_mac_set_cfg_entry_e1x (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, bool add, int opcode, uint8_t *mac, uint16_t vlan_id, struct mac_configuration_entry *cfg_entry)
 
static void ecore_vlan_mac_set_rdata_e1x (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, int type, int cam_offset, bool add, uint8_t *mac, uint16_t vlan_id, int opcode, struct mac_configuration_cmd *config)
 
static void ecore_set_one_mac_e1x (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static void ecore_set_one_vlan_e2 (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static void ecore_set_one_vlan_mac_e2 (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static void ecore_set_one_vxlan_fltr_e2 (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static void ecore_set_one_vlan_mac_e1h (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, int rule_idx, int cam_offset)
 
static int ecore_vlan_mac_restore (struct bxe_softc *sc, struct ecore_vlan_mac_ramrod_params *p, struct ecore_vlan_mac_registry_elem **ppos)
 
static struct ecore_exeq_elemecore_exeq_get_mac (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)
 
static struct ecore_exeq_elemecore_exeq_get_vlan (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)
 
static struct ecore_exeq_elemecore_exeq_get_vlan_mac (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)
 
static struct ecore_exeq_elemecore_exeq_get_vxlan_fltr (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)
 
static int ecore_validate_vlan_mac_add (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_validate_vlan_mac_del (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_validate_vlan_mac_move (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_validate_vlan_mac (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_remove_vlan_mac (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_wait_vlan_mac (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o)
 
static int __ecore_vlan_mac_execute_step (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, unsigned long *ramrod_flags)
 
static int ecore_complete_vlan_mac (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, union event_ring_elem *cqe, unsigned long *ramrod_flags)
 
static int ecore_optimize_vlan_mac (struct bxe_softc *sc, union ecore_qable_obj *qo, struct ecore_exeq_elem *elem)
 
static int ecore_vlan_mac_get_registry_elem (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, struct ecore_exeq_elem *elem, bool restore, struct ecore_vlan_mac_registry_elem **re)
 
static int ecore_execute_vlan_mac (struct bxe_softc *sc, union ecore_qable_obj *qo, ecore_list_t *exe_chunk, unsigned long *ramrod_flags)
 
static int ecore_vlan_mac_push_new_cmd (struct bxe_softc *sc, struct ecore_vlan_mac_ramrod_params *p)
 
int ecore_config_vlan_mac (struct bxe_softc *sc, struct ecore_vlan_mac_ramrod_params *p)
 
static int ecore_vlan_mac_del_all (struct bxe_softc *sc, struct ecore_vlan_mac_obj *o, unsigned long *vlan_mac_flags, unsigned long *ramrod_flags)
 
static void ecore_init_raw_obj (struct ecore_raw_obj *raw, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type)
 
static void ecore_init_vlan_mac_common (struct ecore_vlan_mac_obj *o, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type, struct ecore_credit_pool_obj *macs_pool, struct ecore_credit_pool_obj *vlans_pool)
 
void ecore_init_mac_obj (struct bxe_softc *sc, struct ecore_vlan_mac_obj *mac_obj, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type, struct ecore_credit_pool_obj *macs_pool)
 
void ecore_init_vlan_obj (struct bxe_softc *sc, struct ecore_vlan_mac_obj *vlan_obj, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type, struct ecore_credit_pool_obj *vlans_pool)
 
void ecore_init_vlan_mac_obj (struct bxe_softc *sc, struct ecore_vlan_mac_obj *vlan_mac_obj, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type, struct ecore_credit_pool_obj *macs_pool, struct ecore_credit_pool_obj *vlans_pool)
 
void ecore_init_vxlan_fltr_obj (struct bxe_softc *sc, struct ecore_vlan_mac_obj *vlan_mac_obj, uint8_t cl_id, uint32_t cid, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type, struct ecore_credit_pool_obj *macs_pool, struct ecore_credit_pool_obj *vlans_pool)
 
static void __storm_memset_mac_filters (struct bxe_softc *sc, struct tstorm_eth_mac_filter_config *mac_filters, uint16_t pf_id)
 
static int ecore_set_rx_mode_e1x (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
static void ecore_rx_mode_set_rdata_hdr_e2 (uint32_t cid, struct eth_classify_header *hdr, uint8_t rule_cnt)
 
static void ecore_rx_mode_set_cmd_state_e2 (struct bxe_softc *sc, unsigned long *accept_flags, struct eth_filter_rules_cmd *cmd, bool clear_accept_all)
 
static int ecore_set_rx_mode_e2 (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
static int ecore_wait_rx_mode_comp_e2 (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
static int ecore_empty_rx_mode_wait (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
int ecore_config_rx_mode (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
void ecore_init_rx_mode_obj (struct bxe_softc *sc, struct ecore_rx_mode_obj *o)
 
static uint8_t ecore_mcast_bin_from_mac (uint8_t *mac)
 
static int ecore_mcast_wait (struct bxe_softc *sc, struct ecore_mcast_obj *o)
 
static int ecore_mcast_enqueue_cmd (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static int ecore_mcast_get_next_bin (struct ecore_mcast_obj *o, int last)
 
static int ecore_mcast_clear_first_bin (struct ecore_mcast_obj *o)
 
static uint8_t ecore_mcast_get_rx_tx_flag (struct ecore_mcast_obj *o)
 
static void ecore_mcast_set_one_rule_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o, int idx, union ecore_mcast_config_data *cfg_data, enum ecore_mcast_cmd cmd)
 
static int ecore_mcast_handle_restore_cmd_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o, int start_bin, int *rdata_idx)
 
static void ecore_mcast_hdl_pending_add_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_pending_mcast_cmd *cmd_pos, int *line_idx)
 
static void ecore_mcast_hdl_pending_del_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_pending_mcast_cmd *cmd_pos, int *line_idx)
 
static void ecore_mcast_hdl_pending_restore_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_pending_mcast_cmd *cmd_pos, int *line_idx)
 
static int ecore_mcast_handle_pending_cmds_e2 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p)
 
static void ecore_mcast_hdl_add (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_mcast_ramrod_params *p, int *line_idx)
 
static void ecore_mcast_hdl_del (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_mcast_ramrod_params *p, int *line_idx)
 
static int ecore_mcast_handle_current_cmd (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd, int start_cnt)
 
static int ecore_mcast_validate_e2 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static void ecore_mcast_revert_e2 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, int old_num_bins)
 
static void ecore_mcast_set_rdata_hdr_e2 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, uint8_t len)
 
static int ecore_mcast_refresh_registry_e2 (struct bxe_softc *sc, struct ecore_mcast_obj *o)
 
static int ecore_mcast_setup_e2 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static int ecore_mcast_validate_e1h (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static void ecore_mcast_revert_e1h (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, int old_num_bins)
 
static void ecore_mcast_hdl_add_e1h (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_mcast_ramrod_params *p, uint32_t *mc_filter)
 
static void ecore_mcast_hdl_restore_e1h (struct bxe_softc *sc, struct ecore_mcast_obj *o, struct ecore_mcast_ramrod_params *p, uint32_t *mc_filter)
 
static int ecore_mcast_setup_e1h (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static int ecore_mcast_validate_e1 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static void ecore_mcast_revert_e1 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, int old_num_macs)
 
static void ecore_mcast_set_one_rule_e1 (struct bxe_softc *sc, struct ecore_mcast_obj *o, int idx, union ecore_mcast_config_data *cfg_data, enum ecore_mcast_cmd cmd)
 
static void ecore_mcast_set_rdata_hdr_e1 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, uint8_t len)
 
static int ecore_mcast_handle_restore_cmd_e1 (struct bxe_softc *sc, struct ecore_mcast_obj *o, int start_idx, int *rdata_idx)
 
static int ecore_mcast_handle_pending_cmds_e1 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p)
 
static void ecore_get_fw_mac_addr (uint16_t *fw_hi, uint16_t *fw_mid, uint16_t *fw_lo, uint8_t *mac)
 
static int ecore_mcast_refresh_registry_e1 (struct bxe_softc *sc, struct ecore_mcast_obj *o)
 
static int ecore_mcast_setup_e1 (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static int ecore_mcast_get_registry_size_exact (struct ecore_mcast_obj *o)
 
static int ecore_mcast_get_registry_size_aprox (struct ecore_mcast_obj *o)
 
static void ecore_mcast_set_registry_size_exact (struct ecore_mcast_obj *o, int n)
 
static void ecore_mcast_set_registry_size_aprox (struct ecore_mcast_obj *o, int n)
 
int ecore_config_mcast (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
static void ecore_mcast_clear_sched (struct ecore_mcast_obj *o)
 
static void ecore_mcast_set_sched (struct ecore_mcast_obj *o)
 
static bool ecore_mcast_check_sched (struct ecore_mcast_obj *o)
 
static bool ecore_mcast_check_pending (struct ecore_mcast_obj *o)
 
void ecore_init_mcast_obj (struct bxe_softc *sc, struct ecore_mcast_obj *mcast_obj, uint8_t mcast_cl_id, uint32_t mcast_cid, uint8_t func_id, uint8_t engine_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type)
 
static bool __atomic_add_ifless (ecore_atomic_t *v, int a, int u)
 
static bool __atomic_dec_ifmoe (ecore_atomic_t *v, int a, int u)
 
static bool ecore_credit_pool_get (struct ecore_credit_pool_obj *o, int cnt)
 
static bool ecore_credit_pool_put (struct ecore_credit_pool_obj *o, int cnt)
 
static int ecore_credit_pool_check (struct ecore_credit_pool_obj *o)
 
static bool ecore_credit_pool_always_TRUE (struct ecore_credit_pool_obj *o, int cnt)
 
static bool ecore_credit_pool_get_entry (struct ecore_credit_pool_obj *o, int *offset)
 
static bool ecore_credit_pool_put_entry (struct ecore_credit_pool_obj *o, int offset)
 
static bool ecore_credit_pool_put_entry_always_TRUE (struct ecore_credit_pool_obj *o, int offset)
 
static bool ecore_credit_pool_get_entry_always_TRUE (struct ecore_credit_pool_obj *o, int *offset)
 
void ecore_init_credit_pool (struct ecore_credit_pool_obj *p, int base, int credit)
 
void ecore_init_mac_credit_pool (struct bxe_softc *sc, struct ecore_credit_pool_obj *p, uint8_t func_id, uint8_t func_num)
 
void ecore_init_vlan_credit_pool (struct bxe_softc *sc, struct ecore_credit_pool_obj *p, uint8_t func_id, uint8_t func_num)
 
static int ecore_setup_rss (struct bxe_softc *sc, struct ecore_config_rss_params *p)
 
void ecore_get_rss_ind_table (struct ecore_rss_config_obj *rss_obj, uint8_t *ind_table)
 
int ecore_config_rss (struct bxe_softc *sc, struct ecore_config_rss_params *p)
 
void ecore_init_rss_config_obj (struct bxe_softc *sc, struct ecore_rss_config_obj *rss_obj, uint8_t cl_id, uint32_t cid, uint8_t func_id, uint8_t engine_id, void *rdata, ecore_dma_addr_t rdata_mapping, int state, unsigned long *pstate, ecore_obj_type type)
 
int ecore_queue_state_change (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_queue_set_pending (struct ecore_queue_sp_obj *obj, struct ecore_queue_state_params *params)
 
static int ecore_queue_wait_comp (struct bxe_softc *sc, struct ecore_queue_sp_obj *o, enum ecore_queue_cmd cmd)
 
static int ecore_queue_comp_cmd (struct bxe_softc *sc, struct ecore_queue_sp_obj *o, enum ecore_queue_cmd cmd)
 
static void ecore_q_fill_setup_data_e2 (struct bxe_softc *sc, struct ecore_queue_state_params *cmd_params, struct client_init_ramrod_data *data)
 
static void ecore_q_fill_init_general_data (struct bxe_softc *sc, struct ecore_queue_sp_obj *o, struct ecore_general_setup_params *params, struct client_init_general_data *gen_data, unsigned long *flags)
 
static void ecore_q_fill_init_tx_data (struct ecore_queue_sp_obj *o, struct ecore_txq_setup_params *params, struct client_init_tx_data *tx_data, unsigned long *flags)
 
static void ecore_q_fill_init_pause_data (struct ecore_queue_sp_obj *o, struct rxq_pause_params *params, struct client_init_rx_data *rx_data)
 
static void ecore_q_fill_init_rx_data (struct ecore_queue_sp_obj *o, struct ecore_rxq_setup_params *params, struct client_init_rx_data *rx_data, unsigned long *flags)
 
static void ecore_q_fill_setup_data_cmn (struct bxe_softc *sc, struct ecore_queue_state_params *cmd_params, struct client_init_ramrod_data *data)
 
static void ecore_q_fill_setup_tx_only (struct bxe_softc *sc, struct ecore_queue_state_params *cmd_params, struct tx_queue_init_ramrod_data *data)
 
static int ecore_q_init (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_setup_e1x (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_setup_e2 (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_setup_tx_only (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static void ecore_q_fill_update_data (struct bxe_softc *sc, struct ecore_queue_sp_obj *obj, struct ecore_queue_update_params *params, struct client_update_ramrod_data *data)
 
static int ecore_q_send_update (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_deactivate (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_activate (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static void ecore_q_fill_update_tpa_data (struct bxe_softc *sc, struct ecore_queue_sp_obj *obj, struct ecore_queue_update_tpa_params *params, struct tpa_update_ramrod_data *data)
 
static int ecore_q_send_update_tpa (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_halt (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_cfc_del (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_terminate (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_q_send_empty (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_queue_send_cmd_cmn (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_queue_send_cmd_e1x (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_queue_send_cmd_e2 (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
static int ecore_queue_chk_transition (struct bxe_softc *sc, struct ecore_queue_sp_obj *o, struct ecore_queue_state_params *params)
 
static int ecore_queue_chk_fwd_transition (struct bxe_softc *sc, struct ecore_queue_sp_obj *o, struct ecore_queue_state_params *params)
 
void ecore_init_queue_obj (struct bxe_softc *sc, struct ecore_queue_sp_obj *obj, uint8_t cl_id, uint32_t *cids, uint8_t cid_cnt, uint8_t func_id, void *rdata, ecore_dma_addr_t rdata_mapping, unsigned long type)
 
int ecore_get_q_logical_state (struct bxe_softc *sc, struct ecore_queue_sp_obj *obj)
 
enum ecore_func_state ecore_func_get_state (struct bxe_softc *sc, struct ecore_func_sp_obj *o)
 
static int ecore_func_wait_comp (struct bxe_softc *sc, struct ecore_func_sp_obj *o, enum ecore_func_cmd cmd)
 
static int ecore_func_state_change_comp (struct bxe_softc *sc, struct ecore_func_sp_obj *o, enum ecore_func_cmd cmd)
 
static int ecore_func_comp_cmd (struct bxe_softc *sc, struct ecore_func_sp_obj *o, enum ecore_func_cmd cmd)
 
static int ecore_func_chk_transition (struct bxe_softc *sc, struct ecore_func_sp_obj *o, struct ecore_func_state_params *params)
 
static int ecore_func_init_func (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static int ecore_func_init_port (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static int ecore_func_init_cmn_chip (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static int ecore_func_init_cmn (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static int ecore_func_hw_init (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static void ecore_func_reset_func (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static void ecore_func_reset_port (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static void ecore_func_reset_cmn (struct bxe_softc *sc, const struct ecore_func_sp_drv_ops *drv)
 
static int ecore_func_hw_reset (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_start (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_switch_update (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_afex_update (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_afex_viflists (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_stop (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_tx_stop (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_tx_start (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_set_timesync (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
static int ecore_func_send_cmd (struct bxe_softc *sc, struct ecore_func_state_params *params)
 
void ecore_init_func_obj (struct bxe_softc *sc, struct ecore_func_sp_obj *obj, void *rdata, ecore_dma_addr_t rdata_mapping, void *afex_rdata, ecore_dma_addr_t afex_rdata_mapping, struct ecore_func_sp_drv_ops *drv_iface)
 
int ecore_func_state_change (struct bxe_softc *sc, struct ecore_func_state_params *params)
 

Macro Definition Documentation

◆ ECORE_57711_SET_MC_FILTER

#define ECORE_57711_SET_MC_FILTER (   filter,
  bit 
)
Value:
do { \
(filter)[(bit) >> 5] |= (1 << ((bit) & 0x1f)); \
} while (0)

Definition at line 3510 of file ecore_sp.c.

◆ ECORE_CAM_SIZE_EMUL

#define ECORE_CAM_SIZE_EMUL   5

◆ list_next_entry

#define list_next_entry (   pos,
  member 
)     list_entry((pos)->member.next, typeof(*(pos)), member)

Definition at line 1359 of file ecore_sp.c.

Function Documentation

◆ __atomic_add_ifless()

static bool __atomic_add_ifless ( ecore_atomic_t v,
int  a,
int  u 
)
inlinestatic

atomic_add_ifless - add if the result is less than a given value.

@v: pointer of type ecore_atomic_t : the amount to add to v... @u: ...if (v + a) is less than u.

returns TRUE if (v + a) was less than u, and FALSE otherwise.

Definition at line 4189 of file ecore_sp.c.

References ECORE_ATOMIC_CMPXCHG, ECORE_ATOMIC_READ, ECORE_LIKELY, and ECORE_UNLIKELY.

Referenced by ecore_credit_pool_put().

Here is the caller graph for this function:

◆ __atomic_dec_ifmoe()

static bool __atomic_dec_ifmoe ( ecore_atomic_t v,
int  a,
int  u 
)
inlinestatic

atomic_dec_ifmoe - dec if the result is more or equal than a given value.

@v: pointer of type ecore_atomic_t : the amount to dec from v... @u: ...if (v - a) is more or equal than u.

returns TRUE if (v - a) was more or equal than u, and FALSE otherwise.

Definition at line 4217 of file ecore_sp.c.

References ECORE_ATOMIC_CMPXCHG, ECORE_ATOMIC_READ, ECORE_LIKELY, and ECORE_UNLIKELY.

Referenced by ecore_credit_pool_get().

Here is the caller graph for this function:

◆ __ecore_exe_queue_reset_pending()

static void __ecore_exe_queue_reset_pending ( struct bxe_softc sc,
struct ecore_exe_queue_obj o 
)
inlinestatic

Definition at line 153 of file ecore_sp.c.

References ecore_exe_queue_free_elem(), ECORE_LIST_FIRST_ENTRY, ECORE_LIST_IS_EMPTY, ECORE_LIST_REMOVE_ENTRY, ecore_exeq_elem::link, and ecore_exe_queue_obj::pending_comp.

Referenced by ecore_complete_vlan_mac(), and ecore_exe_queue_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ecore_vlan_mac_execute_step()

static int __ecore_vlan_mac_execute_step ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
unsigned long *  ramrod_flags 
)
static

Calling function should not diffrentiate between this case and the case in which there is already a pending ramrod

Definition at line 1760 of file ecore_sp.c.

References __ecore_vlan_mac_h_pend(), __ecore_vlan_mac_h_write_trylock(), ecore_exe_queue_step(), ECORE_MSG, ECORE_PENDING, ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ECORE_SUCCESS, ecore_vlan_mac_obj::exe_queue, and ecore_exe_queue_obj::lock.

Referenced by ecore_complete_vlan_mac(), and ecore_config_vlan_mac().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_exec_pending()

static void __ecore_vlan_mac_h_exec_pending ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

__ecore_vlan_mac_h_exec_pending - execute step instead of a previous step which wasn't able to run due to a taken lock on vlan mac head list.

@sc: device handle @o: vlan_mac object

Should be called under execution queue lock; notice it might release and reclaim it during its run.

Definition at line 471 of file ecore_sp.c.

References ECORE_ERR, ecore_exe_queue_step(), ECORE_MSG, ECORE_PENDING, ECORE_SUCCESS, ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::head_exe_request, and ecore_vlan_mac_obj::saved_ramrod_flags.

Referenced by __ecore_vlan_mac_h_write_unlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_pend()

static void __ecore_vlan_mac_h_pend ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
unsigned long  ramrod_flags 
)
static

__ecore_vlan_mac_h_pend - Pend an execution step which couldn't have been called due to vlan mac head list lock being taken.

@sc: device handle @o: vlan_mac object @ramrod_flags: ramrod flags of missed execution

Should be called under execution queue lock.

Definition at line 501 of file ecore_sp.c.

References ECORE_MSG, ecore_vlan_mac_obj::head_exe_request, and ecore_vlan_mac_obj::saved_ramrod_flags.

Referenced by __ecore_vlan_mac_execute_step().

Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_read_lock()

static int __ecore_vlan_mac_h_read_lock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

__ecore_vlan_mac_h_read_lock - lock the vlan mac head list reader lock

@sc: device handle @o: vlan_mac object

Should be called under the execution queue lock. May sleep. May release and reclaim execution queue lock during its run.

Definition at line 559 of file ecore_sp.c.

References ECORE_MSG, ECORE_SUCCESS, and ecore_vlan_mac_obj::head_reader.

Referenced by ecore_vlan_mac_h_read_lock().

Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_read_unlock()

static void __ecore_vlan_mac_h_read_unlock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

__ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock

@sc: device handle @o: vlan_mac object

Should be called under execution queue lock. Notice if a pending execution exists, it would be performed if this was the last reader. possibly releasing and reclaiming the execution queue lock.

Definition at line 600 of file ecore_sp.c.

References __ecore_vlan_mac_h_write_unlock(), ECORE_ERR, ECORE_MSG, ecore_vlan_mac_obj::head_exe_request, and ecore_vlan_mac_obj::head_reader.

Referenced by ecore_vlan_mac_h_read_unlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_write_trylock()

static int __ecore_vlan_mac_h_write_trylock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

__ecore_vlan_mac_h_write_trylock - try getting the writer lock on vlan mac head list.

@sc: device handle @o: vlan_mac object

: Non-blocking implementation; should be called under execution queue lock.

Definition at line 449 of file ecore_sp.c.

References ECORE_BUSY, ECORE_MSG, ECORE_SUCCESS, and ecore_vlan_mac_obj::head_reader.

Referenced by __ecore_vlan_mac_execute_step().

Here is the caller graph for this function:

◆ __ecore_vlan_mac_h_write_unlock()

static void __ecore_vlan_mac_h_write_unlock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

__ecore_vlan_mac_h_write_unlock - unlock the vlan mac head list writer lock

@sc: device handle @o: vlan_mac object

Should be called under execution queue lock. Notice if a pending execution exists, it would perform it - possibly releasing and reclaiming the execution queue lock.

Definition at line 521 of file ecore_sp.c.

References __ecore_vlan_mac_h_exec_pending(), ECORE_MSG, and ecore_vlan_mac_obj::head_exe_request.

Referenced by __ecore_vlan_mac_h_read_unlock(), and ecore_vlan_mac_h_write_unlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ __storm_memset_mac_filters()

static void __storm_memset_mac_filters ( struct bxe_softc sc,
struct tstorm_eth_mac_filter_config mac_filters,
uint16_t  pf_id 
)
inlinestatic

Definition at line 2528 of file ecore_sp.c.

References addr, BAR_TSTRORM_INTMEM, ecore_storm_memset_struct(), size, and TSTORM_MAC_FILTER_CONFIG_OFFSET.

Referenced by ecore_set_rx_mode_e1x().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_check_mac_add()

◆ ecore_check_mac_del()

◆ ecore_check_move()

static bool ecore_check_move ( struct bxe_softc sc,
struct ecore_vlan_mac_obj src_o,
struct ecore_vlan_mac_obj dst_o,
union ecore_classification_ramrod_data data 
)
static

Definition at line 845 of file ecore_sp.c.

References ecore_vlan_mac_obj::check_add, and ecore_vlan_mac_obj::check_del.

Referenced by ecore_init_mac_obj(), ecore_init_vlan_mac_obj(), ecore_init_vlan_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_check_move_always_err()

static bool ecore_check_move_always_err ( struct bxe_softc sc,
struct ecore_vlan_mac_obj src_o,
struct ecore_vlan_mac_obj dst_o,
union ecore_classification_ramrod_data data 
)
static

Definition at line 870 of file ecore_sp.c.

Referenced by ecore_init_mac_obj(), and ecore_init_vlan_mac_obj().

Here is the caller graph for this function:

◆ ecore_check_vlan_add()

static int ecore_check_vlan_add ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
union ecore_classification_ramrod_data data 
)
static

◆ ecore_check_vlan_del()

static struct ecore_vlan_mac_registry_elem * ecore_check_vlan_del ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
union ecore_classification_ramrod_data data 
)
static

◆ ecore_check_vlan_mac_add()

◆ ecore_check_vlan_mac_del()

◆ ecore_check_vxlan_fltr_add()

◆ ecore_check_vxlan_fltr_del()

◆ ecore_complete_vlan_mac()

static int ecore_complete_vlan_mac ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
union event_ring_elem cqe,
unsigned long *  ramrod_flags 
)
static

ecore_complete_vlan_mac - complete one VLAN-MAC ramrod

@sc: device handle @o: ecore_vlan_mac_obj @cqe: @cont: if TRUE schedule next execution chunk

Definition at line 1795 of file ecore_sp.c.

References __ecore_exe_queue_reset_pending(), __ecore_vlan_mac_execute_step(), ecore_raw_obj::clear_pending, ecore_exe_queue_empty(), ECORE_INVAL, ECORE_PENDING, ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ECORE_SUCCESS, ECORE_TEST_BIT, event_ring_msg::error, ecore_vlan_mac_obj::exe_queue, ecore_exe_queue_obj::lock, event_ring_elem::message, RAMROD_CONT, and ecore_vlan_mac_obj::raw.

Referenced by ecore_init_vlan_mac_common().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_config_mcast()

int ecore_config_mcast ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
enum ecore_mcast_cmd  cmd 
)

ecore_config_mcast - Configure multicast MACs list.

@cmd: command to execute: BNX2X_MCAST_CMD_X

May configure a new list provided in p->mcast_list (ECORE_MCAST_CMD_ADD), clean up (ECORE_MCAST_CMD_DEL) or restore (ECORE_MCAST_CMD_RESTORE) a current configuration, continue to execute the pending commands (ECORE_MCAST_CMD_CONT).

If previous command is still pending or if number of MACs to configure is more that maximum number of MACs in one command, the current command will be enqueued to the tail of the pending commands list.

Return: 0 is operation was successful and there are no pending completions, negative if there were errors, positive if there are pending completions.

Definition at line 4003 of file ecore_sp.c.

References ecore_raw_obj::check_pending, ecore_mcast_obj::check_sched, ecore_raw_obj::clear_pending, ecore_mcast_obj::config_mcast, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_mcast_obj::enqueue_cmd, ecore_mcast_obj::get_registry_size, ecore_mcast_obj::max_cmd_len, ecore_mcast_ramrod_params::mcast_list_len, ecore_mcast_ramrod_params::mcast_obj, RAMROD_COMP_WAIT, ecore_mcast_ramrod_params::ramrod_flags, ecore_mcast_obj::raw, ecore_mcast_obj::revert, ecore_raw_obj::set_pending, ecore_mcast_obj::total_pending_num, ecore_mcast_obj::validate, and ecore_mcast_obj::wait_comp.

Referenced by bxe_chip_cleanup(), bxe_handle_mcast_eqe(), bxe_set_mc_list(), and bxe_squeeze_objects().

Here is the caller graph for this function:

◆ ecore_config_rss()

int ecore_config_rss ( struct bxe_softc sc,
struct ecore_config_rss_params p 
)

ecore_config_rss - Updates RSS configuration according to provided parameters

Return: 0 in case of success

Definition at line 4587 of file ecore_sp.c.

References ecore_raw_obj::clear_pending, ecore_rss_config_obj::config_rss, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, RAMROD_COMP_WAIT, RAMROD_DRV_CLR_ONLY, ecore_config_rss_params::ramrod_flags, ecore_rss_config_obj::raw, ecore_config_rss_params::rss_obj, ecore_raw_obj::set_pending, and ecore_raw_obj::wait_comp.

Referenced by bxe_config_rss_pf().

Here is the caller graph for this function:

◆ ecore_config_rx_mode()

int ecore_config_rx_mode ( struct bxe_softc sc,
struct ecore_rx_mode_ramrod_params p 
)

ecore_config_rx_mode - Send and RX_MODE ramrod according to the provided parameters.

: Command parameters

Return: 0 - if operation was successful and there is no pending completions, positive number - if there are pending completions, negative - if there were errors

Definition at line 2793 of file ecore_sp.c.

References ecore_rx_mode_obj::config_rx_mode, ECORE_TEST_BIT, RAMROD_COMP_WAIT, ecore_rx_mode_ramrod_params::ramrod_flags, ecore_rx_mode_ramrod_params::rx_mode_obj, and ecore_rx_mode_obj::wait_comp.

Referenced by bxe_set_q_rx_mode().

Here is the caller graph for this function:

◆ ecore_config_vlan_mac()

◆ ecore_credit_pool_always_TRUE()

static bool ecore_credit_pool_always_TRUE ( struct ecore_credit_pool_obj o,
int  cnt 
)
static

Definition at line 4270 of file ecore_sp.c.

Referenced by ecore_init_credit_pool().

Here is the caller graph for this function:

◆ ecore_credit_pool_check()

static int ecore_credit_pool_check ( struct ecore_credit_pool_obj o)
static

Definition at line 4260 of file ecore_sp.c.

References ecore_credit_pool_obj::credit, ECORE_ATOMIC_READ, and ECORE_SMP_MB.

Referenced by ecore_init_credit_pool().

Here is the caller graph for this function:

◆ ecore_credit_pool_get()

static bool ecore_credit_pool_get ( struct ecore_credit_pool_obj o,
int  cnt 
)
static

Definition at line 4235 of file ecore_sp.c.

References __atomic_dec_ifmoe(), ecore_credit_pool_obj::credit, and ECORE_SMP_MB.

Referenced by ecore_init_credit_pool().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_credit_pool_get_entry()

static bool ecore_credit_pool_get_entry ( struct ecore_credit_pool_obj o,
int *  offset 
)
static

◆ ecore_credit_pool_get_entry_always_TRUE()

static bool ecore_credit_pool_get_entry_always_TRUE ( struct ecore_credit_pool_obj o,
int *  offset 
)
static

Definition at line 4331 of file ecore_sp.c.

References offset.

Referenced by ecore_init_credit_pool().

Here is the caller graph for this function:

◆ ecore_credit_pool_put()

static bool ecore_credit_pool_put ( struct ecore_credit_pool_obj o,
int  cnt 
)
static

Definition at line 4246 of file ecore_sp.c.

References __atomic_add_ifless(), ecore_credit_pool_obj::credit, ECORE_SMP_MB, and ecore_credit_pool_obj::pool_sz.

Referenced by ecore_init_credit_pool().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_credit_pool_put_entry()

static bool ecore_credit_pool_put_entry ( struct ecore_credit_pool_obj o,
int  offset 
)
static

Definition at line 4306 of file ecore_sp.c.

References ecore_credit_pool_obj::base_pool_offset, BIT_VEC64_SET_BIT, offset, ecore_credit_pool_obj::pool_mirror, and ecore_credit_pool_obj::pool_sz.

Referenced by ecore_init_credit_pool().

Here is the caller graph for this function:

◆ ecore_credit_pool_put_entry_always_TRUE()

static bool ecore_credit_pool_put_entry_always_TRUE ( struct ecore_credit_pool_obj o,
int  offset 
)
static

Definition at line 4324 of file ecore_sp.c.

Referenced by ecore_init_credit_pool().

Here is the caller graph for this function:

◆ ecore_empty_rx_mode_wait()

static int ecore_empty_rx_mode_wait ( struct bxe_softc sc,
struct ecore_rx_mode_ramrod_params p 
)
static

Definition at line 2786 of file ecore_sp.c.

References ECORE_SUCCESS.

Referenced by ecore_init_rx_mode_obj().

Here is the caller graph for this function:

◆ ecore_exe_queue_add()

static int ecore_exe_queue_add ( struct bxe_softc sc,
struct ecore_exe_queue_obj o,
struct ecore_exeq_elem elem,
bool  restore 
)
inlinestatic

ecore_exe_queue_add - add a new element to the execution queue

@sc: driver handle @o: queue @cmd: new command to add @restore: true - do not optimize the command

If the element is optimized or is illegal, frees it.

Definition at line 115 of file ecore_sp.c.

References ecore_exe_queue_free_elem(), ECORE_LIST_PUSH_TAIL, ECORE_MSG, ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ECORE_SUCCESS, ecore_exe_queue_obj::exe_queue, ecore_exeq_elem::link, ecore_exe_queue_obj::lock, ecore_exe_queue_obj::optimize, ecore_exe_queue_obj::owner, and ecore_exe_queue_obj::validate.

Referenced by ecore_vlan_mac_push_new_cmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_exe_queue_alloc_elem()

static struct ecore_exeq_elem * ecore_exe_queue_alloc_elem ( struct bxe_softc sc)
inlinestatic

Definition at line 255 of file ecore_sp.c.

References ECORE_MSG, and ECORE_ZALLOC.

Referenced by ecore_vlan_mac_push_new_cmd().

Here is the caller graph for this function:

◆ ecore_exe_queue_empty()

static bool ecore_exe_queue_empty ( struct ecore_exe_queue_obj o)
inlinestatic

Definition at line 245 of file ecore_sp.c.

References ECORE_LIST_IS_EMPTY, ecore_exe_queue_obj::exe_queue, and ecore_exe_queue_obj::pending_comp.

Referenced by ecore_complete_vlan_mac(), ecore_config_vlan_mac(), and ecore_wait_vlan_mac().

Here is the caller graph for this function:

◆ ecore_exe_queue_free_elem()

static void ecore_exe_queue_free_elem ( struct bxe_softc sc,
struct ecore_exeq_elem elem 
)
inlinestatic

Definition at line 82 of file ecore_sp.c.

References ECORE_FREE, and ECORE_MSG.

Referenced by __ecore_exe_queue_reset_pending(), ecore_exe_queue_add(), ecore_optimize_vlan_mac(), and ecore_vlan_mac_del_all().

Here is the caller graph for this function:

◆ ecore_exe_queue_init()

static void ecore_exe_queue_init ( struct bxe_softc sc,
struct ecore_exe_queue_obj o,
int  exe_len,
union ecore_qable_obj owner,
exe_q_validate  validate,
exe_q_remove  remove,
exe_q_optimize  optimize,
exe_q_execute  exec,
exe_q_get  get 
)
inlinestatic

ecore_exe_queue_init - init the Exe Queue object

@o: pointer to the object @exe_len: length @owner: pointer to the owner @validate: validate function pointer @optimize: optimize function pointer @exec: execute function pointer @get: get function pointer

Definition at line 51 of file ecore_sp.c.

References ECORE_LIST_INIT, ECORE_MEMSET, ECORE_MSG, ECORE_SPIN_LOCK_INIT, ecore_exe_queue_obj::exe_chunk_len, ecore_exe_queue_obj::exe_queue, ecore_exe_queue_obj::execute, ecore_exe_queue_obj::get, ecore_exe_queue_obj::lock, ecore_exe_queue_obj::optimize, ecore_exe_queue_obj::owner, ecore_exe_queue_obj::pending_comp, ecore_exe_queue_obj::remove, and ecore_exe_queue_obj::validate.

Referenced by ecore_init_mac_obj(), ecore_init_vlan_mac_obj(), ecore_init_vlan_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_exe_queue_length()

static int ecore_exe_queue_length ( struct ecore_exe_queue_obj o)
inlinestatic

Definition at line 89 of file ecore_sp.c.

References ECORE_LIST_FOR_EACH_ENTRY, ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ecore_exe_queue_obj::exe_queue, ecore_exeq_elem::link, and ecore_exe_queue_obj::lock.

Referenced by ecore_config_vlan_mac().

Here is the caller graph for this function:

◆ ecore_exe_queue_step()

static int ecore_exe_queue_step ( struct bxe_softc sc,
struct ecore_exe_queue_obj o,
unsigned long *  ramrod_flags 
)
inlinestatic

ecore_exe_queue_step - execute one execution chunk atomically

@sc: driver handle @o: queue @ramrod_flags: flags

(Should be called while holding the exe_queue->lock).

Definition at line 178 of file ecore_sp.c.

References __ecore_exe_queue_reset_pending(), ecore_exeq_elem::cmd_len, ECORE_DBG_BREAK_IF, ECORE_LIST_FIRST_ENTRY, ECORE_LIST_IS_EMPTY, ECORE_LIST_PUSH_TAIL, ECORE_LIST_REMOVE_ENTRY, ECORE_LIST_SPLICE_INIT, ECORE_MEMSET, ECORE_MSG, ECORE_PENDING, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_exe_queue_obj::exe_chunk_len, ecore_exe_queue_obj::exe_queue, ecore_exe_queue_obj::execute, ecore_exeq_elem::link, ecore_exe_queue_obj::owner, ecore_exe_queue_obj::pending_comp, and RAMROD_DRV_CLR_ONLY.

Referenced by __ecore_vlan_mac_execute_step(), and __ecore_vlan_mac_h_exec_pending().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_execute_vlan_mac()

◆ ecore_exeq_get_mac()

static struct ecore_exeq_elem * ecore_exeq_get_mac ( struct ecore_exe_queue_obj o,
struct ecore_exeq_elem elem 
)
static

◆ ecore_exeq_get_vlan()

static struct ecore_exeq_elem * ecore_exeq_get_vlan ( struct ecore_exe_queue_obj o,
struct ecore_exeq_elem elem 
)
static

◆ ecore_exeq_get_vlan_mac()

static struct ecore_exeq_elem * ecore_exeq_get_vlan_mac ( struct ecore_exe_queue_obj o,
struct ecore_exeq_elem elem 
)
static

◆ ecore_exeq_get_vxlan_fltr()

static struct ecore_exeq_elem * ecore_exeq_get_vxlan_fltr ( struct ecore_exe_queue_obj o,
struct ecore_exeq_elem elem 
)
static

◆ ecore_func_chk_transition()

static int ecore_func_chk_transition ( struct bxe_softc sc,
struct ecore_func_sp_obj o,
struct ecore_func_state_params params 
)
static

ecore_func_chk_transition - perform function state machine transition

@sc: device handle @o: @params:

It both checks if the requested command is legal in a current state and, if it's legal, sets a ‘next_state’ in the object that will be used in the completion flow to set the ‘state’ of the object.

returns 0 if a requested command is a legal transition, ECORE_INVAL otherwise.

Definition at line 5899 of file ecore_sp.c.

References ecore_func_state_params::cmd, ECORE_BUSY, ECORE_ERR, ECORE_F_CMD_AFEX_UPDATE, ECORE_F_CMD_AFEX_VIFLISTS, ECORE_F_CMD_HW_INIT, ECORE_F_CMD_HW_RESET, ECORE_F_CMD_SET_TIMESYNC, ECORE_F_CMD_START, ECORE_F_CMD_STOP, ECORE_F_CMD_SWITCH_UPDATE, ECORE_F_CMD_TX_START, ECORE_F_CMD_TX_STOP, ECORE_F_STATE_INITIALIZED, ECORE_F_STATE_MAX, ECORE_F_STATE_RESET, ECORE_F_STATE_STARTED, ECORE_F_STATE_TX_STOPPED, ECORE_INVAL, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, next_state, ecore_func_sp_obj::next_state, ecore_func_sp_obj::pending, RAMROD_DRV_CLR_ONLY, and ecore_func_state_params::ramrod_flags.

Referenced by ecore_init_func_obj().

Here is the caller graph for this function:

◆ ecore_func_comp_cmd()

static int ecore_func_comp_cmd ( struct bxe_softc sc,
struct ecore_func_sp_obj o,
enum ecore_func_cmd  cmd 
)
static

ecore_func_comp_cmd - complete the state change command

@sc: device handle @o: @cmd:

Checks that the arrived completion is expected.

Definition at line 5873 of file ecore_sp.c.

References ecore_func_state_change_comp().

Referenced by ecore_init_func_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_get_state()

enum ecore_func_state ecore_func_get_state ( struct bxe_softc sc,
struct ecore_func_sp_obj o 
)

Definition at line 5801 of file ecore_sp.c.

References ECORE_F_STATE_MAX, and ecore_func_sp_obj::pending.

Referenced by bxe_func_wait_started().

Here is the caller graph for this function:

◆ ecore_func_hw_init()

◆ ecore_func_hw_reset()

◆ ecore_func_init_cmn()

static int ecore_func_init_cmn ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_init_cmn - performs HW init at common stage

@sc: device handle @drv:

Init HW when the current phase is FW_MSG_CODE_DRV_LOAD_COMMON_CHIP: initialize COMMON, PORT-only and FUNCTION-only HW blocks.

Definition at line 6062 of file ecore_sp.c.

References ecore_func_init_port(), and ecore_func_sp_drv_ops::init_hw_cmn.

Referenced by ecore_func_hw_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_init_cmn_chip()

static int ecore_func_init_cmn_chip ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_init_cmn_chip - performs HW init at chip-common stage

@sc: device handle @drv:

Init HW when the current phase is FW_MSG_CODE_DRV_LOAD_COMMON_CHIP: initialize COMMON_CHIP, PORT-only and FUNCTION-only HW blocks.

Definition at line 6042 of file ecore_sp.c.

References ecore_func_init_port(), and ecore_func_sp_drv_ops::init_hw_cmn_chip.

Referenced by ecore_func_hw_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_init_func()

static int ecore_func_init_func ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_init_func - performs HW init at function stage

@sc: device handle @drv:

Init HW when the current phase is FW_MSG_CODE_DRV_LOAD_FUNCTION: initialize only FUNCTION-only HW blocks.

Definition at line 6005 of file ecore_sp.c.

References ecore_func_sp_drv_ops::init_hw_func.

Referenced by ecore_func_hw_init(), and ecore_func_init_port().

Here is the caller graph for this function:

◆ ecore_func_init_port()

static int ecore_func_init_port ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_init_port - performs HW init at port stage

@sc: device handle @drv:

Init HW when the current phase is FW_MSG_CODE_DRV_LOAD_PORT: initialize PORT-only and FUNCTION-only HW blocks.

Definition at line 6022 of file ecore_sp.c.

References ecore_func_init_func(), and ecore_func_sp_drv_ops::init_hw_port.

Referenced by ecore_func_hw_init(), ecore_func_init_cmn(), and ecore_func_init_cmn_chip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_reset_cmn()

static void ecore_func_reset_cmn ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_reset_cmn - reser HW at common stage

@sc: device handle @drv:

Reset HW at FW_MSG_CODE_DRV_UNLOAD_COMMON and FW_MSG_CODE_DRV_UNLOAD_COMMON_CHIP stages: reset COMMON, COMMON_CHIP, FUNCTION-only and PORT-only HW blocks.

Definition at line 6185 of file ecore_sp.c.

References ecore_func_reset_port(), and ecore_func_sp_drv_ops::reset_hw_cmn.

Referenced by ecore_func_hw_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_reset_func()

static void ecore_func_reset_func ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_reset_func - reset HW at function stage

@sc: device handle @drv:

Reset HW at FW_MSG_CODE_DRV_UNLOAD_FUNCTION stage: reset only FUNCTION-only HW blocks.

Definition at line 6147 of file ecore_sp.c.

References ecore_func_sp_drv_ops::reset_hw_func.

Referenced by ecore_func_hw_reset(), and ecore_func_reset_port().

Here is the caller graph for this function:

◆ ecore_func_reset_port()

static void ecore_func_reset_port ( struct bxe_softc sc,
const struct ecore_func_sp_drv_ops drv 
)
inlinestatic

ecore_func_reset_port - reser HW at port stage

@sc: device handle @drv:

Reset HW at FW_MSG_CODE_DRV_UNLOAD_PORT stage: reset FUNCTION-only and PORT-only HW blocks.

            !!!IMPORTANT!!!

It's important to call reset_port before reset_func() as the last thing reset_func does is pf_disable() thus disabling PGLUE_B, which makes impossible any DMAE transactions.

Definition at line 6168 of file ecore_sp.c.

References ecore_func_reset_func(), and ecore_func_sp_drv_ops::reset_hw_port.

Referenced by ecore_func_hw_reset(), and ecore_func_reset_cmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_send_afex_update()

◆ ecore_func_send_afex_viflists()

◆ ecore_func_send_cmd()

◆ ecore_func_send_set_timesync()

◆ ecore_func_send_start()

static int ecore_func_send_start ( struct bxe_softc sc,
struct ecore_func_state_params params 
)
inlinestatic

◆ ecore_func_send_stop()

static int ecore_func_send_stop ( struct bxe_softc sc,
struct ecore_func_state_params params 
)
inlinestatic

Definition at line 6443 of file ecore_sp.c.

References ecore_sp_post, NONE_CONNECTION_TYPE, and RAMROD_CMD_ID_COMMON_FUNCTION_STOP.

Referenced by ecore_func_send_cmd().

Here is the caller graph for this function:

◆ ecore_func_send_switch_update()

static int ecore_func_send_switch_update ( struct bxe_softc sc,
struct ecore_func_state_params params 
)
inlinestatic

Definition at line 6289 of file ecore_sp.c.

References function_update_data::echo, ECORE_CPU_TO_LE16, ECORE_F_UPDATE_SD_VLAN_ETH_TYPE_CHNG, ECORE_F_UPDATE_SD_VLAN_TAG_CHNG, ECORE_F_UPDATE_TUNNEL_CFG_CHNG, ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GENEVE, ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GRE, ECORE_F_UPDATE_TUNNEL_INNER_CLSS_VXLAN, ECORE_F_UPDATE_TUNNEL_INNER_RSS, ECORE_F_UPDATE_TX_SWITCH_SUSPEND, ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG, ECORE_F_UPDATE_VLAN_FORCE_PRIO_CHNG, ECORE_F_UPDATE_VLAN_FORCE_PRIO_FLAG, ECORE_MEMSET, ecore_sp_post, ECORE_TEST_BIT, ecore_func_state_params::f_obj, function_update_data::geneve_dst_port, function_update_data::inner_clss_l2geneve, function_update_data::inner_clss_l2gre, function_update_data::inner_clss_vxlan, function_update_data::inner_rss, NONE_CONNECTION_TYPE, ecore_func_state_params::params, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, ecore_func_sp_obj::rdata, ecore_func_sp_obj::rdata_mapping, function_update_data::sd_vlan_eth_type, function_update_data::sd_vlan_eth_type_change_flg, function_update_data::sd_vlan_force_pri_change_flg, function_update_data::sd_vlan_force_pri_flg, function_update_data::sd_vlan_tag, function_update_data::sd_vlan_tag_change_flg, SWITCH_UPDATE, ecore_func_state_params::switch_update, function_update_data::tx_switch_suspend, function_update_data::tx_switch_suspend_change_flg, function_update_data::update_tunn_cfg_flg, and function_update_data::vxlan_dst_port.

Referenced by ecore_func_send_cmd().

Here is the caller graph for this function:

◆ ecore_func_send_tx_start()

◆ ecore_func_send_tx_stop()

static int ecore_func_send_tx_stop ( struct bxe_softc sc,
struct ecore_func_state_params params 
)
inlinestatic

Definition at line 6450 of file ecore_sp.c.

References ecore_sp_post, NONE_CONNECTION_TYPE, and RAMROD_CMD_ID_COMMON_STOP_TRAFFIC.

Referenced by ecore_func_send_cmd().

Here is the caller graph for this function:

◆ ecore_func_state_change()

int ecore_func_state_change ( struct bxe_softc sc,
struct ecore_func_state_params params 
)

ecore_func_state_change - perform Function state change transition

@sc: device handle @params: parameters to perform the transaction

returns 0 in case of successfully completed transition, negative error code in case of failure, positive (EBUSY) value if there is a completion to that is still pending (possible only if RAMROD_COMP_WAIT is not set in params->ramrod_flags for asynchronous commands).

Definition at line 6588 of file ecore_sp.c.

References ecore_func_sp_obj::check_transition, ecore_func_state_params::cmd, ECORE_BUSY, ECORE_CLEAR_BIT, ECORE_ERR, ECORE_F_STATE_MAX, ecore_func_state_change_comp(), ECORE_MSLEEP, ECORE_MUTEX_LOCK, ECORE_MUTEX_UNLOCK, ECORE_RET_PENDING, ECORE_SET_BIT, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_func_state_params::f_obj, ecore_func_sp_obj::next_state, ecore_func_sp_obj::one_pending_mutex, ecore_func_sp_obj::pending, RAMROD_COMP_WAIT, RAMROD_DRV_CLR_ONLY, ecore_func_state_params::ramrod_flags, RAMROD_RETRY, ecore_func_sp_obj::send_cmd, and ecore_func_sp_obj::wait_comp.

Referenced by bxe_func_start(), bxe_func_stop(), bxe_func_wait_started(), bxe_init_hw(), and bxe_reset_hw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_func_state_change_comp()

static int ecore_func_state_change_comp ( struct bxe_softc sc,
struct ecore_func_sp_obj o,
enum ecore_func_cmd  cmd 
)
inlinestatic

ecore_func_state_change_comp - complete the state machine transition

@sc: device handle @o: @cmd:

Called on state change transition. Completes the state machine transition only - no HW interaction.

Definition at line 5833 of file ecore_sp.c.

References ECORE_CLEAR_BIT, ECORE_ERR, ECORE_F_STATE_MAX, ECORE_FUNC_ID, ECORE_INVAL, ECORE_MSG, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SUCCESS, ECORE_TEST_AND_CLEAR_BIT, ecore_func_sp_obj::next_state, and ecore_func_sp_obj::pending.

Referenced by ecore_func_comp_cmd(), and ecore_func_state_change().

Here is the caller graph for this function:

◆ ecore_func_wait_comp()

static int ecore_func_wait_comp ( struct bxe_softc sc,
struct ecore_func_sp_obj o,
enum ecore_func_cmd  cmd 
)
static

Definition at line 5816 of file ecore_sp.c.

References ecore_state_wait(), and ecore_func_sp_obj::pending.

Referenced by ecore_init_func_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_get_cam_offset_mac()

static bool ecore_get_cam_offset_mac ( struct ecore_vlan_mac_obj o,
int *  offset 
)
static

Definition at line 343 of file ecore_sp.c.

References ECORE_DBG_BREAK_IF, ecore_credit_pool_obj::get_entry, ecore_vlan_mac_obj::macs_pool, and offset.

Referenced by ecore_init_mac_obj(), ecore_init_vlan_mac_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_get_cam_offset_vlan()

static bool ecore_get_cam_offset_vlan ( struct ecore_vlan_mac_obj o,
int *  offset 
)
static

Definition at line 361 of file ecore_sp.c.

References ECORE_DBG_BREAK_IF, ecore_credit_pool_obj::get_entry, offset, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_obj().

Here is the caller graph for this function:

◆ ecore_get_credit_mac()

static bool ecore_get_credit_mac ( struct ecore_vlan_mac_obj o)
static

Definition at line 352 of file ecore_sp.c.

References ECORE_DBG_BREAK_IF, ecore_credit_pool_obj::get, and ecore_vlan_mac_obj::macs_pool.

Referenced by ecore_init_mac_obj().

Here is the caller graph for this function:

◆ ecore_get_credit_vlan()

static bool ecore_get_credit_vlan ( struct ecore_vlan_mac_obj o)
static

Definition at line 370 of file ecore_sp.c.

References ECORE_DBG_BREAK_IF, ecore_credit_pool_obj::get, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_obj().

Here is the caller graph for this function:

◆ ecore_get_credit_vlan_mac()

static bool ecore_get_credit_vlan_mac ( struct ecore_vlan_mac_obj o)
static

Definition at line 379 of file ecore_sp.c.

References ecore_credit_pool_obj::get, ecore_vlan_mac_obj::macs_pool, ecore_credit_pool_obj::put, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_mac_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_get_fw_mac_addr()

static void ecore_get_fw_mac_addr ( uint16_t *  fw_hi,
uint16_t *  fw_mid,
uint16_t *  fw_lo,
uint8_t *  mac 
)
inlinestatic

ecore_get_fw_mac_addr - revert the ecore_set_fw_mac_addr().

@fw_hi: @fw_mid: @fw_lo: @mac:

Definition at line 3831 of file ecore_sp.c.

References ecore_mcast_config_data::mac.

Referenced by ecore_mcast_refresh_registry_e1().

Here is the caller graph for this function:

◆ ecore_get_n_elements()

static int ecore_get_n_elements ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
int  n,
uint8_t *  base,
uint8_t  stride,
uint8_t  size 
)
static

ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock

@sc: device handle @o: vlan_mac object
: number of elements to get @base: base address for element placement @stride: stride between elements (in bytes)

Definition at line 652 of file ecore_sp.c.

References ECORE_ERR, ECORE_LIST_FOR_EACH_ENTRY, ECORE_MEMCPY, ECORE_MSG, ECORE_SUCCESS, ecore_vlan_mac_h_read_lock(), ecore_vlan_mac_h_read_unlock(), ETH_ALEN, ecore_vlan_mac_obj::head, ecore_vlan_mac_registry_elem::link, size, and ecore_vlan_mac_registry_elem::u.

Referenced by ecore_init_mac_obj(), and ecore_init_vlan_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_get_q_logical_state()

◆ ecore_get_rss_ind_table()

void ecore_get_rss_ind_table ( struct ecore_rss_config_obj rss_obj,
uint8_t *  ind_table 
)

ecore_get_rss_ind_table - Return the current ind_table configuration.

@ind_table: buffer to fill with the current indirection table content. Should be at least T_ETH_INDIRECTION_TABLE_SIZE bytes long.

Definition at line 4581 of file ecore_sp.c.

References ECORE_MEMCPY, and ecore_rss_config_obj::ind_table.

◆ ecore_init_credit_pool()

void ecore_init_credit_pool ( struct ecore_credit_pool_obj p,
int  base,
int  credit 
)

ecore_init_credit_pool - initialize credit pool internals.

: @base: Base entry in the CAM to use. @credit: pool size.

If base is negative no CAM entries handling will be performed. If credit is negative pool operations will always succeed (unlimited pool).

Definition at line 4349 of file ecore_sp.c.

References ecore_credit_pool_obj::base_pool_offset, ecore_credit_pool_obj::check, ecore_credit_pool_obj::credit, ECORE_ATOMIC_SET, ecore_credit_pool_always_TRUE(), ecore_credit_pool_check(), ecore_credit_pool_get(), ecore_credit_pool_get_entry(), ecore_credit_pool_get_entry_always_TRUE(), ecore_credit_pool_put(), ecore_credit_pool_put_entry(), ecore_credit_pool_put_entry_always_TRUE(), ECORE_MEMSET, ECORE_SMP_MB, ecore_credit_pool_obj::get, ecore_credit_pool_obj::get_entry, ecore_credit_pool_obj::pool_mirror, ecore_credit_pool_obj::pool_sz, ecore_credit_pool_obj::put, and ecore_credit_pool_obj::put_entry.

Referenced by ecore_init_mac_credit_pool(), and ecore_init_vlan_credit_pool().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_func_obj()

◆ ecore_init_mac_credit_pool()

void ecore_init_mac_credit_pool ( struct bxe_softc sc,
struct ecore_credit_pool_obj p,
uint8_t  func_id,
uint8_t  func_num 
)

Definition at line 4391 of file ecore_sp.c.

References CHIP_IS_E1, CHIP_IS_E1H, CHIP_REV_IS_SLOW, ECORE_CAM_SIZE_EMUL, ecore_init_credit_pool(), ECORE_MAX_EMUL_MULTI, ECORE_MAX_MULTICAST, ecore_raw_obj::func_id, MAX_MAC_CREDIT_E1, MAX_MAC_CREDIT_E1H, and PF_MAC_CREDIT_E2.

Referenced by bxe_init_objs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_mac_obj()

◆ ecore_init_mcast_obj()

void ecore_init_mcast_obj ( struct bxe_softc sc,
struct ecore_mcast_obj mcast_obj,
uint8_t  mcast_cl_id,
uint32_t  mcast_cid,
uint8_t  func_id,
uint8_t  engine_id,
void *  rdata,
ecore_dma_addr_t  rdata_mapping,
int  state,
unsigned long *  pstate,
ecore_obj_type  type 
)

Definition at line 4093 of file ecore_sp.c.

References ecore_mcast_obj::check_pending, ecore_mcast_obj::check_sched, CHIP_IS_E1, CHIP_IS_E1H, CHIP_REV_IS_SLOW, ecore_mcast_obj::clear_sched, ecore_mcast_obj::config_mcast, ECORE_FILTER_MCAST_SCHED, ecore_init_raw_obj(), ECORE_LIST_INIT, ECORE_MAX_EMUL_MULTI, ECORE_MAX_MULTICAST, ecore_mcast_check_pending(), ecore_mcast_check_sched(), ecore_mcast_clear_sched(), ecore_mcast_enqueue_cmd(), ecore_mcast_get_registry_size_aprox(), ecore_mcast_get_registry_size_exact(), ecore_mcast_handle_restore_cmd_e1(), ecore_mcast_handle_restore_cmd_e2(), ecore_mcast_revert_e1(), ecore_mcast_revert_e1h(), ecore_mcast_revert_e2(), ecore_mcast_set_one_rule_e1(), ecore_mcast_set_one_rule_e2(), ecore_mcast_set_registry_size_aprox(), ecore_mcast_set_registry_size_exact(), ecore_mcast_set_sched(), ecore_mcast_setup_e1(), ecore_mcast_setup_e1h(), ecore_mcast_setup_e2(), ecore_mcast_validate_e1(), ecore_mcast_validate_e1h(), ecore_mcast_validate_e2(), ecore_mcast_wait(), ECORE_MEMSET, ecore_mcast_obj::engine_id, ecore_mcast_obj::enqueue_cmd, ecore_mcast_obj::exact_match, ecore_raw_obj::func_id, ecore_mcast_obj::get_registry_size, ecore_mcast_obj::hdl_restore, ecore_mcast_obj::macs, ecore_mcast_obj::max_cmd_len, ecore_mcast_obj::pending_cmds_head, ecore_raw_obj::pstate, ecore_mcast_obj::raw, ecore_raw_obj::rdata, ecore_raw_obj::rdata_mapping, ecore_mcast_obj::registry, ecore_mcast_obj::revert, ecore_mcast_obj::sched_state, ecore_mcast_obj::set_one_rule, ecore_mcast_obj::set_registry_size, ecore_mcast_obj::set_sched, ecore_raw_obj::state, ecore_mcast_obj::validate, and ecore_mcast_obj::wait_comp.

Referenced by bxe_init_objs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_queue_obj()

◆ ecore_init_raw_obj()

static void ecore_init_raw_obj ( struct ecore_raw_obj raw,
uint8_t  cl_id,
uint32_t  cid,
uint8_t  func_id,
void *  rdata,
ecore_dma_addr_t  rdata_mapping,
int  state,
unsigned long *  pstate,
ecore_obj_type  type 
)
inlinestatic

◆ ecore_init_rss_config_obj()

void ecore_init_rss_config_obj ( struct bxe_softc sc,
struct ecore_rss_config_obj rss_obj,
uint8_t  cl_id,
uint32_t  cid,
uint8_t  func_id,
uint8_t  engine_id,
void *  rdata,
ecore_dma_addr_t  rdata_mapping,
int  state,
unsigned long *  pstate,
ecore_obj_type  type 
)

◆ ecore_init_rx_mode_obj()

void ecore_init_rx_mode_obj ( struct bxe_softc sc,
struct ecore_rx_mode_obj o 
)

Definition at line 2813 of file ecore_sp.c.

References CHIP_IS_E1x, ecore_rx_mode_obj::config_rx_mode, ecore_empty_rx_mode_wait(), ecore_set_rx_mode_e1x(), ecore_set_rx_mode_e2(), ecore_wait_rx_mode_comp_e2(), and ecore_rx_mode_obj::wait_comp.

Referenced by bxe_init_objs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_vlan_credit_pool()

void ecore_init_vlan_credit_pool ( struct bxe_softc sc,
struct ecore_credit_pool_obj p,
uint8_t  func_id,
uint8_t  func_num 
)

Definition at line 4445 of file ecore_sp.c.

References CHIP_IS_E1x, ecore_init_credit_pool(), and PF_VLAN_CREDIT_E2.

Referenced by bxe_init_objs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_vlan_mac_common()

static void ecore_init_vlan_mac_common ( struct ecore_vlan_mac_obj o,
uint8_t  cl_id,
uint32_t  cid,
uint8_t  func_id,
void *  rdata,
ecore_dma_addr_t  rdata_mapping,
int  state,
unsigned long *  pstate,
ecore_obj_type  type,
struct ecore_credit_pool_obj macs_pool,
struct ecore_credit_pool_obj vlans_pool 
)
inlinestatic

◆ ecore_init_vlan_mac_obj()

◆ ecore_init_vlan_obj()

◆ ecore_init_vxlan_fltr_obj()

◆ ecore_mcast_bin_from_mac()

static uint8_t ecore_mcast_bin_from_mac ( uint8_t *  mac)
inlinestatic

Definition at line 2826 of file ecore_sp.c.

References ECORE_CRC32_LE(), and ETH_ALEN.

Referenced by ecore_mcast_hdl_add_e1h(), and ecore_mcast_set_one_rule_e2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_check_pending()

static bool ecore_mcast_check_pending ( struct ecore_mcast_obj o)
static

Definition at line 4088 of file ecore_sp.c.

References ecore_raw_obj::check_pending, ecore_mcast_obj::check_sched, and ecore_mcast_obj::raw.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_check_sched()

static bool ecore_mcast_check_sched ( struct ecore_mcast_obj o)
static

Definition at line 4083 of file ecore_sp.c.

References ECORE_TEST_BIT, ecore_raw_obj::pstate, ecore_mcast_obj::raw, and ecore_mcast_obj::sched_state.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_clear_first_bin()

static int ecore_mcast_clear_first_bin ( struct ecore_mcast_obj o)
inlinestatic

ecore_mcast_clear_first_bin - find the first set bin and clear it

@o:

returns the index of the found bin or -1 if none is found

Definition at line 2972 of file ecore_sp.c.

References ecore_mcast_obj::aprox_match, BIT_VEC64_CLEAR_BIT, ecore_mcast_get_next_bin(), ecore_mcast_obj::registry, and ecore_mcast_obj::vec.

Referenced by ecore_mcast_set_one_rule_e2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_clear_sched()

static void ecore_mcast_clear_sched ( struct ecore_mcast_obj o)
static

Definition at line 4069 of file ecore_sp.c.

References ECORE_CLEAR_BIT, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SMP_MB_BEFORE_CLEAR_BIT, ecore_raw_obj::pstate, ecore_mcast_obj::raw, and ecore_mcast_obj::sched_state.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_enqueue_cmd()

◆ ecore_mcast_get_next_bin()

static int ecore_mcast_get_next_bin ( struct ecore_mcast_obj o,
int  last 
)
inlinestatic

ecore_mcast_get_next_bin - get the next set bin (index)

@o: @last: index to start looking from (including)

returns the next found (set) bin or a negative value if none is found.

Definition at line 2945 of file ecore_sp.c.

References ecore_mcast_obj::aprox_match, BIT_VEC64_ELEM_SZ, BIT_VEC64_TEST_BIT, ECORE_MCAST_VEC_SZ, ecore_mcast_obj::registry, and ecore_mcast_obj::vec.

Referenced by ecore_mcast_clear_first_bin(), ecore_mcast_handle_restore_cmd_e2(), and ecore_mcast_hdl_restore_e1h().

Here is the caller graph for this function:

◆ ecore_mcast_get_registry_size_aprox()

static int ecore_mcast_get_registry_size_aprox ( struct ecore_mcast_obj o)
static

Definition at line 3986 of file ecore_sp.c.

References ecore_mcast_obj::aprox_match, ecore_mcast_obj::num_bins_set, and ecore_mcast_obj::registry.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_get_registry_size_exact()

static int ecore_mcast_get_registry_size_exact ( struct ecore_mcast_obj o)
static

Definition at line 3981 of file ecore_sp.c.

References ecore_mcast_obj::exact_match, ecore_mcast_obj::num_macs_set, and ecore_mcast_obj::registry.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_get_rx_tx_flag()

static uint8_t ecore_mcast_get_rx_tx_flag ( struct ecore_mcast_obj o)
inlinestatic

◆ ecore_mcast_handle_current_cmd()

static int ecore_mcast_handle_current_cmd ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
enum ecore_mcast_cmd  cmd,
int  start_cnt 
)
inlinestatic

ecore_mcast_handle_current_cmd -

@sc: device handle : @cmd: @start_cnt: first line in the ramrod data that may be used

This function is called iff there is enough place for the current command in the ramrod data. Returns number of lines filled in the ramrod data in total.

Definition at line 3269 of file ecore_sp.c.

References ECORE_ERR, ECORE_INVAL, ECORE_MCAST_CMD_ADD, ECORE_MCAST_CMD_DEL, ECORE_MCAST_CMD_RESTORE, ecore_mcast_hdl_add(), ecore_mcast_hdl_del(), ECORE_MSG, ecore_mcast_obj::hdl_restore, ecore_mcast_ramrod_params::mcast_list_len, and ecore_mcast_ramrod_params::mcast_obj.

Referenced by ecore_mcast_setup_e1(), and ecore_mcast_setup_e2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_handle_pending_cmds_e1()

◆ ecore_mcast_handle_pending_cmds_e2()

◆ ecore_mcast_handle_restore_cmd_e1()

static int ecore_mcast_handle_restore_cmd_e1 ( struct bxe_softc sc,
struct ecore_mcast_obj o,
int  start_idx,
int *  rdata_idx 
)
inlinestatic

ecore_mcast_handle_restore_cmd_e1 - restore command for 57710

@sc: device handle @o: @start_idx: index in the registry to start from @rdata_idx: index in the ramrod data to start from

restore command for 57710 is like all other commands - always a stand alone command - start_idx and rdata_idx will always be 0. This function will always succeed. returns -1 to comply with 57712 variant.

Definition at line 3747 of file ecore_sp.c.

References ECORE_LIST_FOR_EACH_ENTRY, ECORE_MCAST_CMD_RESTORE, ECORE_MSG, ecore_mcast_obj::exact_match, ecore_mcast_mac_elem::mac, ecore_mcast_config_data::mac, ecore_mcast_obj::macs, ecore_mcast_obj::registry, and ecore_mcast_obj::set_one_rule.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_handle_restore_cmd_e2()

static int ecore_mcast_handle_restore_cmd_e2 ( struct bxe_softc sc,
struct ecore_mcast_obj o,
int  start_bin,
int *  rdata_idx 
)
inlinestatic

ecore_mcast_handle_restore_cmd_e2 - restore configuration from the registry

@sc: device handle @o: @start_bin: index in the registry to start from (including) @rdata_idx: index in the ramrod data to start from

returns last handled bin index or -1 if all bins have been handled

Definition at line 3060 of file ecore_sp.c.

References ecore_mcast_config_data::bin, ECORE_MCAST_CMD_RESTORE, ecore_mcast_get_next_bin(), ECORE_MSG, ecore_mcast_obj::max_cmd_len, and ecore_mcast_obj::set_one_rule.

Referenced by ecore_init_mcast_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_hdl_add()

static void ecore_mcast_hdl_add ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_mcast_ramrod_params p,
int *  line_idx 
)
inlinestatic

◆ ecore_mcast_hdl_add_e1h()

static void ecore_mcast_hdl_add_e1h ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_mcast_ramrod_params p,
uint32_t *  mc_filter 
)
inlinestatic

◆ ecore_mcast_hdl_del()

static void ecore_mcast_hdl_del ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_mcast_ramrod_params p,
int *  line_idx 
)
inlinestatic

Definition at line 3239 of file ecore_sp.c.

References ECORE_MCAST_CMD_DEL, ECORE_MSG, ecore_mcast_ramrod_params::mcast_list_len, and ecore_mcast_obj::set_one_rule.

Referenced by ecore_mcast_handle_current_cmd().

Here is the caller graph for this function:

◆ ecore_mcast_hdl_pending_add_e2()

◆ ecore_mcast_hdl_pending_del_e2()

static void ecore_mcast_hdl_pending_del_e2 ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_pending_mcast_cmd cmd_pos,
int *  line_idx 
)
inlinestatic

◆ ecore_mcast_hdl_pending_restore_e2()

static void ecore_mcast_hdl_pending_restore_e2 ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_pending_mcast_cmd cmd_pos,
int *  line_idx 
)
inlinestatic

Definition at line 3157 of file ecore_sp.c.

References ecore_pending_mcast_cmd::data, ecore_pending_mcast_cmd::done, ecore_mcast_obj::hdl_restore, and ecore_pending_mcast_cmd::next_bin.

Referenced by ecore_mcast_handle_pending_cmds_e2().

Here is the caller graph for this function:

◆ ecore_mcast_hdl_restore_e1h()

static void ecore_mcast_hdl_restore_e1h ( struct bxe_softc sc,
struct ecore_mcast_obj o,
struct ecore_mcast_ramrod_params p,
uint32_t *  mc_filter 
)
inlinestatic

Definition at line 3537 of file ecore_sp.c.

References ECORE_57711_SET_MC_FILTER, ecore_mcast_get_next_bin(), and ECORE_MSG.

Referenced by ecore_mcast_setup_e1h().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_refresh_registry_e1()

static int ecore_mcast_refresh_registry_e1 ( struct bxe_softc sc,
struct ecore_mcast_obj o 
)
inlinestatic

ecore_mcast_refresh_registry_e1 -

@sc: device handle @cnt:

Check the ramrod data first entry flag to see if it's a DELETE or ADD command and update the registry correspondingly: if ADD - allocate a memory and add the entries to the registry (list), if DELETE - clear the registry and free the memory.

Definition at line 3853 of file ecore_sp.c.

References mac_configuration_cmd::config_table, ECORE_CALLOC, ECORE_ERR, ECORE_FREE, ECORE_GET_FLAG, ecore_get_fw_mac_addr(), ECORE_LIST_FIRST_ENTRY, ECORE_LIST_INIT, ECORE_LIST_IS_EMPTY, ECORE_LIST_PUSH_TAIL, ECORE_MSG, ECORE_NOMEM, ECORE_SUCCESS, ecore_mcast_obj::exact_match, mac_configuration_entry::flags, mac_configuration_cmd::hdr, mac_configuration_hdr::length, ecore_mcast_mac_elem::link, mac_configuration_entry::lsb_mac_addr, ecore_mcast_mac_elem::mac, MAC_CONFIGURATION_ENTRY_ACTION_TYPE, ecore_mcast_obj::macs, mac_configuration_entry::middle_mac_addr, mac_configuration_entry::msb_mac_addr, ecore_mcast_obj::raw, ecore_raw_obj::rdata, and ecore_mcast_obj::registry.

Referenced by ecore_mcast_setup_e1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_mcast_refresh_registry_e2()

static int ecore_mcast_refresh_registry_e2 ( struct bxe_softc sc,
struct ecore_mcast_obj o 
)
inlinestatic

ecore_mcast_refresh_registry_e2 - recalculate the actual number of set bins

@sc: device handle @o:

Recalculate the actual number of set bins in the registry using Brian Kernighan's algorithm: it's execution complexity is as a number of set bins.

returns 0 for the compliance with ecore_mcast_refresh_registry_e1().

Definition at line 3390 of file ecore_sp.c.

References ecore_mcast_obj::aprox_match, ECORE_MCAST_VEC_SZ, ECORE_SUCCESS, ecore_mcast_obj::registry, ecore_mcast_obj::set_registry_size, and ecore_mcast_obj::vec.

Referenced by ecore_mcast_setup_e2().

Here is the caller graph for this function:

◆ ecore_mcast_revert_e1()

static void ecore_mcast_revert_e1 ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
int  old_num_macs 
)
static

◆ ecore_mcast_revert_e1h()

static void ecore_mcast_revert_e1h ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
int  old_num_bins 
)
static

Definition at line 3503 of file ecore_sp.c.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_revert_e2()

static void ecore_mcast_revert_e2 ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
int  old_num_bins 
)
static

◆ ecore_mcast_set_one_rule_e1()

◆ ecore_mcast_set_one_rule_e2()

◆ ecore_mcast_set_rdata_hdr_e1()

static void ecore_mcast_set_rdata_hdr_e1 ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
uint8_t  len 
)
inlinestatic

◆ ecore_mcast_set_rdata_hdr_e2()

static void ecore_mcast_set_rdata_hdr_e2 ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
uint8_t  len 
)
inlinestatic

ecore_mcast_set_rdata_hdr_e2 - sets a header values

@sc: device handle : @len: number of rules to handle

Definition at line 3365 of file ecore_sp.c.

References ecore_raw_obj::cid, eth_classify_header::echo, ECORE_CPU_TO_LE32, ECORE_FILTER_MCAST_PENDING, ECORE_SWCID_MASK, ECORE_SWCID_SHIFT, eth_multicast_rules_ramrod_data::header, ecore_mcast_ramrod_params::mcast_obj, ecore_mcast_obj::raw, ecore_raw_obj::rdata, and eth_classify_header::rule_cnt.

Referenced by ecore_mcast_setup_e2().

Here is the caller graph for this function:

◆ ecore_mcast_set_registry_size_aprox()

static void ecore_mcast_set_registry_size_aprox ( struct ecore_mcast_obj o,
int  n 
)
static

Definition at line 3997 of file ecore_sp.c.

References ecore_mcast_obj::aprox_match, ecore_mcast_obj::num_bins_set, and ecore_mcast_obj::registry.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_set_registry_size_exact()

static void ecore_mcast_set_registry_size_exact ( struct ecore_mcast_obj o,
int  n 
)
static

Definition at line 3991 of file ecore_sp.c.

References ecore_mcast_obj::exact_match, ecore_mcast_obj::num_macs_set, and ecore_mcast_obj::registry.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_set_sched()

static void ecore_mcast_set_sched ( struct ecore_mcast_obj o)
static

Definition at line 4076 of file ecore_sp.c.

References ECORE_SET_BIT, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SMP_MB_BEFORE_CLEAR_BIT, ecore_raw_obj::pstate, ecore_mcast_obj::raw, and ecore_mcast_obj::sched_state.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_setup_e1()

◆ ecore_mcast_setup_e1h()

◆ ecore_mcast_setup_e2()

◆ ecore_mcast_validate_e1()

◆ ecore_mcast_validate_e1h()

static int ecore_mcast_validate_e1h ( struct bxe_softc sc,
struct ecore_mcast_ramrod_params p,
enum ecore_mcast_cmd  cmd 
)
static

Definition at line 3492 of file ecore_sp.c.

References ECORE_MCAST_CMD_DEL, ECORE_MCAST_CMD_RESTORE, ECORE_SUCCESS, and ecore_mcast_ramrod_params::mcast_list_len.

Referenced by ecore_init_mcast_obj().

Here is the caller graph for this function:

◆ ecore_mcast_validate_e2()

◆ ecore_mcast_wait()

static int ecore_mcast_wait ( struct bxe_softc sc,
struct ecore_mcast_obj o 
)
static

Definition at line 2854 of file ecore_sp.c.

References ecore_state_wait(), ECORE_SUCCESS, ECORE_TIMEOUT, ecore_raw_obj::pstate, ecore_mcast_obj::raw, ecore_mcast_obj::sched_state, and ecore_raw_obj::wait_comp.

Referenced by ecore_init_mcast_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_optimize_vlan_mac()

◆ ecore_put_cam_offset_mac()

static bool ecore_put_cam_offset_mac ( struct ecore_vlan_mac_obj o,
int  offset 
)
static

Definition at line 395 of file ecore_sp.c.

References ecore_vlan_mac_obj::macs_pool, offset, and ecore_credit_pool_obj::put_entry.

Referenced by ecore_init_mac_obj(), ecore_init_vlan_mac_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_put_cam_offset_vlan()

static bool ecore_put_cam_offset_vlan ( struct ecore_vlan_mac_obj o,
int  offset 
)
static

Definition at line 409 of file ecore_sp.c.

References offset, ecore_credit_pool_obj::put_entry, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_obj().

Here is the caller graph for this function:

◆ ecore_put_credit_mac()

static bool ecore_put_credit_mac ( struct ecore_vlan_mac_obj o)
static

Definition at line 402 of file ecore_sp.c.

References ecore_vlan_mac_obj::macs_pool, and ecore_credit_pool_obj::put.

Referenced by ecore_init_mac_obj().

Here is the caller graph for this function:

◆ ecore_put_credit_vlan()

static bool ecore_put_credit_vlan ( struct ecore_vlan_mac_obj o)
static

Definition at line 416 of file ecore_sp.c.

References ecore_credit_pool_obj::put, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_obj().

Here is the caller graph for this function:

◆ ecore_put_credit_vlan_mac()

static bool ecore_put_credit_vlan_mac ( struct ecore_vlan_mac_obj o)
static

Definition at line 423 of file ecore_sp.c.

References ecore_credit_pool_obj::get, ecore_vlan_mac_obj::macs_pool, ecore_credit_pool_obj::put, and ecore_vlan_mac_obj::vlans_pool.

Referenced by ecore_init_vlan_mac_obj(), and ecore_init_vxlan_fltr_obj().

Here is the caller graph for this function:

◆ ecore_q_fill_init_general_data()

◆ ecore_q_fill_init_pause_data()

◆ ecore_q_fill_init_rx_data()

static void ecore_q_fill_init_rx_data ( struct ecore_queue_sp_obj o,
struct ecore_rxq_setup_params params,
struct client_init_rx_data rx_data,
unsigned long *  flags 
)
static

Definition at line 4869 of file ecore_sp.c.

References client_init_rx_data::approx_mcast_engine_id, client_init_rx_data::bd_page_base, ecore_rxq_setup_params::buf_sz, client_init_rx_data::cache_line_alignment_log_size, ecore_rxq_setup_params::cache_line_log, ecore_rxq_setup_params::cl_qzone_id, CLIENT_INIT_RX_DATA_MCAST_DROP_ALL, CLIENT_INIT_RX_DATA_TPA_EN_IPV4, CLIENT_INIT_RX_DATA_TPA_MODE, CLIENT_INIT_RX_DATA_UCAST_DROP_ALL, client_init_rx_data::client_qzone_id, client_init_rx_data::cqe_page_base, client_init_rx_data::drop_ip_cs_err_flg, client_init_rx_data::drop_tcp_cs_err_flg, client_init_rx_data::drop_ttl0_flg, client_init_rx_data::drop_udp_cs_err_flg, ecore_rxq_setup_params::dscr_map, ECORE_CPU_TO_LE16, ECORE_CPU_TO_LE32, ECORE_Q_FLG_DHC, ECORE_Q_FLG_LEADING_RSS, ECORE_Q_FLG_MCAST, ECORE_Q_FLG_OOO, ECORE_Q_FLG_OV, ECORE_Q_FLG_SILENT_VLAN_REM, ECORE_Q_FLG_TPA, ECORE_Q_FLG_TPA_GRO, ECORE_Q_FLG_VLAN, ECORE_TEST_BIT, client_init_rx_data::enable_dynamic_hc, client_init_rx_data::extra_data_over_sgl_en_flg, flags, ecore_rxq_setup_params::fw_sb_id, regpair_t::hi, client_init_rx_data::inner_vlan_removal_enable_flg, client_init_rx_data::is_approx_mcast, client_init_rx_data::is_leading_rss, regpair_t::lo, client_init_rx_data::max_agg_size, client_init_rx_data::max_bytes_on_bd, client_init_rx_data::max_sges_for_packet, ecore_rxq_setup_params::max_sges_pkt, client_init_rx_data::max_tpa_queues, ecore_rxq_setup_params::max_tpa_queues, ecore_rxq_setup_params::mcast_engine_id, client_init_rx_data::outer_vlan_removal_enable_flg, ecore_rxq_setup_params::rcq_map, client_init_rx_data::rss_engine_id, ecore_rxq_setup_params::rss_engine_id, client_init_rx_data::rx_sb_index_number, ecore_rxq_setup_params::sb_cq_index, ecore_rxq_setup_params::sge_buf_sz, client_init_rx_data::sge_buff_size, ecore_rxq_setup_params::sge_map, client_init_rx_data::sge_page_base, ecore_rxq_setup_params::silent_removal_mask, ecore_rxq_setup_params::silent_removal_value, client_init_rx_data::silent_vlan_mask, client_init_rx_data::silent_vlan_removal_flg, client_init_rx_data::silent_vlan_value, client_init_rx_data::state, client_init_rx_data::status_block_id, ecore_rxq_setup_params::tpa_agg_sz, client_init_rx_data::tpa_en, U64_HI, U64_LO, and client_init_rx_data::vmqueue_mode_en_flg.

Referenced by ecore_q_fill_setup_data_cmn().

Here is the caller graph for this function:

◆ ecore_q_fill_init_tx_data()

◆ ecore_q_fill_setup_data_cmn()

◆ ecore_q_fill_setup_data_e2()

static void ecore_q_fill_setup_data_e2 ( struct bxe_softc sc,
struct ecore_queue_state_params cmd_params,
struct client_init_ramrod_data data 
)
static

◆ ecore_q_fill_setup_tx_only()

◆ ecore_q_fill_update_data()

static void ecore_q_fill_update_data ( struct bxe_softc sc,
struct ecore_queue_sp_obj obj,
struct ecore_queue_update_params params,
struct client_update_ramrod_data data 
)
static

Definition at line 5146 of file ecore_sp.c.

References client_update_ramrod_data::activate_change_flg, client_update_ramrod_data::activate_flg, client_update_ramrod_data::anti_spoofing_change_flg, client_update_ramrod_data::anti_spoofing_enable_flg, ecore_queue_sp_obj::cl_id, client_update_ramrod_data::client_id, ecore_queue_update_params::def_vlan, client_update_ramrod_data::default_vlan, client_update_ramrod_data::default_vlan_change_flg, client_update_ramrod_data::default_vlan_enable_flg, ECORE_CPU_TO_LE16, ECORE_Q_UPDATE_ACTIVATE, ECORE_Q_UPDATE_ACTIVATE_CHNG, ECORE_Q_UPDATE_ANTI_SPOOF, ECORE_Q_UPDATE_ANTI_SPOOF_CHNG, ECORE_Q_UPDATE_DEF_VLAN_EN, ECORE_Q_UPDATE_DEF_VLAN_EN_CHNG, ECORE_Q_UPDATE_IN_VLAN_REM, ECORE_Q_UPDATE_IN_VLAN_REM_CHNG, ECORE_Q_UPDATE_OUT_VLAN_REM, ECORE_Q_UPDATE_OUT_VLAN_REM_CHNG, ECORE_Q_UPDATE_PTP_PKTS, ECORE_Q_UPDATE_PTP_PKTS_CHNG, ECORE_Q_UPDATE_SILENT_VLAN_REM, ECORE_Q_UPDATE_SILENT_VLAN_REM_CHNG, ECORE_Q_UPDATE_TX_SWITCHING, ECORE_Q_UPDATE_TX_SWITCHING_CHNG, ECORE_TEST_BIT, client_update_ramrod_data::func_id, ecore_queue_sp_obj::func_id, client_update_ramrod_data::handle_ptp_pkts_change_flg, client_update_ramrod_data::handle_ptp_pkts_flg, client_update_ramrod_data::inner_vlan_removal_change_flg, client_update_ramrod_data::inner_vlan_removal_enable_flg, client_update_ramrod_data::outer_vlan_removal_change_flg, client_update_ramrod_data::outer_vlan_removal_enable_flg, ecore_queue_update_params::silent_removal_mask, ecore_queue_update_params::silent_removal_value, client_update_ramrod_data::silent_vlan_change_flg, client_update_ramrod_data::silent_vlan_mask, client_update_ramrod_data::silent_vlan_removal_flg, client_update_ramrod_data::silent_vlan_value, client_update_ramrod_data::tx_switching_change_flg, client_update_ramrod_data::tx_switching_flg, and ecore_queue_update_params::update_flags.

Referenced by ecore_q_send_update().

Here is the caller graph for this function:

◆ ecore_q_fill_update_tpa_data()

static void ecore_q_fill_update_tpa_data ( struct bxe_softc sc,
struct ecore_queue_sp_obj obj,
struct ecore_queue_update_tpa_params params,
struct tpa_update_ramrod_data data 
)
static

◆ ecore_q_init()

◆ ecore_q_send_activate()

static int ecore_q_send_activate ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

ecore_q_send_activate - send ACTIVATE command

@sc: device handle @params:

implemented using the UPDATE command.

Definition at line 5290 of file ecore_sp.c.

References ECORE_MEMSET, ecore_q_send_update(), ECORE_Q_UPDATE_ACTIVATE, ECORE_Q_UPDATE_ACTIVATE_CHNG, ECORE_SET_BIT_NA, ecore_queue_state_params::params, ecore_queue_state_params::update, and ecore_queue_update_params::update_flags.

Referenced by ecore_queue_send_cmd_cmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_q_send_cfc_del()

◆ ecore_q_send_deactivate()

static int ecore_q_send_deactivate ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

ecore_q_send_deactivate - send DEACTIVATE command

@sc: device handle @params:

implemented using the UPDATE command.

Definition at line 5270 of file ecore_sp.c.

References ECORE_MEMSET, ecore_q_send_update(), ECORE_Q_UPDATE_ACTIVATE_CHNG, ECORE_SET_BIT_NA, ecore_queue_state_params::params, ecore_queue_state_params::update, and ecore_queue_update_params::update_flags.

Referenced by ecore_queue_send_cmd_cmn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_q_send_empty()

static int ecore_q_send_empty ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

Definition at line 5416 of file ecore_sp.c.

References ecore_queue_sp_obj::cids, ECORE_PRIMARY_CID_INDEX, ecore_sp_post, ETH_CONNECTION_TYPE, ecore_queue_state_params::q_obj, and RAMROD_CMD_ID_ETH_EMPTY.

Referenced by ecore_queue_send_cmd_cmn().

Here is the caller graph for this function:

◆ ecore_q_send_halt()

static int ecore_q_send_halt ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

◆ ecore_q_send_setup_e1x()

static int ecore_q_send_setup_e1x ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

◆ ecore_q_send_setup_e2()

static int ecore_q_send_setup_e2 ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
inlinestatic

◆ ecore_q_send_setup_tx_only()

◆ ecore_q_send_terminate()

◆ ecore_q_send_update()

◆ ecore_q_send_update_tpa()

◆ ecore_queue_chk_fwd_transition()

static int ecore_queue_chk_fwd_transition ( struct bxe_softc sc,
struct ecore_queue_sp_obj o,
struct ecore_queue_state_params params 
)
static

ecore_queue_chk_fwd_transition - check state machine of a Forwarding Queue.

@sc: device handle @o: @params:

It both checks if the requested command is legal in a current state and, if it's legal, sets a ‘next_state’ in the object that will be used in the completion flow to set the ‘state’ of the object.

returns 0 if a requested command is a legal transition, ECORE_INVAL otherwise.

Definition at line 5699 of file ecore_sp.c.

References ecore_queue_state_params::cmd, ECORE_ERR, ECORE_INVAL, ECORE_MSG, ECORE_Q_CMD_CFC_DEL, ECORE_Q_CMD_INIT, ECORE_Q_CMD_SETUP_TX_ONLY, ECORE_Q_FLG_ACTIVE, ECORE_Q_STATE_ACTIVE, ECORE_Q_STATE_INACTIVE, ECORE_Q_STATE_INITIALIZED, ECORE_Q_STATE_MAX, ECORE_Q_STATE_RESET, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_queue_setup_tx_only_params::flags, next_state, ecore_queue_sp_obj::next_state, ecore_queue_state_params::params, and ecore_queue_state_params::tx_only.

Referenced by ecore_init_queue_obj().

Here is the caller graph for this function:

◆ ecore_queue_chk_transition()

static int ecore_queue_chk_transition ( struct bxe_softc sc,
struct ecore_queue_sp_obj o,
struct ecore_queue_state_params params 
)
static

ecore_queue_chk_transition - check state machine of a regular Queue

@sc: device handle @o: @params:

(not Forwarding) It both checks if the requested command is legal in a current state and, if it's legal, sets a ‘next_state’ in the object that will be used in the completion flow to set the ‘state’ of the object.

returns 0 if a requested command is a legal transition, ECORE_INVAL otherwise.

Definition at line 5518 of file ecore_sp.c.

References ecore_queue_state_params::cmd, ECORE_BUSY, ECORE_ERR, ECORE_INVAL, ECORE_MSG, ECORE_Q_CMD_ACTIVATE, ECORE_Q_CMD_CFC_DEL, ECORE_Q_CMD_DEACTIVATE, ECORE_Q_CMD_EMPTY, ECORE_Q_CMD_HALT, ECORE_Q_CMD_INIT, ECORE_Q_CMD_SETUP, ECORE_Q_CMD_SETUP_TX_ONLY, ECORE_Q_CMD_TERMINATE, ECORE_Q_CMD_UPDATE, ECORE_Q_CMD_UPDATE_TPA, ECORE_Q_FLG_ACTIVE, ECORE_Q_STATE_ACTIVE, ECORE_Q_STATE_INACTIVE, ECORE_Q_STATE_INITIALIZED, ECORE_Q_STATE_MAX, ECORE_Q_STATE_MCOS_TERMINATED, ECORE_Q_STATE_MULTI_COS, ECORE_Q_STATE_RESET, ECORE_Q_STATE_STOPPED, ECORE_Q_STATE_TERMINATED, ECORE_Q_UPDATE_ACTIVATE, ECORE_Q_UPDATE_ACTIVATE_CHNG, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_queue_setup_params::flags, next_state, ecore_queue_sp_obj::next_state, ecore_queue_sp_obj::next_tx_only, ecore_queue_sp_obj::num_tx_only, ecore_queue_state_params::params, ecore_queue_sp_obj::pending, RAMROD_DRV_CLR_ONLY, ecore_queue_state_params::ramrod_flags, ecore_queue_state_params::setup, ecore_queue_state_params::update, and ecore_queue_update_params::update_flags.

Referenced by ecore_init_queue_obj().

Here is the caller graph for this function:

◆ ecore_queue_comp_cmd()

static int ecore_queue_comp_cmd ( struct bxe_softc sc,
struct ecore_queue_sp_obj o,
enum ecore_queue_cmd  cmd 
)
static

ecore_queue_comp_cmd - complete the state change command.

@sc: device handle @o: @cmd:

Checks that the arrived completion is expected.

Definition at line 4722 of file ecore_sp.c.

References ecore_queue_sp_obj::cids, ECORE_CLEAR_BIT, ECORE_ERR, ECORE_INVAL, ECORE_MSG, ECORE_PRIMARY_CID_INDEX, ECORE_Q_STATE_MAX, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SUCCESS, ECORE_TEST_AND_CLEAR_BIT, ecore_queue_sp_obj::max_cos, ecore_queue_sp_obj::next_state, ecore_queue_sp_obj::next_tx_only, ecore_queue_sp_obj::num_tx_only, and ecore_queue_sp_obj::pending.

Referenced by ecore_init_queue_obj().

Here is the caller graph for this function:

◆ ecore_queue_send_cmd_cmn()

◆ ecore_queue_send_cmd_e1x()

static int ecore_queue_send_cmd_e1x ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
static

◆ ecore_queue_send_cmd_e2()

static int ecore_queue_send_cmd_e2 ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)
static

◆ ecore_queue_set_pending()

static int ecore_queue_set_pending ( struct ecore_queue_sp_obj obj,
struct ecore_queue_state_params params 
)
static

Definition at line 4688 of file ecore_sp.c.

References ecore_queue_state_params::cmd, ECORE_Q_CMD_ACTIVATE, ECORE_Q_CMD_DEACTIVATE, ECORE_Q_CMD_UPDATE, ECORE_SET_BIT, and ecore_queue_sp_obj::pending.

Referenced by ecore_init_queue_obj().

Here is the caller graph for this function:

◆ ecore_queue_state_change()

int ecore_queue_state_change ( struct bxe_softc sc,
struct ecore_queue_state_params params 
)

ecore_queue_state_change - perform Queue state change transition

@sc: device handle @params: parameters to perform the transition

returns 0 in case of successfully completed transition, negative error code in case of failure, positive (EBUSY) value if there is a completion to that is still pending (possible only if RAMROD_COMP_WAIT is not set in params->ramrod_flags for asynchronous commands).

Definition at line 4644 of file ecore_sp.c.

References ecore_queue_sp_obj::check_transition, ecore_queue_sp_obj::complete_cmd, ECORE_CLEAR_BIT, ECORE_ERR, ECORE_INVAL, ECORE_MSG, ECORE_Q_STATE_MAX, ECORE_RET_PENDING, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_queue_sp_obj::next_state, ecore_queue_sp_obj::pending, ecore_queue_state_params::q_obj, RAMROD_COMP_WAIT, RAMROD_DRV_CLR_ONLY, ecore_queue_state_params::ramrod_flags, ecore_queue_sp_obj::send_cmd, ecore_queue_sp_obj::set_pending, and ecore_queue_sp_obj::wait_comp.

Referenced by bxe_setup_queue(), and bxe_stop_queue().

Here is the caller graph for this function:

◆ ecore_queue_wait_comp()

static int ecore_queue_wait_comp ( struct bxe_softc sc,
struct ecore_queue_sp_obj o,
enum ecore_queue_cmd  cmd 
)
static

Definition at line 4706 of file ecore_sp.c.

References ecore_state_wait(), and ecore_queue_sp_obj::pending.

Referenced by ecore_init_queue_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_raw_check_pending()

static bool ecore_raw_check_pending ( struct ecore_raw_obj o)
static

Definition at line 264 of file ecore_sp.c.

References ECORE_TEST_BIT, ecore_raw_obj::pstate, and ecore_raw_obj::state.

Referenced by ecore_init_raw_obj().

Here is the caller graph for this function:

◆ ecore_raw_clear_pending()

static void ecore_raw_clear_pending ( struct ecore_raw_obj o)
static

Definition at line 278 of file ecore_sp.c.

References ECORE_CLEAR_BIT, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SMP_MB_BEFORE_CLEAR_BIT, ecore_raw_obj::pstate, and ecore_raw_obj::state.

Referenced by ecore_init_raw_obj().

Here is the caller graph for this function:

◆ ecore_raw_set_pending()

static void ecore_raw_set_pending ( struct ecore_raw_obj o)
static

Definition at line 285 of file ecore_sp.c.

References ECORE_SET_BIT, ECORE_SMP_MB_AFTER_CLEAR_BIT, ECORE_SMP_MB_BEFORE_CLEAR_BIT, ecore_raw_obj::pstate, and ecore_raw_obj::state.

Referenced by ecore_init_raw_obj().

Here is the caller graph for this function:

◆ ecore_raw_wait()

static int ecore_raw_wait ( struct bxe_softc sc,
struct ecore_raw_obj raw 
)
static

Definition at line 336 of file ecore_sp.c.

References ecore_state_wait(), ecore_raw_obj::pstate, and ecore_raw_obj::state.

Referenced by ecore_init_raw_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_remove_vlan_mac()

◆ ecore_rx_mode_set_cmd_state_e2()

◆ ecore_rx_mode_set_rdata_hdr_e2()

static void ecore_rx_mode_set_rdata_hdr_e2 ( uint32_t  cid,
struct eth_classify_header hdr,
uint8_t  rule_cnt 
)
inlinestatic

Definition at line 2622 of file ecore_sp.c.

References eth_classify_header::echo, ECORE_CPU_TO_LE32, and eth_classify_header::rule_cnt.

Referenced by ecore_set_rx_mode_e2().

Here is the caller graph for this function:

◆ ecore_set_mac_in_nig()

void ecore_set_mac_in_nig ( struct bxe_softc sc,
bool  add,
unsigned char *  dev_addr,
int  index 
)

◆ ecore_set_one_mac_e1x()

static void ecore_set_one_mac_e1x ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
struct ecore_exeq_elem elem,
int  rule_idx,
int  cam_offset 
)
static

ecore_set_one_mac_e1x - fill a single MAC rule ramrod data

@sc: device handle @o: ecore_vlan_mac_obj @elem: ecore_exeq_elem @rule_idx: rule_idx @cam_offset: cam_offset

Definition at line 1140 of file ecore_sp.c.

References ecore_vlan_mac_data::cmd, ecore_exeq_elem::cmd_data, ECORE_MEMSET, ECORE_VLAN_MAC_ADD, ecore_vlan_mac_set_rdata_e1x(), ETH_VLAN_FILTER_ANY_VLAN, ecore_mac_ramrod_data::mac, ecore_classification_ramrod_data::mac, ecore_vlan_mac_obj::raw, ecore_raw_obj::rdata, ecore_raw_obj::state, ecore_vlan_mac_data::u, and ecore_exe_queue_cmd_data::vlan_mac.

Referenced by ecore_init_mac_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_set_one_mac_e2()

◆ ecore_set_one_vlan_e2()

◆ ecore_set_one_vlan_mac_e1h()

static void ecore_set_one_vlan_mac_e1h ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
struct ecore_exeq_elem elem,
int  rule_idx,
int  cam_offset 
)
static

◆ ecore_set_one_vlan_mac_e2()

◆ ecore_set_one_vxlan_fltr_e2()

◆ ecore_set_rx_mode_e1x()

◆ ecore_set_rx_mode_e2()

◆ ecore_setup_rss()

static int ecore_setup_rss ( struct bxe_softc sc,
struct ecore_config_rss_params p 
)
static

ecore_setup_rss - configure RSS

@sc: device handle : rss configuration

sends on UPDATE ramrod for that matter.

Definition at line 4479 of file ecore_sp.c.

References eth_rss_update_ramrod_data::capabilities, ecore_raw_obj::cid, eth_rss_update_ramrod_data::echo, ECORE_CPU_TO_LE16, ECORE_CPU_TO_LE32, ECORE_MEMCPY, ECORE_MEMSET, ECORE_MSG, ECORE_PENDING, ECORE_RSS_IPV4, ECORE_RSS_IPV4_TCP, ECORE_RSS_IPV4_UDP, ECORE_RSS_IPV4_VXLAN, ECORE_RSS_IPV6, ECORE_RSS_IPV6_TCP, ECORE_RSS_IPV6_UDP, ECORE_RSS_IPV6_VXLAN, ECORE_RSS_MODE_DISABLED, ECORE_RSS_MODE_REGULAR, ECORE_RSS_SET_SRCH, ECORE_RSS_TUNN_INNER_HDRS, ecore_sp_post, ECORE_SWCID_MASK, ECORE_SWCID_SHIFT, ECORE_TEST_BIT, ecore_rss_config_obj::engine_id, ETH_CONNECTION_TYPE, ETH_RSS_MODE_DISABLED, ETH_RSS_MODE_REGULAR, ETH_RSS_UPDATE_RAMROD_DATA_IPV4_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV4_TCP_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV4_UDP_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV4_VXLAN_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV6_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV6_TCP_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_IPV6_VXLAN_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_TUNN_INNER_HDRS_CAPABILITY, ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY, ecore_config_rss_params::ind_table, ecore_rss_config_obj::ind_table, eth_rss_update_ramrod_data::indirection_table, RAMROD_CMD_ID_ETH_RSS_UPDATE, ecore_rss_config_obj::raw, ecore_raw_obj::rdata, ecore_raw_obj::rdata_mapping, eth_rss_update_ramrod_data::rss_engine_id, ecore_config_rss_params::rss_flags, ecore_config_rss_params::rss_key, eth_rss_update_ramrod_data::rss_key, eth_rss_update_ramrod_data::rss_mode, ecore_config_rss_params::rss_obj, eth_rss_update_ramrod_data::rss_result_mask, ecore_config_rss_params::rss_result_mask, ecore_raw_obj::state, and T_ETH_INDIRECTION_TABLE_SIZE.

Referenced by ecore_init_rss_config_obj().

Here is the caller graph for this function:

◆ ecore_state_wait()

static int ecore_state_wait ( struct bxe_softc sc,
int  state,
unsigned long *  pstate 
)
inlinestatic

ecore_state_wait - wait until the given bit(state) is cleared

@sc: device handle @state: state which is to be cleared @state_p: state buffer

Definition at line 300 of file ecore_sp.c.

References CHIP_REV_IS_EMUL, ECORE_ERR, ECORE_IO, ECORE_MIGHT_SLEEP, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, ECORE_TIMEOUT, ECORE_WAIT, and bxe_softc::panic.

Referenced by ecore_func_wait_comp(), ecore_mcast_wait(), ecore_queue_wait_comp(), ecore_raw_wait(), and ecore_wait_rx_mode_comp_e2().

Here is the caller graph for this function:

◆ ecore_validate_vlan_mac()

static int ecore_validate_vlan_mac ( struct bxe_softc sc,
union ecore_qable_obj qo,
struct ecore_exeq_elem elem 
)
static

◆ ecore_validate_vlan_mac_add()

static int ecore_validate_vlan_mac_add ( struct bxe_softc sc,
union ecore_qable_obj qo,
struct ecore_exeq_elem elem 
)
inlinestatic

ecore_validate_vlan_mac_add - check if an ADD command can be executed

@sc: device handle @qo: ecore_qable_obj @elem: ecore_exeq_elem

Checks that the requested configuration can be added. If yes and if requested, consume CAM credit.

The 'validate' is run after the 'optimize'.

Definition at line 1516 of file ecore_sp.c.

References ecore_vlan_mac_obj::check_add, ecore_exeq_elem::cmd_data, ECORE_DONT_CONSUME_CAM_CREDIT, ECORE_EXISTS, ECORE_INVAL, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_vlan_mac_obj::exe_queue, ecore_exe_queue_obj::get, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_data::u, ecore_exe_queue_cmd_data::vlan_mac, ecore_qable_obj::vlan_mac, and ecore_vlan_mac_data::vlan_mac_flags.

Referenced by ecore_validate_vlan_mac().

Here is the caller graph for this function:

◆ ecore_validate_vlan_mac_del()

static int ecore_validate_vlan_mac_del ( struct bxe_softc sc,
union ecore_qable_obj qo,
struct ecore_exeq_elem elem 
)
inlinestatic

ecore_validate_vlan_mac_del - check if the DEL command can be executed

@sc: device handle @qo: quable object to check @elem: element that needs to be deleted

Checks that the requested configuration can be deleted. If yes and if requested, returns a CAM credit.

The 'validate' is run after the 'optimize'.

Definition at line 1564 of file ecore_sp.c.

References ecore_vlan_mac_obj::check_del, ecore_vlan_mac_data::cmd, ecore_exeq_elem::cmd_data, ECORE_DONT_CONSUME_CAM_CREDIT, ECORE_ERR, ECORE_EXISTS, ECORE_INVAL, ECORE_MEMCPY, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, ECORE_VLAN_MAC_MOVE, ecore_vlan_mac_obj::exe_queue, ecore_exe_queue_obj::get, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_data::u, ecore_exe_queue_cmd_data::vlan_mac, ecore_qable_obj::vlan_mac, and ecore_vlan_mac_data::vlan_mac_flags.

Referenced by ecore_validate_vlan_mac().

Here is the caller graph for this function:

◆ ecore_validate_vlan_mac_move()

static int ecore_validate_vlan_mac_move ( struct bxe_softc sc,
union ecore_qable_obj qo,
struct ecore_exeq_elem elem 
)
inlinestatic

ecore_validate_vlan_mac_move - check if the MOVE command can be executed

@sc: device handle @qo: quable object to check (source) @elem: element that needs to be moved

Checks that the requested configuration can be moved. If yes and if requested, returns a CAM credit.

The 'validate' is run after the 'optimize'.

Definition at line 1623 of file ecore_sp.c.

References ecore_vlan_mac_obj::check_move, ecore_vlan_mac_data::cmd, ecore_exeq_elem::cmd_data, ECORE_DONT_CONSUME_CAM_CREDIT, ECORE_DONT_CONSUME_CAM_CREDIT_DEST, ECORE_ERR, ECORE_EXISTS, ECORE_INVAL, ECORE_MEMCPY, ECORE_MSG, ECORE_SUCCESS, ECORE_TEST_BIT, ECORE_VLAN_MAC_ADD, ECORE_VLAN_MAC_DEL, ecore_vlan_mac_obj::exe_queue, ecore_exe_queue_obj::get, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_data::target_obj, ecore_vlan_mac_data::u, ecore_exe_queue_cmd_data::vlan_mac, ecore_qable_obj::vlan_mac, and ecore_vlan_mac_data::vlan_mac_flags.

Referenced by ecore_validate_vlan_mac().

Here is the caller graph for this function:

◆ ecore_vlan_mac_del_all()

static int ecore_vlan_mac_del_all ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
unsigned long *  vlan_mac_flags,
unsigned long *  ramrod_flags 
)
static

ecore_vlan_mac_del_all - delete elements with given vlan_mac_flags spec

@sc: device handle @o: @vlan_mac_flags: @ramrod_flags: execution flags to be used for this deletion

if the last operation has completed successfully and there are no more elements left, positive value if the last operation has completed successfully and there are more previously configured elements, negative value is current operation has failed.

Definition at line 2200 of file ecore_sp.c.

References ecore_vlan_mac_data::cmd, ecore_exeq_elem::cmd_data, ECORE_CLEAR_BIT_NA, ecore_config_vlan_mac(), ECORE_ERR, ecore_exe_queue_free_elem(), ECORE_LIST_FOR_EACH_ENTRY, ECORE_LIST_FOR_EACH_ENTRY_SAFE, ECORE_LIST_REMOVE_ENTRY, ECORE_MEMCPY, ECORE_MEMSET, ECORE_MSG, ECORE_SET_BIT_NA, ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ECORE_SUCCESS, ECORE_VLAN_MAC_CMP_FLAGS, ECORE_VLAN_MAC_DEL, ecore_vlan_mac_h_read_lock(), ecore_vlan_mac_h_read_unlock(), ecore_exe_queue_obj::exe_queue, ecore_vlan_mac_obj::exe_queue, flags, ecore_vlan_mac_obj::head, ecore_exeq_elem::link, ecore_exe_queue_obj::lock, ecore_exe_queue_obj::owner, RAMROD_COMP_WAIT, RAMROD_CONT, RAMROD_EXEC, ecore_vlan_mac_ramrod_params::ramrod_flags, ecore_exe_queue_obj::remove, ecore_vlan_mac_data::u, ecore_vlan_mac_registry_elem::u, ecore_vlan_mac_ramrod_params::user_req, ecore_exe_queue_cmd_data::vlan_mac, ecore_vlan_mac_data::vlan_mac_flags, ecore_vlan_mac_registry_elem::vlan_mac_flags, and ecore_vlan_mac_ramrod_params::vlan_mac_obj.

Referenced by ecore_init_vlan_mac_common().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_get_registry_elem()

static int ecore_vlan_mac_get_registry_elem ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
struct ecore_exeq_elem elem,
bool  restore,
struct ecore_vlan_mac_registry_elem **  re 
)
inlinestatic

◆ ecore_vlan_mac_get_rx_tx_flag()

static uint8_t ecore_vlan_mac_get_rx_tx_flag ( struct ecore_vlan_mac_obj o)
inlinestatic

◆ ecore_vlan_mac_h_read_lock()

int ecore_vlan_mac_h_read_lock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)

ecore_vlan_mac_h_read_lock - lock the vlan mac head list reader lock

@sc: device handle @o: vlan_mac object

May sleep. Claims and releases execution queue lock during its run.

Definition at line 578 of file ecore_sp.c.

References __ecore_vlan_mac_h_read_lock(), ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ecore_vlan_mac_obj::exe_queue, and ecore_exe_queue_obj::lock.

Referenced by ecore_get_n_elements(), and ecore_vlan_mac_del_all().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_h_read_unlock()

void ecore_vlan_mac_h_read_unlock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)

ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock

@sc: device handle @o: vlan_mac object

Notice if a pending execution exists, it would be performed if this was the last reader. Claims and releases the execution queue lock during its run.

Definition at line 635 of file ecore_sp.c.

References __ecore_vlan_mac_h_read_unlock(), ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ecore_vlan_mac_obj::exe_queue, and ecore_exe_queue_obj::lock.

Referenced by ecore_get_n_elements(), and ecore_vlan_mac_del_all().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_h_write_unlock()

void ecore_vlan_mac_h_write_unlock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)

ecore_vlan_mac_h_write_unlock - unlock the vlan mac head list writer lock

@sc: device handle @o: vlan_mac object

Notice if a pending execution exists, it would perform it - possibly releasing and reclaiming the execution queue lock.

Definition at line 542 of file ecore_sp.c.

References __ecore_vlan_mac_h_write_unlock(), ECORE_SPIN_LOCK_BH, ECORE_SPIN_UNLOCK_BH, ecore_vlan_mac_obj::exe_queue, and ecore_exe_queue_obj::lock.

Here is the call graph for this function:

◆ ecore_vlan_mac_push_new_cmd()

◆ ecore_vlan_mac_restore()

static int ecore_vlan_mac_restore ( struct bxe_softc sc,
struct ecore_vlan_mac_ramrod_params p,
struct ecore_vlan_mac_registry_elem **  ppos 
)
static

ecore_vlan_mac_restore - reconfigure next MAC/VLAN/VLAN-MAC element

@sc: device handle : command parameters @ppos: pointer to the cookie

reconfigure next MAC/VLAN/VLAN-MAC element from the previously configured elements list.

from command parameters only RAMROD_COMP_WAIT bit in ramrod_flags is taken into an account

pointer to the cookie - that should be given back in the next call to make function handle the next element. If *ppos is set to NULL it will restart the iterator. If returned *ppos == NULL this means that the last element has been handled.

Definition at line 1381 of file ecore_sp.c.

References ecore_vlan_mac_data::cmd, ecore_config_vlan_mac(), ECORE_LIST_FIRST_ENTRY, ECORE_LIST_IS_EMPTY, ECORE_LIST_IS_LAST, ECORE_LIST_NEXT, ECORE_MEMCPY, ECORE_SET_BIT_NA, ECORE_VLAN_MAC_ADD, ecore_vlan_mac_obj::head, ecore_vlan_mac_registry_elem::link, ecore_vlan_mac_ramrod_params::ramrod_flags, RAMROD_RESTORE, ecore_vlan_mac_data::u, ecore_vlan_mac_registry_elem::u, ecore_vlan_mac_ramrod_params::user_req, ecore_vlan_mac_data::vlan_mac_flags, ecore_vlan_mac_registry_elem::vlan_mac_flags, and ecore_vlan_mac_ramrod_params::vlan_mac_obj.

Referenced by ecore_init_vlan_mac_common().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_set_cfg_entry_e1x()

◆ ecore_vlan_mac_set_cmd_hdr_e2()

static void ecore_vlan_mac_set_cmd_hdr_e2 ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
bool  add,
int  opcode,
struct eth_classify_cmd_header hdr 
)
inlinestatic

ecore_vlan_mac_set_cmd_hdr_e2 - set a header in a single classify ramrod

@sc: device handle @o: queue for which we want to configure this rule @add: if TRUE the command is an ADD command, DEL otherwise @opcode: CLASSIFY_RULE_OPCODE_XXX @hdr: pointer to a header to setup

Definition at line 936 of file ecore_sp.c.

References ecore_raw_obj::cl_id, eth_classify_cmd_header::client_id, eth_classify_cmd_header::cmd_general_data, ecore_vlan_mac_get_rx_tx_flag(), ETH_CLASSIFY_CMD_HEADER_IS_ADD, ETH_CLASSIFY_CMD_HEADER_OPCODE_SHIFT, eth_classify_cmd_header::func_id, ecore_raw_obj::func_id, and ecore_vlan_mac_obj::raw.

Referenced by ecore_set_one_mac_e2(), ecore_set_one_vlan_e2(), ecore_set_one_vlan_mac_e2(), and ecore_set_one_vxlan_fltr_e2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_set_rdata_e1x()

static void ecore_vlan_mac_set_rdata_e1x ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
int  type,
int  cam_offset,
bool  add,
uint8_t *  mac,
uint16_t  vlan_id,
int  opcode,
struct mac_configuration_cmd config 
)
inlinestatic

Definition at line 1114 of file ecore_sp.c.

References ecore_raw_obj::cl_id, mac_configuration_cmd::config_table, ECORE_MSG, ecore_vlan_mac_set_cfg_entry_e1x(), ecore_vlan_mac_set_rdata_hdr_e1x(), mac_configuration_cmd::hdr, and ecore_vlan_mac_obj::raw.

Referenced by ecore_set_one_mac_e1x(), and ecore_set_one_vlan_mac_e1h().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_vlan_mac_set_rdata_hdr_e1x()

static void ecore_vlan_mac_set_rdata_hdr_e1x ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o,
int  type,
int  cam_offset,
struct mac_configuration_hdr hdr 
)
inlinestatic

ecore_vlan_mac_set_rdata_hdr_e1x - set a header in a single classify ramrod

@sc: device handle @o: queue @type: @cam_offset: offset in cam memory @hdr: pointer to a header to setup

E1/E1H

Definition at line 1072 of file ecore_sp.c.

References ecore_raw_obj::cid, mac_configuration_hdr::client_id, mac_configuration_hdr::echo, ECORE_CPU_TO_LE16, ECORE_CPU_TO_LE32, ECORE_SWCID_MASK, ECORE_SWCID_SHIFT, mac_configuration_hdr::length, mac_configuration_hdr::offset, and ecore_vlan_mac_obj::raw.

Referenced by ecore_vlan_mac_set_rdata_e1x().

Here is the caller graph for this function:

◆ ecore_vlan_mac_set_rdata_hdr_e2()

static void ecore_vlan_mac_set_rdata_hdr_e2 ( uint32_t  cid,
int  type,
struct eth_classify_header hdr,
int  rule_cnt 
)
inlinestatic

ecore_vlan_mac_set_rdata_hdr_e2 - set the classify ramrod data header

@cid: connection id @type: ECORE_FILTER_XXX_PENDING @hdr: pointer to header to setup @rule_cnt:

currently we always configure one rule and echo field to contain a CID and an opcode type.

Definition at line 967 of file ecore_sp.c.

References ecore_raw_obj::cid, eth_classify_header::echo, ECORE_CPU_TO_LE32, ECORE_SWCID_MASK, ECORE_SWCID_SHIFT, and eth_classify_header::rule_cnt.

Referenced by ecore_set_one_mac_e2(), ecore_set_one_vlan_e2(), ecore_set_one_vlan_mac_e2(), and ecore_set_one_vxlan_fltr_e2().

Here is the caller graph for this function:

◆ ecore_wait_rx_mode_comp_e2()

static int ecore_wait_rx_mode_comp_e2 ( struct bxe_softc sc,
struct ecore_rx_mode_ramrod_params p 
)
static

Definition at line 2780 of file ecore_sp.c.

References ecore_state_wait(), ecore_rx_mode_ramrod_params::pstate, and ecore_rx_mode_ramrod_params::state.

Referenced by ecore_init_rx_mode_obj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_wait_vlan_mac()

static int ecore_wait_vlan_mac ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)
static

ecore_wait_vlan_mac - passively wait for 5 seconds until all work completes.

@sc: device handle @o: ecore_vlan_mac_obj

Definition at line 1737 of file ecore_sp.c.

References ecore_exe_queue_empty(), ECORE_SUCCESS, ECORE_TIMEOUT, ECORE_WAIT, ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::raw, and ecore_raw_obj::wait_comp.

Referenced by ecore_init_vlan_mac_common().

Here is the call graph for this function:
Here is the caller graph for this function: