FreeBSD kernel BXE device code
ecore_sp.h File Reference
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/endian.h>
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <machine/bus.h>
#include <net/ethernet.h>
#include "ecore_mfw_req.h"
#include "ecore_fw_defs.h"
#include "ecore_hsi.h"
#include "ecore_reg.h"
Include dependency graph for ecore_sp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _ecore_list_entry_t
 
struct  ecore_list_t
 
struct  ecore_raw_obj
 
struct  ecore_mac_ramrod_data
 
struct  ecore_vlan_ramrod_data
 
struct  ecore_vlan_mac_ramrod_data
 
struct  ecore_vxlan_fltr_ramrod_data
 
union  ecore_classification_ramrod_data
 
struct  ecore_vlan_mac_data
 
union  ecore_exe_queue_cmd_data
 
struct  ecore_exeq_elem
 
union  ecore_exeq_comp_elem
 
struct  ecore_exe_queue_obj
 
struct  ecore_vlan_mac_registry_elem
 
struct  ecore_vlan_mac_ramrod_params
 
struct  ecore_vlan_mac_obj
 
struct  ecore_rx_mode_ramrod_params
 
struct  ecore_rx_mode_obj
 
struct  ecore_mcast_list_elem
 
union  ecore_mcast_config_data
 
struct  ecore_mcast_ramrod_params
 
struct  ecore_mcast_obj
 
struct  ecore_credit_pool_obj
 
struct  ecore_config_rss_params
 
struct  ecore_rss_config_obj
 
struct  ecore_queue_init_params
 
struct  ecore_queue_terminate_params
 
struct  ecore_queue_cfc_del_params
 
struct  ecore_queue_update_params
 
struct  ecore_queue_update_tpa_params
 
struct  rxq_pause_params
 
struct  ecore_general_setup_params
 
struct  ecore_rxq_setup_params
 
struct  ecore_txq_setup_params
 
struct  ecore_queue_setup_params
 
struct  ecore_queue_setup_tx_only_params
 
struct  ecore_queue_state_params
 
struct  ecore_viflist_params
 
struct  ecore_queue_sp_obj
 
struct  ecore_func_hw_init_params
 
struct  ecore_func_hw_reset_params
 
struct  ecore_func_start_params
 
struct  ecore_func_switch_update_params
 
struct  ecore_func_afex_update_params
 
struct  ecore_func_afex_viflists_params
 
struct  ecore_func_tx_start_params
 
struct  ecore_func_set_timesync_params
 
struct  ecore_func_state_params
 
struct  ecore_func_sp_drv_ops
 
struct  ecore_func_sp_obj
 
union  ecore_qable_obj
 

Macros

#define ECORE_SP_H
 
#define LITTLE_ENDIAN
 
#define __LITTLE_ENDIAN
 
#define bool   _Bool
 
#define ETH_ALEN   ETHER_ADDR_LEN /* 6 */
 
#define ECORE_SWCID_SHIFT   17
 
#define ECORE_SWCID_MASK   ((0x1 << ECORE_SWCID_SHIFT) - 1)
 
#define ECORE_MC_HASH_SIZE   8
 
#define ECORE_MC_HASH_OFFSET(sc, i)
 
#define ECORE_MAX_MULTICAST   64
 
#define ECORE_MAX_EMUL_MULTI   1
 
#define IRO   sc->iro_array
 
#define ECORE_MUTEX_INIT(_mutex)    mtx_init(_mutex, "ecore_lock", "ECORE Lock", MTX_DEF)
 
#define ECORE_MUTEX_LOCK(_mutex)   mtx_lock(_mutex)
 
#define ECORE_MUTEX_UNLOCK(_mutex)   mtx_unlock(_mutex)
 
#define ECORE_SPIN_LOCK_INIT(_spin, _sc)    mtx_init(_spin, "ecore_lock", "ECORE Lock", MTX_DEF)
 
#define ECORE_SPIN_LOCK_BH(_spin)   mtx_lock(_spin) /* bh = bottom-half */
 
#define ECORE_SPIN_UNLOCK_BH(_spin)   mtx_unlock(_spin) /* bh = bottom-half */
 
#define ECORE_SMP_MB_AFTER_CLEAR_BIT()   mb()
 
#define ECORE_SMP_MB_BEFORE_CLEAR_BIT()   mb()
 
#define ECORE_SMP_MB()   mb()
 
#define ECORE_SMP_RMB()   rmb()
 
#define ECORE_SMP_WMB()   wmb()
 
#define ECORE_MMIOWB()   wmb()
 
#define ECORE_SET_BIT_NA(bit, var)   bit_set(var, bit) /* non-atomic */
 
#define ECORE_CLEAR_BIT_NA(bit, var)   bit_clear(var, bit) /* non-atomic */
 
#define ECORE_TEST_BIT(bit, var)   bxe_test_bit(bit, var)
 
#define ECORE_SET_BIT(bit, var)   bxe_set_bit(bit, var)
 
#define ECORE_CLEAR_BIT(bit, var)   bxe_clear_bit(bit, var)
 
#define ECORE_TEST_AND_CLEAR_BIT(bit, var)   bxe_test_and_clear_bit(bit, var)
 
#define ECORE_ATOMIC_READ(a)   atomic_load_acq_int((volatile int *)a)
 
#define ECORE_ATOMIC_SET(a, v)   atomic_store_rel_int((volatile int *)a, v)
 
#define ECORE_ATOMIC_CMPXCHG(a, o, n)   bxe_cmpxchg((volatile int *)a, o, n)
 
#define ECORE_RET_PENDING(pending_bit, pending)    (ECORE_TEST_BIT(pending_bit, pending) ? ECORE_PENDING : ECORE_SUCCESS)
 
#define ECORE_SET_FLAG(value, mask, flag)
 
#define ECORE_GET_FLAG(value, mask)    (((value) &= (mask)) >> (mask##_SHIFT))
 
#define ECORE_MIGHT_SLEEP()
 
#define ECORE_FCOE_CID(sc)   ((sc)->fp[FCOE_IDX(sc)].cl_id)
 
#define ECORE_MEMCMP(_a, _b, _s)   memcmp(_a, _b, _s)
 
#define ECORE_MEMCPY(_a, _b, _s)   memcpy(_a, _b, _s)
 
#define ECORE_MEMSET(_a, _c, _s)   memset(_a, _c, _s)
 
#define ECORE_CPU_TO_LE16(x)   htole16(x)
 
#define ECORE_CPU_TO_LE32(x)   htole32(x)
 
#define ECORE_WAIT(_s, _t)   DELAY(1000)
 
#define ECORE_MSLEEP(_t)   DELAY((_t) * 1000)
 
#define ECORE_LIKELY(x)   __predict_true(x)
 
#define ECORE_UNLIKELY(x)   __predict_false(x)
 
#define ECORE_ZALLOC(_size, _flags, _sc)    malloc(_size, M_TEMP, (M_NOWAIT | M_ZERO))
 
#define ECORE_CALLOC(_len, _size, _flags, _sc)    mallocarray(_len, _size, M_TEMP, (M_NOWAIT | M_ZERO))
 
#define ECORE_FREE(_s, _buf, _size)   free(_buf, M_TEMP)
 
#define SC_ILT(sc)   ((sc)->ilt)
 
#define ILOG2(x)   bxe_ilog2(x)
 
#define ECORE_ILT_ZALLOC(x, y, size)
 
#define ECORE_ILT_FREE(x, y, size)
 
#define ECORE_IS_VALID_ETHER_ADDR(_mac)   TRUE
 
#define ECORE_IS_MF_SD_MODE   IS_MF_SD_MODE
 
#define ECORE_IS_MF_SI_MODE   IS_MF_SI_MODE
 
#define ECORE_IS_MF_AFEX_MODE   IS_MF_AFEX_MODE
 
#define ECORE_SET_CTX_VALIDATION   bxe_set_ctx_validation
 
#define ECORE_UPDATE_COALESCE_SB_INDEX   bxe_update_coalesce_sb_index
 
#define ECORE_ALIGN(x, a)   ((((x) + (a) - 1) / (a)) * (a))
 
#define ECORE_REG_WR_DMAE_LEN   REG_WR_DMAE_LEN
 
#define ECORE_PATH_ID   SC_PATH
 
#define ECORE_PORT_ID   SC_PORT
 
#define ECORE_FUNC_ID   SC_FUNC
 
#define ECORE_ABS_FUNC_ID   SC_ABS_FUNC
 
#define ecore_sp_post(_sc, _a, _b, _c, _d)    bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
 
#define BXE_DEBUG_ECORE_BUG   0x02
 
#define BXE_DEBUG_ECORE_BUG_ON   0x04
 
#define ECORE_DBG_BREAK_IF(exp)
 
#define ECORE_BUG(exp)
 
#define ECORE_BUG_ON(exp)
 
#define ECORE_ERR(str, ...)    BLOGE(sc, "ECORE: " str, ##__VA_ARGS__)
 
#define DBG_SP   0x00000004 /* defined in bxe.h */
 
#define ECORE_MSG(sc, m, ...)    BLOGD(sc, DBG_SP, "ECORE: " m, ##__VA_ARGS__)
 
#define ECORE_LIST_INIT(_list)
 
#define ECORE_LIST_IS_LAST(_elem, _list)    (_elem == (_list)->tail)
 
#define ECORE_LIST_IS_EMPTY(_list)    ((_list)->cnt == 0)
 
#define ECORE_LIST_FIRST_ENTRY(_list, cast, _link)    (cast *)((_list)->head)
 
#define ECORE_LIST_NEXT(_elem, _link, cast)    (cast *)((&((_elem)->_link))->next)
 
#define ECORE_LIST_PUSH_HEAD(_elem, _list)
 
#define ECORE_LIST_PUSH_TAIL(_elem, _list)
 
#define ECORE_LIST_SPLICE_INIT(_list1, _list2)
 
#define ECORE_LIST_REMOVE_ENTRY(_elem, _list)
 
#define ECORE_LIST_FOR_EACH_ENTRY(pos, _list, _link, cast)
 
#define ECORE_LIST_FOR_EACH_ENTRY_SAFE(pos, n, _list, _link, cast)
 
#define BIT_VEC64_ELEM_SZ   64
 
#define BIT_VEC64_ELEM_SHIFT   6
 
#define BIT_VEC64_ELEM_MASK   ((uint64_t)BIT_VEC64_ELEM_SZ - 1)
 
#define __BIT_VEC64_SET_BIT(el, bit)
 
#define __BIT_VEC64_CLEAR_BIT(el, bit)
 
#define BIT_VEC64_SET_BIT(vec64, idx)
 
#define BIT_VEC64_CLEAR_BIT(vec64, idx)
 
#define BIT_VEC64_TEST_BIT(vec64, idx)
 
#define BIT_VEC64_ONES_MASK(idx)    (((uint64_t)0x1 << (((idx) & BIT_VEC64_ELEM_MASK) + 1)) - 1)
 
#define BIT_VEC64_ELEM_ONE_MASK   ((uint64_t)(~0))
 
#define ECORE_VLAN_MAC_CMP_MASK
 
#define ECORE_VLAN_MAC_CMP_FLAGS(flags)    ((flags) & ECORE_VLAN_MAC_CMP_MASK)
 
#define ECORE_MCAST_BINS_NUM   256
 
#define ECORE_MCAST_VEC_SZ   (ECORE_MCAST_BINS_NUM / 64)
 
#define ECORE_POOL_VEC_SIZE   (MAX_MAC_CREDIT_E2 / 64)
 
#define ECORE_PRIMARY_CID_INDEX   0
 
#define ECORE_MULTI_TX_COS_E1X   3 /* QM only */
 
#define ECORE_MULTI_TX_COS_E2_E3A0   2
 
#define ECORE_MULTI_TX_COS_E3B0   3
 
#define ECORE_MULTI_TX_COS   3 /* Maximum possible */
 
#define MAC_PAD   (ECORE_ALIGN(ETH_ALEN, sizeof(uint32_t)) - ETH_ALEN)
 
#define FW_DMAE_CMD_ID   6
 
#define PF_MAC_CREDIT_E2(sc, func_num)
 
#define PF_VLAN_CREDIT_E2(sc, func_num)
 

Typedefs

typedef bus_addr_t ecore_dma_addr_t
 
typedef volatile int ecore_atomic_t
 
typedef struct mtx ECORE_MUTEX
 
typedef struct mtx ECORE_MUTEX_SPIN
 
typedef struct _ecore_list_entry_t ecore_list_entry_t
 
typedef struct ecore_list_t ecore_list_t
 
typedef int(* exe_q_validate) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)
 
typedef int(* exe_q_remove) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)
 
typedef int(* exe_q_optimize) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)
 
typedef int(* exe_q_execute) (struct bxe_softc *sc, union ecore_qable_obj *o, ecore_list_t *exe_chunk, unsigned long *ramrod_flags)
 
typedef struct ecore_exeq_elem *(* exe_q_get) (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)
 

Enumerations

enum  ecore_status_t {
  ECORE_EXISTS = -6 , ECORE_IO = -5 , ECORE_TIMEOUT = -4 , ECORE_INVAL = -3 ,
  ECORE_BUSY = -2 , ECORE_NOMEM = -1 , ECORE_SUCCESS = 0 , ECORE_PENDING = 1
}
 
enum  { SWITCH_UPDATE , AFEX_UPDATE }
 
enum  {
  RAMROD_TX , RAMROD_RX , RAMROD_COMP_WAIT , RAMROD_DRV_CLR_ONLY ,
  RAMROD_RESTORE , RAMROD_EXEC , RAMROD_CONT , RAMROD_RETRY
}
 
enum  ecore_obj_type { ECORE_OBJ_TYPE_RX , ECORE_OBJ_TYPE_TX , ECORE_OBJ_TYPE_RX_TX }
 
enum  {
  ECORE_FILTER_MAC_PENDING , ECORE_FILTER_VLAN_PENDING , ECORE_FILTER_VLAN_MAC_PENDING , ECORE_FILTER_RX_MODE_PENDING ,
  ECORE_FILTER_RX_MODE_SCHED , ECORE_FILTER_ISCSI_ETH_START_SCHED , ECORE_FILTER_ISCSI_ETH_STOP_SCHED , ECORE_FILTER_FCOE_ETH_START_SCHED ,
  ECORE_FILTER_FCOE_ETH_STOP_SCHED , ECORE_FILTER_BYPASS_RX_MODE_PENDING , ECORE_FILTER_BYPASS_MAC_PENDING , ECORE_FILTER_BYPASS_RSS_CONF_PENDING ,
  ECORE_FILTER_MCAST_PENDING , ECORE_FILTER_MCAST_SCHED , ECORE_FILTER_RSS_CONF_PENDING , ECORE_AFEX_FCOE_Q_UPDATE_PENDING ,
  ECORE_AFEX_PENDING_VIFSET_MCP_ACK , ECORE_FILTER_VXLAN_PENDING
}
 
enum  ecore_vlan_mac_cmd { ECORE_VLAN_MAC_ADD , ECORE_VLAN_MAC_DEL , ECORE_VLAN_MAC_MOVE }
 
enum  {
  ECORE_UC_LIST_MAC , ECORE_ETH_MAC , ECORE_ISCSI_ETH_MAC , ECORE_NETQ_ETH_MAC ,
  ECORE_DONT_CONSUME_CAM_CREDIT , ECORE_DONT_CONSUME_CAM_CREDIT_DEST
}
 
enum  { ECORE_LLH_CAM_ISCSI_ETH_LINE = 0 , ECORE_LLH_CAM_ETH_LINE , ECORE_LLH_CAM_MAX_PF_LINE = NIG_REG_LLH1_FUNC_MEM_SIZE / 2 }
 
enum  { ECORE_RX_MODE_FCOE_ETH , ECORE_RX_MODE_ISCSI_ETH }
 
enum  {
  ECORE_ACCEPT_UNICAST , ECORE_ACCEPT_MULTICAST , ECORE_ACCEPT_ALL_UNICAST , ECORE_ACCEPT_ALL_MULTICAST ,
  ECORE_ACCEPT_BROADCAST , ECORE_ACCEPT_UNMATCHED , ECORE_ACCEPT_ANY_VLAN
}
 
enum  ecore_mcast_cmd { ECORE_MCAST_CMD_ADD , ECORE_MCAST_CMD_CONT , ECORE_MCAST_CMD_DEL , ECORE_MCAST_CMD_RESTORE }
 
enum  {
  ECORE_RSS_MODE_DISABLED , ECORE_RSS_MODE_REGULAR , ECORE_RSS_SET_SRCH , ECORE_RSS_IPV4 ,
  ECORE_RSS_IPV4_TCP , ECORE_RSS_IPV4_UDP , ECORE_RSS_IPV6 , ECORE_RSS_IPV6_TCP ,
  ECORE_RSS_IPV6_UDP , ECORE_RSS_IPV4_VXLAN , ECORE_RSS_IPV6_VXLAN , ECORE_RSS_TUNN_INNER_HDRS
}
 
enum  {
  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_ANTI_SPOOF , ECORE_Q_UPDATE_ANTI_SPOOF_CHNG , ECORE_Q_UPDATE_ACTIVATE , ECORE_Q_UPDATE_ACTIVATE_CHNG ,
  ECORE_Q_UPDATE_DEF_VLAN_EN , ECORE_Q_UPDATE_DEF_VLAN_EN_CHNG , ECORE_Q_UPDATE_SILENT_VLAN_REM_CHNG , ECORE_Q_UPDATE_SILENT_VLAN_REM ,
  ECORE_Q_UPDATE_TX_SWITCHING_CHNG , ECORE_Q_UPDATE_TX_SWITCHING , ECORE_Q_UPDATE_PTP_PKTS_CHNG , ECORE_Q_UPDATE_PTP_PKTS
}
 
enum  ecore_q_state {
  ECORE_Q_STATE_RESET , ECORE_Q_STATE_INITIALIZED , ECORE_Q_STATE_ACTIVE , ECORE_Q_STATE_MULTI_COS ,
  ECORE_Q_STATE_MCOS_TERMINATED , ECORE_Q_STATE_INACTIVE , ECORE_Q_STATE_STOPPED , ECORE_Q_STATE_TERMINATED ,
  ECORE_Q_STATE_FLRED , ECORE_Q_STATE_MAX
}
 
enum  ecore_q_logical_state { ECORE_Q_LOGICAL_STATE_ACTIVE , ECORE_Q_LOGICAL_STATE_STOPPED }
 
enum  ecore_queue_cmd {
  ECORE_Q_CMD_INIT , ECORE_Q_CMD_SETUP , ECORE_Q_CMD_SETUP_TX_ONLY , ECORE_Q_CMD_DEACTIVATE ,
  ECORE_Q_CMD_ACTIVATE , ECORE_Q_CMD_UPDATE , ECORE_Q_CMD_UPDATE_TPA , ECORE_Q_CMD_HALT ,
  ECORE_Q_CMD_CFC_DEL , ECORE_Q_CMD_TERMINATE , ECORE_Q_CMD_EMPTY , ECORE_Q_CMD_MAX
}
 
enum  {
  ECORE_Q_FLG_TPA , ECORE_Q_FLG_TPA_IPV6 , ECORE_Q_FLG_TPA_GRO , ECORE_Q_FLG_STATS ,
  ECORE_Q_FLG_ZERO_STATS , ECORE_Q_FLG_ACTIVE , ECORE_Q_FLG_OV , ECORE_Q_FLG_VLAN ,
  ECORE_Q_FLG_COS , ECORE_Q_FLG_HC , ECORE_Q_FLG_HC_EN , ECORE_Q_FLG_DHC ,
  ECORE_Q_FLG_OOO , ECORE_Q_FLG_FCOE , ECORE_Q_FLG_LEADING_RSS , ECORE_Q_FLG_MCAST ,
  ECORE_Q_FLG_DEF_VLAN , ECORE_Q_FLG_TX_SWITCH , ECORE_Q_FLG_TX_SEC , ECORE_Q_FLG_ANTI_SPOOF ,
  ECORE_Q_FLG_SILENT_VLAN_REM , ECORE_Q_FLG_FORCE_DEFAULT_PRI , ECORE_Q_FLG_REFUSE_OUTBAND_VLAN , ECORE_Q_FLG_PCSUM_ON_PKT ,
  ECORE_Q_FLG_TUN_INC_INNER_IP_ID
}
 
enum  ecore_q_type { ECORE_Q_TYPE_FWD , ECORE_Q_TYPE_HAS_RX , ECORE_Q_TYPE_HAS_TX }
 
enum  {
  ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG , ECORE_F_UPDATE_TX_SWITCH_SUSPEND , ECORE_F_UPDATE_SD_VLAN_TAG_CHNG , ECORE_F_UPDATE_SD_VLAN_ETH_TYPE_CHNG ,
  ECORE_F_UPDATE_VLAN_FORCE_PRIO_CHNG , ECORE_F_UPDATE_VLAN_FORCE_PRIO_FLAG , ECORE_F_UPDATE_TUNNEL_CFG_CHNG , ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GRE ,
  ECORE_F_UPDATE_TUNNEL_INNER_CLSS_VXLAN , ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GENEVE , ECORE_F_UPDATE_TUNNEL_INNER_RSS
}
 
enum  ecore_func_state {
  ECORE_F_STATE_RESET , ECORE_F_STATE_INITIALIZED , ECORE_F_STATE_STARTED , ECORE_F_STATE_TX_STOPPED ,
  ECORE_F_STATE_MAX
}
 
enum  ecore_func_cmd {
  ECORE_F_CMD_HW_INIT , ECORE_F_CMD_START , ECORE_F_CMD_STOP , ECORE_F_CMD_HW_RESET ,
  ECORE_F_CMD_AFEX_UPDATE , ECORE_F_CMD_AFEX_VIFLISTS , ECORE_F_CMD_TX_STOP , ECORE_F_CMD_TX_START ,
  ECORE_F_CMD_SWITCH_UPDATE , ECORE_F_CMD_SET_TIMESYNC , ECORE_F_CMD_MAX
}
 

Functions

 __FBSDID ("$FreeBSD$")
 
uint32_t calc_crc32 (uint8_t *crc32_packet, uint32_t crc32_length, uint32_t crc32_seed, uint8_t complement)
 
static uint32_t ECORE_CRC32_LE (uint32_t seed, uint8_t *mac, uint32_t len)
 
static void ecore_set_fw_mac_addr (uint16_t *fw_hi, uint16_t *fw_mid, uint16_t *fw_lo, uint8_t *mac)
 
void ecore_set_mac_in_nig (struct bxe_softc *sc, bool add, unsigned char *dev_addr, int index)
 
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)
 
enum ecore_func_state ecore_func_get_state (struct bxe_softc *sc, struct ecore_func_sp_obj *o)
 
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_queue_state_change (struct bxe_softc *sc, struct ecore_queue_state_params *params)
 
int ecore_get_q_logical_state (struct bxe_softc *sc, struct ecore_queue_sp_obj *obj)
 
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)
 
int ecore_vlan_mac_h_read_lock (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)
 
int ecore_vlan_mac_h_write_lock (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)
 
int ecore_config_vlan_mac (struct bxe_softc *sc, struct ecore_vlan_mac_ramrod_params *p)
 
int ecore_vlan_mac_move (struct bxe_softc *sc, struct ecore_vlan_mac_ramrod_params *p, struct ecore_vlan_mac_obj *dest_o)
 
void ecore_init_rx_mode_obj (struct bxe_softc *sc, struct ecore_rx_mode_obj *o)
 
int ecore_config_rx_mode (struct bxe_softc *sc, struct ecore_rx_mode_ramrod_params *p)
 
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)
 
int ecore_config_mcast (struct bxe_softc *sc, struct ecore_mcast_ramrod_params *p, enum ecore_mcast_cmd cmd)
 
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)
 
void ecore_init_credit_pool (struct ecore_credit_pool_obj *p, int base, int credit)
 
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_config_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)
 

Variables

unsigned long bxe_debug
 

Macro Definition Documentation

◆ __BIT_VEC64_CLEAR_BIT

#define __BIT_VEC64_CLEAR_BIT (   el,
  bit 
)
Value:
do { \
el = ((el) & (~((uint64_t)0x1 << (bit)))); \
} while (0)

Definition at line 413 of file ecore_sp.h.

◆ __BIT_VEC64_SET_BIT

#define __BIT_VEC64_SET_BIT (   el,
  bit 
)
Value:
do { \
el = ((el) | ((uint64_t)0x1 << (bit))); \
} while (0)

Definition at line 408 of file ecore_sp.h.

◆ __LITTLE_ENDIAN

#define __LITTLE_ENDIAN

Definition at line 51 of file ecore_sp.h.

◆ BIT_VEC64_CLEAR_BIT

#define BIT_VEC64_CLEAR_BIT (   vec64,
  idx 
)
Value:
#define __BIT_VEC64_CLEAR_BIT(el, bit)
Definition: ecore_sp.h:413
#define BIT_VEC64_ELEM_MASK
Definition: ecore_sp.h:406
#define BIT_VEC64_ELEM_SHIFT
Definition: ecore_sp.h:405

Definition at line 422 of file ecore_sp.h.

◆ BIT_VEC64_ELEM_MASK

#define BIT_VEC64_ELEM_MASK   ((uint64_t)BIT_VEC64_ELEM_SZ - 1)

Definition at line 406 of file ecore_sp.h.

◆ BIT_VEC64_ELEM_ONE_MASK

#define BIT_VEC64_ELEM_ONE_MASK   ((uint64_t)(~0))

Definition at line 436 of file ecore_sp.h.

◆ BIT_VEC64_ELEM_SHIFT

#define BIT_VEC64_ELEM_SHIFT   6

Definition at line 405 of file ecore_sp.h.

◆ BIT_VEC64_ELEM_SZ

#define BIT_VEC64_ELEM_SZ   64

Definition at line 404 of file ecore_sp.h.

◆ BIT_VEC64_ONES_MASK

#define BIT_VEC64_ONES_MASK (   idx)     (((uint64_t)0x1 << (((idx) & BIT_VEC64_ELEM_MASK) + 1)) - 1)

Definition at line 434 of file ecore_sp.h.

◆ BIT_VEC64_SET_BIT

#define BIT_VEC64_SET_BIT (   vec64,
  idx 
)
Value:
#define __BIT_VEC64_SET_BIT(el, bit)
Definition: ecore_sp.h:408

Definition at line 418 of file ecore_sp.h.

◆ BIT_VEC64_TEST_BIT

#define BIT_VEC64_TEST_BIT (   vec64,
  idx 
)
Value:
(((vec64)[(idx) >> BIT_VEC64_ELEM_SHIFT] >> \
((idx) & BIT_VEC64_ELEM_MASK)) & 0x1)

Definition at line 426 of file ecore_sp.h.

◆ bool

#define bool   _Bool

Definition at line 77 of file ecore_sp.h.

◆ BXE_DEBUG_ECORE_BUG

#define BXE_DEBUG_ECORE_BUG   0x02

Definition at line 251 of file ecore_sp.h.

◆ BXE_DEBUG_ECORE_BUG_ON

#define BXE_DEBUG_ECORE_BUG_ON   0x04

Definition at line 252 of file ecore_sp.h.

◆ BXE_DEBUG_ECORE_DBG_BREAK_IF

#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01

Definition at line 250 of file ecore_sp.h.

◆ DBG_SP

#define DBG_SP   0x00000004 /* defined in bxe.h */

Definition at line 272 of file ecore_sp.h.

◆ ECORE_ABS_FUNC_ID

#define ECORE_ABS_FUNC_ID   SC_ABS_FUNC

Definition at line 209 of file ecore_sp.h.

◆ ECORE_ALIGN

#define ECORE_ALIGN (   x,
 
)    ((((x) + (a) - 1) / (a)) * (a))

Definition at line 202 of file ecore_sp.h.

◆ ECORE_ATOMIC_CMPXCHG

#define ECORE_ATOMIC_CMPXCHG (   a,
  o,
 
)    bxe_cmpxchg((volatile int *)a, o, n)

Definition at line 124 of file ecore_sp.h.

◆ ECORE_ATOMIC_READ

#define ECORE_ATOMIC_READ (   a)    atomic_load_acq_int((volatile int *)a)

Definition at line 122 of file ecore_sp.h.

◆ ECORE_ATOMIC_SET

#define ECORE_ATOMIC_SET (   a,
 
)    atomic_store_rel_int((volatile int *)a, v)

Definition at line 123 of file ecore_sp.h.

◆ ECORE_BUG

#define ECORE_BUG (   exp)
Value:
printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
#define BXE_DEBUG_ECORE_BUG
Definition: ecore_sp.h:251
unsigned long bxe_debug
Definition: bxe.c:257

Definition at line 258 of file ecore_sp.h.

◆ ECORE_BUG_ON

#define ECORE_BUG_ON (   exp)
Value:
printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
#define BXE_DEBUG_ECORE_BUG_ON
Definition: ecore_sp.h:252

Definition at line 262 of file ecore_sp.h.

◆ ECORE_CALLOC

#define ECORE_CALLOC (   _len,
  _size,
  _flags,
  _sc 
)     mallocarray(_len, _size, M_TEMP, (M_NOWAIT | M_ZERO))

Definition at line 158 of file ecore_sp.h.

◆ ECORE_CLEAR_BIT

#define ECORE_CLEAR_BIT (   bit,
  var 
)    bxe_clear_bit(bit, var)

Definition at line 119 of file ecore_sp.h.

◆ ECORE_CLEAR_BIT_NA

#define ECORE_CLEAR_BIT_NA (   bit,
  var 
)    bit_clear(var, bit) /* non-atomic */

Definition at line 116 of file ecore_sp.h.

◆ ECORE_CPU_TO_LE16

#define ECORE_CPU_TO_LE16 (   x)    htole16(x)

Definition at line 146 of file ecore_sp.h.

◆ ECORE_CPU_TO_LE32

#define ECORE_CPU_TO_LE32 (   x)    htole32(x)

Definition at line 147 of file ecore_sp.h.

◆ ECORE_DBG_BREAK_IF

#define ECORE_DBG_BREAK_IF (   exp)
Value:
printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
#define BXE_DEBUG_ECORE_DBG_BREAK_IF
Definition: ecore_sp.h:250

Definition at line 254 of file ecore_sp.h.

◆ ECORE_ERR

#define ECORE_ERR (   str,
  ... 
)     BLOGE(sc, "ECORE: " str, ##__VA_ARGS__)

Definition at line 269 of file ecore_sp.h.

◆ ECORE_FCOE_CID

#define ECORE_FCOE_CID (   sc)    ((sc)->fp[FCOE_IDX(sc)].cl_id)

Definition at line 140 of file ecore_sp.h.

◆ ECORE_FREE

#define ECORE_FREE (   _s,
  _buf,
  _size 
)    free(_buf, M_TEMP)

Definition at line 161 of file ecore_sp.h.

◆ ECORE_FUNC_ID

#define ECORE_FUNC_ID   SC_FUNC

Definition at line 208 of file ecore_sp.h.

◆ ECORE_GET_FLAG

#define ECORE_GET_FLAG (   value,
  mask 
)     (((value) &= (mask)) >> (mask##_SHIFT))

Definition at line 135 of file ecore_sp.h.

◆ ECORE_ILT_FREE

#define ECORE_ILT_FREE (   x,
  y,
  size 
)
Value:
do { \
if (x) { \
bxe_dma_free((struct bxe_softc *)sc, x); \
free(x, M_DEVBUF); \
x = NULL; \
y = 0; \
} \
} while (0)

Definition at line 182 of file ecore_sp.h.

◆ ECORE_ILT_ZALLOC

#define ECORE_ILT_ZALLOC (   x,
  y,
  size 
)
Value:
do { \
x = malloc(sizeof(struct bxe_dma), M_DEVBUF, (M_NOWAIT | M_ZERO)); \
if (x) { \
if (bxe_dma_alloc((struct bxe_softc *)sc, \
size, (struct bxe_dma *)x, \
"ECORE_ILT") != 0) { \
free(x, M_DEVBUF); \
x = NULL; \
*y = 0; \
} else { \
*y = ((struct bxe_dma *)x)->paddr; \
} \
} \
} while (0)
int bxe_dma_alloc(struct bxe_softc *sc, bus_size_t size, struct bxe_dma *dma, const char *msg)
Definition: bxe.c:898
uint32_t size
Definition: bxe.c:322
Definition: bxe.h:473

Definition at line 166 of file ecore_sp.h.

◆ ECORE_IS_MF_AFEX_MODE

#define ECORE_IS_MF_AFEX_MODE   IS_MF_AFEX_MODE

Definition at line 196 of file ecore_sp.h.

◆ ECORE_IS_MF_SD_MODE

#define ECORE_IS_MF_SD_MODE   IS_MF_SD_MODE

Definition at line 194 of file ecore_sp.h.

◆ ECORE_IS_MF_SI_MODE

#define ECORE_IS_MF_SI_MODE   IS_MF_SI_MODE

Definition at line 195 of file ecore_sp.h.

◆ ECORE_IS_VALID_ETHER_ADDR

#define ECORE_IS_VALID_ETHER_ADDR (   _mac)    TRUE

Definition at line 192 of file ecore_sp.h.

◆ ECORE_LIKELY

#define ECORE_LIKELY (   x)    __predict_true(x)

Definition at line 152 of file ecore_sp.h.

◆ ECORE_LIST_FIRST_ENTRY

#define ECORE_LIST_FIRST_ENTRY (   _list,
  cast,
  _link 
)     (cast *)((_list)->head)

Definition at line 305 of file ecore_sp.h.

◆ ECORE_LIST_FOR_EACH_ENTRY

#define ECORE_LIST_FOR_EACH_ENTRY (   pos,
  _list,
  _link,
  cast 
)
Value:
for (pos = ECORE_LIST_FIRST_ENTRY(_list, cast, _link); \
pos; \
pos = ECORE_LIST_NEXT(pos, _link, cast))
#define ECORE_LIST_NEXT(_elem, _link, cast)
Definition: ecore_sp.h:309
#define ECORE_LIST_FIRST_ENTRY(_list, cast, _link)
Definition: ecore_sp.h:305

Definition at line 387 of file ecore_sp.h.

◆ ECORE_LIST_FOR_EACH_ENTRY_SAFE

#define ECORE_LIST_FOR_EACH_ENTRY_SAFE (   pos,
  n,
  _list,
  _link,
  cast 
)
Value:
for (pos = ECORE_LIST_FIRST_ENTRY(_list, cast, _lint), \
n = (pos) ? ECORE_LIST_NEXT(pos, _link, cast) : NULL; \
pos != NULL; \
pos = (cast *)n, \
n = (pos) ? ECORE_LIST_NEXT(pos, _link, cast) : NULL)

Definition at line 393 of file ecore_sp.h.

◆ ECORE_LIST_INIT

#define ECORE_LIST_INIT (   _list)
Value:
do { \
(_list)->head = NULL; \
(_list)->tail = NULL; \
(_list)->cnt = 0; \
} while (0)

Definition at line 289 of file ecore_sp.h.

◆ ECORE_LIST_IS_EMPTY

#define ECORE_LIST_IS_EMPTY (   _list)     ((_list)->cnt == 0)

Definition at line 301 of file ecore_sp.h.

◆ ECORE_LIST_IS_LAST

#define ECORE_LIST_IS_LAST (   _elem,
  _list 
)     (_elem == (_list)->tail)

Definition at line 297 of file ecore_sp.h.

◆ ECORE_LIST_NEXT

#define ECORE_LIST_NEXT (   _elem,
  _link,
  cast 
)     (cast *)((&((_elem)->_link))->next)

Definition at line 309 of file ecore_sp.h.

◆ ECORE_LIST_PUSH_HEAD

#define ECORE_LIST_PUSH_HEAD (   _elem,
  _list 
)
Value:
do { \
(_elem)->prev = (ecore_list_entry_t *)0; \
(_elem)->next = (_list)->head; \
if ((_list)->tail == (ecore_list_entry_t *)0) { \
(_list)->tail = (_elem); \
} else { \
(_list)->head->prev = (_elem); \
} \
(_list)->head = (_elem); \
(_list)->cnt++; \
} while (0)
Definition: ecore_sp.h:278

Definition at line 313 of file ecore_sp.h.

◆ ECORE_LIST_PUSH_TAIL

#define ECORE_LIST_PUSH_TAIL (   _elem,
  _list 
)
Value:
do { \
(_elem)->next = (ecore_list_entry_t *)0; \
(_elem)->prev = (_list)->tail; \
if ((_list)->tail) { \
(_list)->tail->next = (_elem); \
} else { \
(_list)->head = (_elem); \
} \
(_list)->tail = (_elem); \
(_list)->cnt++; \
} while (0)

Definition at line 327 of file ecore_sp.h.

◆ ECORE_LIST_REMOVE_ENTRY

#define ECORE_LIST_REMOVE_ENTRY (   _elem,
  _list 
)
Value:
do { \
if ((_list)->head == (_elem)) { \
if ((_list)->head) { \
(_list)->head = (_list)->head->next; \
if ((_list)->head) { \
(_list)->head->prev = (ecore_list_entry_t *)0; \
} else { \
(_list)->tail = (ecore_list_entry_t *)0; \
} \
(_list)->cnt--; \
} \
} else if ((_list)->tail == (_elem)) { \
if ((_list)->tail) { \
(_list)->tail = (_list)->tail->prev; \
if ((_list)->tail) { \
(_list)->tail->next = (ecore_list_entry_t *)0; \
} else { \
(_list)->head = (ecore_list_entry_t *)0; \
} \
(_list)->cnt--; \
} \
} else { \
(_elem)->prev->next = (_elem)->next; \
(_elem)->next->prev = (_elem)->prev; \
(_list)->cnt--; \
} \
} while (0)

Definition at line 357 of file ecore_sp.h.

◆ ECORE_LIST_SPLICE_INIT

#define ECORE_LIST_SPLICE_INIT (   _list1,
  _list2 
)
Value:
do { \
(_list1)->tail->next = (_list2)->head; \
if ((_list2)->head) { \
(_list2)->head->prev = (_list1)->tail; \
} else { \
(_list2)->tail = (_list1)->tail; \
} \
(_list2)->head = (_list1)->head; \
(_list2)->cnt += (_list1)->cnt; \
(_list1)->head = NULL; \
(_list1)->tail = NULL; \
(_list1)->cnt = 0; \
} while (0)

Definition at line 341 of file ecore_sp.h.

◆ ECORE_MAX_EMUL_MULTI

#define ECORE_MAX_EMUL_MULTI   1

Definition at line 92 of file ecore_sp.h.

◆ ECORE_MAX_MULTICAST

#define ECORE_MAX_MULTICAST   64

Definition at line 91 of file ecore_sp.h.

◆ ECORE_MC_HASH_OFFSET

#define ECORE_MC_HASH_OFFSET (   sc,
 
)
Value:
TSTORM_APPROXIMATE_MATCH_MULTICAST_FILTERING_OFFSET(FUNC_ID(sc)) + i*4)
#define FUNC_ID(sc)
Definition: bxe.h:1397
#define BAR_TSTRORM_INTMEM
Definition: ecore_reg.h:2578

Definition at line 87 of file ecore_sp.h.

◆ ECORE_MC_HASH_SIZE

#define ECORE_MC_HASH_SIZE   8

Definition at line 86 of file ecore_sp.h.

◆ ECORE_MCAST_BINS_NUM

#define ECORE_MCAST_BINS_NUM   256

Definition at line 1010 of file ecore_sp.h.

◆ ECORE_MCAST_VEC_SZ

#define ECORE_MCAST_VEC_SZ   (ECORE_MCAST_BINS_NUM / 64)

Definition at line 1011 of file ecore_sp.h.

◆ ECORE_MEMCMP

#define ECORE_MEMCMP (   _a,
  _b,
  _s 
)    memcmp(_a, _b, _s)

Definition at line 142 of file ecore_sp.h.

◆ ECORE_MEMCPY

#define ECORE_MEMCPY (   _a,
  _b,
  _s 
)    memcpy(_a, _b, _s)

Definition at line 143 of file ecore_sp.h.

◆ ECORE_MEMSET

#define ECORE_MEMSET (   _a,
  _c,
  _s 
)    memset(_a, _c, _s)

Definition at line 144 of file ecore_sp.h.

◆ ECORE_MIGHT_SLEEP

#define ECORE_MIGHT_SLEEP ( )

Definition at line 138 of file ecore_sp.h.

◆ ECORE_MMIOWB

#define ECORE_MMIOWB ( )    wmb()

Definition at line 113 of file ecore_sp.h.

◆ ECORE_MSG

#define ECORE_MSG (   sc,
  m,
  ... 
)     BLOGD(sc, DBG_SP, "ECORE: " m, ##__VA_ARGS__)

Definition at line 274 of file ecore_sp.h.

◆ ECORE_MSLEEP

#define ECORE_MSLEEP (   _t)    DELAY((_t) * 1000)

Definition at line 150 of file ecore_sp.h.

◆ ECORE_MULTI_TX_COS

#define ECORE_MULTI_TX_COS   3 /* Maximum possible */

Definition at line 1326 of file ecore_sp.h.

◆ ECORE_MULTI_TX_COS_E1X

#define ECORE_MULTI_TX_COS_E1X   3 /* QM only */

Definition at line 1323 of file ecore_sp.h.

◆ ECORE_MULTI_TX_COS_E2_E3A0

#define ECORE_MULTI_TX_COS_E2_E3A0   2

Definition at line 1324 of file ecore_sp.h.

◆ ECORE_MULTI_TX_COS_E3B0

#define ECORE_MULTI_TX_COS_E3B0   3

Definition at line 1325 of file ecore_sp.h.

◆ ECORE_MUTEX_INIT

#define ECORE_MUTEX_INIT (   _mutex)     mtx_init(_mutex, "ecore_lock", "ECORE Lock", MTX_DEF)

Definition at line 97 of file ecore_sp.h.

◆ ECORE_MUTEX_LOCK

#define ECORE_MUTEX_LOCK (   _mutex)    mtx_lock(_mutex)

Definition at line 99 of file ecore_sp.h.

◆ ECORE_MUTEX_UNLOCK

#define ECORE_MUTEX_UNLOCK (   _mutex)    mtx_unlock(_mutex)

Definition at line 100 of file ecore_sp.h.

◆ ECORE_PATH_ID

#define ECORE_PATH_ID   SC_PATH

Definition at line 206 of file ecore_sp.h.

◆ ECORE_POOL_VEC_SIZE

#define ECORE_POOL_VEC_SIZE   (MAX_MAC_CREDIT_E2 / 64)

Definition at line 1123 of file ecore_sp.h.

◆ ECORE_PORT_ID

#define ECORE_PORT_ID   SC_PORT

Definition at line 207 of file ecore_sp.h.

◆ ECORE_PRIMARY_CID_INDEX

#define ECORE_PRIMARY_CID_INDEX   0

Definition at line 1322 of file ecore_sp.h.

◆ ECORE_REG_WR_DMAE_LEN

#define ECORE_REG_WR_DMAE_LEN   REG_WR_DMAE_LEN

Definition at line 204 of file ecore_sp.h.

◆ ECORE_RET_PENDING

#define ECORE_RET_PENDING (   pending_bit,
  pending 
)     (ECORE_TEST_BIT(pending_bit, pending) ? ECORE_PENDING : ECORE_SUCCESS)

Definition at line 126 of file ecore_sp.h.

◆ ECORE_SET_BIT

#define ECORE_SET_BIT (   bit,
  var 
)    bxe_set_bit(bit, var)

Definition at line 118 of file ecore_sp.h.

◆ ECORE_SET_BIT_NA

#define ECORE_SET_BIT_NA (   bit,
  var 
)    bit_set(var, bit) /* non-atomic */

Definition at line 115 of file ecore_sp.h.

◆ ECORE_SET_CTX_VALIDATION

#define ECORE_SET_CTX_VALIDATION   bxe_set_ctx_validation

Definition at line 198 of file ecore_sp.h.

◆ ECORE_SET_FLAG

#define ECORE_SET_FLAG (   value,
  mask,
  flag 
)
Value:
do { \
(value) &= ~(mask); \
(value) |= ((flag) << (mask##_SHIFT)); \
} while (0)

Definition at line 129 of file ecore_sp.h.

◆ ECORE_SMP_MB

#define ECORE_SMP_MB ( )    mb()

Definition at line 110 of file ecore_sp.h.

◆ ECORE_SMP_MB_AFTER_CLEAR_BIT

#define ECORE_SMP_MB_AFTER_CLEAR_BIT ( )    mb()

Definition at line 108 of file ecore_sp.h.

◆ ECORE_SMP_MB_BEFORE_CLEAR_BIT

#define ECORE_SMP_MB_BEFORE_CLEAR_BIT ( )    mb()

Definition at line 109 of file ecore_sp.h.

◆ ECORE_SMP_RMB

#define ECORE_SMP_RMB ( )    rmb()

Definition at line 111 of file ecore_sp.h.

◆ ECORE_SMP_WMB

#define ECORE_SMP_WMB ( )    wmb()

Definition at line 112 of file ecore_sp.h.

◆ ECORE_SP_H

#define ECORE_SP_H

Definition at line 33 of file ecore_sp.h.

◆ ecore_sp_post

#define ecore_sp_post (   _sc,
  _a,
  _b,
  _c,
  _d 
)     bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)

Definition at line 222 of file ecore_sp.h.

◆ ECORE_SPIN_LOCK_BH

#define ECORE_SPIN_LOCK_BH (   _spin)    mtx_lock(_spin) /* bh = bottom-half */

Definition at line 105 of file ecore_sp.h.

◆ ECORE_SPIN_LOCK_INIT

#define ECORE_SPIN_LOCK_INIT (   _spin,
  _sc 
)     mtx_init(_spin, "ecore_lock", "ECORE Lock", MTX_DEF)

Definition at line 103 of file ecore_sp.h.

◆ ECORE_SPIN_UNLOCK_BH

#define ECORE_SPIN_UNLOCK_BH (   _spin)    mtx_unlock(_spin) /* bh = bottom-half */

Definition at line 106 of file ecore_sp.h.

◆ ECORE_SWCID_MASK

#define ECORE_SWCID_MASK   ((0x1 << ECORE_SWCID_SHIFT) - 1)

Definition at line 84 of file ecore_sp.h.

◆ ECORE_SWCID_SHIFT

#define ECORE_SWCID_SHIFT   17

Definition at line 83 of file ecore_sp.h.

◆ ECORE_TEST_AND_CLEAR_BIT

#define ECORE_TEST_AND_CLEAR_BIT (   bit,
  var 
)    bxe_test_and_clear_bit(bit, var)

Definition at line 120 of file ecore_sp.h.

◆ ECORE_TEST_BIT

#define ECORE_TEST_BIT (   bit,
  var 
)    bxe_test_bit(bit, var)

Definition at line 117 of file ecore_sp.h.

◆ ECORE_UNLIKELY

#define ECORE_UNLIKELY (   x)    __predict_false(x)

Definition at line 153 of file ecore_sp.h.

◆ ECORE_UPDATE_COALESCE_SB_INDEX

#define ECORE_UPDATE_COALESCE_SB_INDEX   bxe_update_coalesce_sb_index

Definition at line 200 of file ecore_sp.h.

◆ ECORE_VLAN_MAC_CMP_FLAGS

#define ECORE_VLAN_MAC_CMP_FLAGS (   flags)     ((flags) & ECORE_VLAN_MAC_CMP_MASK)

Definition at line 736 of file ecore_sp.h.

◆ ECORE_VLAN_MAC_CMP_MASK

#define ECORE_VLAN_MAC_CMP_MASK
Value:
1 << ECORE_ETH_MAC | \
@ ECORE_ETH_MAC
Definition: ecore_sp.h:725
@ ECORE_UC_LIST_MAC
Definition: ecore_sp.h:724
@ ECORE_NETQ_ETH_MAC
Definition: ecore_sp.h:727
@ ECORE_ISCSI_ETH_MAC
Definition: ecore_sp.h:726

Definition at line 732 of file ecore_sp.h.

◆ ECORE_WAIT

#define ECORE_WAIT (   _s,
  _t 
)    DELAY(1000)

Definition at line 149 of file ecore_sp.h.

◆ ECORE_ZALLOC

#define ECORE_ZALLOC (   _size,
  _flags,
  _sc 
)     malloc(_size, M_TEMP, (M_NOWAIT | M_ZERO))

Definition at line 155 of file ecore_sp.h.

◆ ETH_ALEN

#define ETH_ALEN   ETHER_ADDR_LEN /* 6 */

Definition at line 81 of file ecore_sp.h.

◆ FW_DMAE_CMD_ID

#define FW_DMAE_CMD_ID   6

Definition at line 1331 of file ecore_sp.h.

◆ ILOG2

#define ILOG2 (   x)    bxe_ilog2(x)

Definition at line 164 of file ecore_sp.h.

◆ IRO

#define IRO   sc->iro_array

Definition at line 94 of file ecore_sp.h.

◆ LITTLE_ENDIAN

#define LITTLE_ENDIAN

Definition at line 48 of file ecore_sp.h.

◆ MAC_PAD

#define MAC_PAD   (ECORE_ALIGN(ETH_ALEN, sizeof(uint32_t)) - ETH_ALEN)

Definition at line 1327 of file ecore_sp.h.

◆ PF_MAC_CREDIT_E2

#define PF_MAC_CREDIT_E2 (   sc,
  func_num 
)
Value:
#define GET_NUM_VFS_PER_PATH(sc)
Definition: bxe.h:697
#define GET_NUM_VFS_PER_PF(sc)
Definition: bxe.h:698
#define VF_MAC_CREDIT_CNT
Definition: bxe.h:117
#define MAX_MAC_CREDIT_E2

Definition at line 1995 of file ecore_sp.h.

◆ PF_VLAN_CREDIT_E2

#define PF_VLAN_CREDIT_E2 (   sc,
  func_num 
)
Value:

Definition at line 1999 of file ecore_sp.h.

◆ SC_ILT

#define SC_ILT (   sc)    ((sc)->ilt)

Definition at line 163 of file ecore_sp.h.

Typedef Documentation

◆ ecore_atomic_t

typedef volatile int ecore_atomic_t

Definition at line 73 of file ecore_sp.h.

◆ ecore_dma_addr_t

typedef bus_addr_t ecore_dma_addr_t

Definition at line 72 of file ecore_sp.h.

◆ ecore_list_entry_t

◆ ecore_list_t

typedef struct ecore_list_t ecore_list_t

◆ ECORE_MUTEX

typedef struct mtx ECORE_MUTEX

Definition at line 96 of file ecore_sp.h.

◆ ECORE_MUTEX_SPIN

typedef struct mtx ECORE_MUTEX_SPIN

Definition at line 102 of file ecore_sp.h.

◆ exe_q_execute

typedef int(* exe_q_execute) (struct bxe_softc *sc, union ecore_qable_obj *o, ecore_list_t *exe_chunk, unsigned long *ramrod_flags)

Definition at line 644 of file ecore_sp.h.

◆ exe_q_get

typedef struct ecore_exeq_elem *(* exe_q_get) (struct ecore_exe_queue_obj *o, struct ecore_exeq_elem *elem)

Definition at line 644 of file ecore_sp.h.

◆ exe_q_optimize

typedef int(* exe_q_optimize) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)

Definition at line 641 of file ecore_sp.h.

◆ exe_q_remove

typedef int(* exe_q_remove) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)

Definition at line 634 of file ecore_sp.h.

◆ exe_q_validate

typedef int(* exe_q_validate) (struct bxe_softc *sc, union ecore_qable_obj *o, struct ecore_exeq_elem *elem)

Definition at line 630 of file ecore_sp.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SWITCH_UPDATE 
AFEX_UPDATE 

Definition at line 466 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
RAMROD_TX 
RAMROD_RX 
RAMROD_COMP_WAIT 
RAMROD_DRV_CLR_ONLY 
RAMROD_RESTORE 
RAMROD_EXEC 
RAMROD_CONT 
RAMROD_RETRY 

Definition at line 478 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_FILTER_MAC_PENDING 
ECORE_FILTER_VLAN_PENDING 
ECORE_FILTER_VLAN_MAC_PENDING 
ECORE_FILTER_RX_MODE_PENDING 
ECORE_FILTER_RX_MODE_SCHED 
ECORE_FILTER_ISCSI_ETH_START_SCHED 
ECORE_FILTER_ISCSI_ETH_STOP_SCHED 
ECORE_FILTER_FCOE_ETH_START_SCHED 
ECORE_FILTER_FCOE_ETH_STOP_SCHED 
ECORE_FILTER_BYPASS_RX_MODE_PENDING 
ECORE_FILTER_BYPASS_MAC_PENDING 
ECORE_FILTER_BYPASS_RSS_CONF_PENDING 
ECORE_FILTER_MCAST_PENDING 
ECORE_FILTER_MCAST_SCHED 
ECORE_FILTER_RSS_CONF_PENDING 
ECORE_AFEX_FCOE_Q_UPDATE_PENDING 
ECORE_AFEX_PENDING_VIFSET_MCP_ACK 
ECORE_FILTER_VXLAN_PENDING 

Definition at line 509 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_UC_LIST_MAC 
ECORE_ETH_MAC 
ECORE_ISCSI_ETH_MAC 
ECORE_NETQ_ETH_MAC 
ECORE_DONT_CONSUME_CAM_CREDIT 
ECORE_DONT_CONSUME_CAM_CREDIT_DEST 

Definition at line 723 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_LLH_CAM_ISCSI_ETH_LINE 
ECORE_LLH_CAM_ETH_LINE 
ECORE_LLH_CAM_MAX_PF_LINE 

Definition at line 908 of file ecore_sp.h.

◆ anonymous enum

anonymous enum

RX_MODE verbs:DROP_ALL/ACCEPT_ALL/ACCEPT_ALL_MULTI/ACCEPT_ALL_VLAN/NORMAL

Enumerator
ECORE_RX_MODE_FCOE_ETH 
ECORE_RX_MODE_ISCSI_ETH 

Definition at line 922 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_ACCEPT_UNICAST 
ECORE_ACCEPT_MULTICAST 
ECORE_ACCEPT_ALL_UNICAST 
ECORE_ACCEPT_ALL_MULTICAST 
ECORE_ACCEPT_BROADCAST 
ECORE_ACCEPT_UNMATCHED 
ECORE_ACCEPT_ANY_VLAN 

Definition at line 927 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_RSS_MODE_DISABLED 
ECORE_RSS_MODE_REGULAR 
ECORE_RSS_SET_SRCH 
ECORE_RSS_IPV4 
ECORE_RSS_IPV4_TCP 
ECORE_RSS_IPV4_UDP 
ECORE_RSS_IPV6 
ECORE_RSS_IPV6_TCP 
ECORE_RSS_IPV6_UDP 
ECORE_RSS_IPV4_VXLAN 
ECORE_RSS_IPV6_VXLAN 
ECORE_RSS_TUNN_INNER_HDRS 

Definition at line 1167 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
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_ANTI_SPOOF 
ECORE_Q_UPDATE_ANTI_SPOOF_CHNG 
ECORE_Q_UPDATE_ACTIVATE 
ECORE_Q_UPDATE_ACTIVATE_CHNG 
ECORE_Q_UPDATE_DEF_VLAN_EN 
ECORE_Q_UPDATE_DEF_VLAN_EN_CHNG 
ECORE_Q_UPDATE_SILENT_VLAN_REM_CHNG 
ECORE_Q_UPDATE_SILENT_VLAN_REM 
ECORE_Q_UPDATE_TX_SWITCHING_CHNG 
ECORE_Q_UPDATE_TX_SWITCHING 
ECORE_Q_UPDATE_PTP_PKTS_CHNG 
ECORE_Q_UPDATE_PTP_PKTS 

Definition at line 1228 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_Q_FLG_TPA 
ECORE_Q_FLG_TPA_IPV6 
ECORE_Q_FLG_TPA_GRO 
ECORE_Q_FLG_STATS 
ECORE_Q_FLG_ZERO_STATS 
ECORE_Q_FLG_ACTIVE 
ECORE_Q_FLG_OV 
ECORE_Q_FLG_VLAN 
ECORE_Q_FLG_COS 
ECORE_Q_FLG_HC 
ECORE_Q_FLG_HC_EN 
ECORE_Q_FLG_DHC 
ECORE_Q_FLG_OOO 
ECORE_Q_FLG_FCOE 
ECORE_Q_FLG_LEADING_RSS 
ECORE_Q_FLG_MCAST 
ECORE_Q_FLG_DEF_VLAN 
ECORE_Q_FLG_TX_SWITCH 
ECORE_Q_FLG_TX_SEC 
ECORE_Q_FLG_ANTI_SPOOF 
ECORE_Q_FLG_SILENT_VLAN_REM 
ECORE_Q_FLG_FORCE_DEFAULT_PRI 
ECORE_Q_FLG_REFUSE_OUTBAND_VLAN 
ECORE_Q_FLG_PCSUM_ON_PKT 
ECORE_Q_FLG_TUN_INC_INNER_IP_ID 

Definition at line 1284 of file ecore_sp.h.

◆ anonymous enum

anonymous enum
Enumerator
ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG 
ECORE_F_UPDATE_TX_SWITCH_SUSPEND 
ECORE_F_UPDATE_SD_VLAN_TAG_CHNG 
ECORE_F_UPDATE_SD_VLAN_ETH_TYPE_CHNG 
ECORE_F_UPDATE_VLAN_FORCE_PRIO_CHNG 
ECORE_F_UPDATE_VLAN_FORCE_PRIO_FLAG 
ECORE_F_UPDATE_TUNNEL_CFG_CHNG 
ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GRE 
ECORE_F_UPDATE_TUNNEL_INNER_CLSS_VXLAN 
ECORE_F_UPDATE_TUNNEL_INNER_CLSS_L2GENEVE 
ECORE_F_UPDATE_TUNNEL_INNER_RSS 

Definition at line 1570 of file ecore_sp.h.

◆ ecore_func_cmd

Enumerator
ECORE_F_CMD_HW_INIT 
ECORE_F_CMD_START 
ECORE_F_CMD_STOP 
ECORE_F_CMD_HW_RESET 
ECORE_F_CMD_AFEX_UPDATE 
ECORE_F_CMD_AFEX_VIFLISTS 
ECORE_F_CMD_TX_STOP 
ECORE_F_CMD_TX_START 
ECORE_F_CMD_SWITCH_UPDATE 
ECORE_F_CMD_SET_TIMESYNC 
ECORE_F_CMD_MAX 

Definition at line 1594 of file ecore_sp.h.

◆ ecore_func_state

Enumerator
ECORE_F_STATE_RESET 
ECORE_F_STATE_INITIALIZED 
ECORE_F_STATE_STARTED 
ECORE_F_STATE_TX_STOPPED 
ECORE_F_STATE_MAX 

Definition at line 1585 of file ecore_sp.h.

◆ ecore_mcast_cmd

Enumerator
ECORE_MCAST_CMD_ADD 
ECORE_MCAST_CMD_CONT 
ECORE_MCAST_CMD_DEL 
ECORE_MCAST_CMD_RESTORE 

Definition at line 998 of file ecore_sp.h.

◆ ecore_obj_type

Enumerator
ECORE_OBJ_TYPE_RX 
ECORE_OBJ_TYPE_TX 
ECORE_OBJ_TYPE_RX_TX 

Definition at line 502 of file ecore_sp.h.

◆ ecore_q_logical_state

Enumerator
ECORE_Q_LOGICAL_STATE_ACTIVE 
ECORE_Q_LOGICAL_STATE_STOPPED 

Definition at line 1262 of file ecore_sp.h.

◆ ecore_q_state

Enumerator
ECORE_Q_STATE_RESET 
ECORE_Q_STATE_INITIALIZED 
ECORE_Q_STATE_ACTIVE 
ECORE_Q_STATE_MULTI_COS 
ECORE_Q_STATE_MCOS_TERMINATED 
ECORE_Q_STATE_INACTIVE 
ECORE_Q_STATE_STOPPED 
ECORE_Q_STATE_TERMINATED 
ECORE_Q_STATE_FLRED 
ECORE_Q_STATE_MAX 

Definition at line 1248 of file ecore_sp.h.

◆ ecore_q_type

Enumerator
ECORE_Q_TYPE_FWD 
ECORE_Q_TYPE_HAS_RX 

TODO: Consider moving both these flags into the init() ramrod params.

ECORE_Q_TYPE_HAS_TX 

Definition at line 1313 of file ecore_sp.h.

◆ ecore_queue_cmd

Enumerator
ECORE_Q_CMD_INIT 
ECORE_Q_CMD_SETUP 
ECORE_Q_CMD_SETUP_TX_ONLY 
ECORE_Q_CMD_DEACTIVATE 
ECORE_Q_CMD_ACTIVATE 
ECORE_Q_CMD_UPDATE 
ECORE_Q_CMD_UPDATE_TPA 
ECORE_Q_CMD_HALT 
ECORE_Q_CMD_CFC_DEL 
ECORE_Q_CMD_TERMINATE 
ECORE_Q_CMD_EMPTY 
ECORE_Q_CMD_MAX 

Definition at line 1268 of file ecore_sp.h.

◆ ecore_status_t

Enumerator
ECORE_EXISTS 
ECORE_IO 
ECORE_TIMEOUT 
ECORE_INVAL 
ECORE_BUSY 
ECORE_NOMEM 
ECORE_SUCCESS 
ECORE_PENDING 

Definition at line 454 of file ecore_sp.h.

◆ ecore_vlan_mac_cmd

Enumerator
ECORE_VLAN_MAC_ADD 
ECORE_VLAN_MAC_DEL 
ECORE_VLAN_MAC_MOVE 

Definition at line 584 of file ecore_sp.h.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ calc_crc32()

uint32_t calc_crc32 ( uint8_t *  crc32_packet,
uint32_t  crc32_length,
uint32_t  crc32_seed,
uint8_t  complement 
)

Definition at line 722 of file bxe.c.

Referenced by ECORE_CRC32_LE().

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_CRC32_LE()

static uint32_t ECORE_CRC32_LE ( uint32_t  seed,
uint8_t *  mac,
uint32_t  len 
)
inlinestatic

Definition at line 214 of file ecore_sp.h.

References calc_crc32().

Referenced by ecore_mcast_bin_from_mac().

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_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_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_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_obj()

◆ ecore_init_vlan_obj()

◆ ecore_init_vxlan_fltr_obj()

◆ 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_set_fw_mac_addr()

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

Definition at line 440 of file ecore_sp.h.

Referenced by ecore_mcast_set_one_rule_e1(), ecore_set_one_mac_e2(), ecore_set_one_vlan_mac_e2(), ecore_set_one_vxlan_fltr_e2(), and ecore_vlan_mac_set_cfg_entry_e1x().

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_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_lock()

int ecore_vlan_mac_h_write_lock ( struct bxe_softc sc,
struct ecore_vlan_mac_obj o 
)

◆ 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_move()

int ecore_vlan_mac_move ( struct bxe_softc sc,
struct ecore_vlan_mac_ramrod_params p,
struct ecore_vlan_mac_obj dest_o 
)

Variable Documentation

◆ bxe_debug

unsigned long bxe_debug
extern

Definition at line 257 of file bxe.c.

Referenced by bxe_add_sysctls(), and bxe_get_tunable_params().