FreeBSD kernel BXE device code
|
#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"
Go to the source code of this file.
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) |
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 |
#define __BIT_VEC64_CLEAR_BIT | ( | el, | |
bit | |||
) |
Definition at line 413 of file ecore_sp.h.
#define __BIT_VEC64_SET_BIT | ( | el, | |
bit | |||
) |
Definition at line 408 of file ecore_sp.h.
#define __LITTLE_ENDIAN |
Definition at line 51 of file ecore_sp.h.
#define BIT_VEC64_CLEAR_BIT | ( | vec64, | |
idx | |||
) |
Definition at line 422 of file ecore_sp.h.
#define BIT_VEC64_ELEM_MASK ((uint64_t)BIT_VEC64_ELEM_SZ - 1) |
Definition at line 406 of file ecore_sp.h.
#define BIT_VEC64_ELEM_ONE_MASK ((uint64_t)(~0)) |
Definition at line 436 of file ecore_sp.h.
#define BIT_VEC64_ELEM_SHIFT 6 |
Definition at line 405 of file ecore_sp.h.
#define BIT_VEC64_ELEM_SZ 64 |
Definition at line 404 of file ecore_sp.h.
#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.
#define BIT_VEC64_SET_BIT | ( | vec64, | |
idx | |||
) |
Definition at line 418 of file ecore_sp.h.
#define BIT_VEC64_TEST_BIT | ( | vec64, | |
idx | |||
) |
Definition at line 426 of file ecore_sp.h.
#define bool _Bool |
Definition at line 77 of file ecore_sp.h.
#define BXE_DEBUG_ECORE_BUG 0x02 |
Definition at line 251 of file ecore_sp.h.
#define BXE_DEBUG_ECORE_BUG_ON 0x04 |
Definition at line 252 of file ecore_sp.h.
#define BXE_DEBUG_ECORE_DBG_BREAK_IF 0x01 |
Definition at line 250 of file ecore_sp.h.
#define DBG_SP 0x00000004 /* defined in bxe.h */ |
Definition at line 272 of file ecore_sp.h.
#define ECORE_ABS_FUNC_ID SC_ABS_FUNC |
Definition at line 209 of file ecore_sp.h.
#define ECORE_ALIGN | ( | x, | |
a | |||
) | ((((x) + (a) - 1) / (a)) * (a)) |
Definition at line 202 of file ecore_sp.h.
#define ECORE_ATOMIC_CMPXCHG | ( | a, | |
o, | |||
n | |||
) | bxe_cmpxchg((volatile int *)a, o, n) |
Definition at line 124 of file ecore_sp.h.
#define ECORE_ATOMIC_READ | ( | a | ) | atomic_load_acq_int((volatile int *)a) |
Definition at line 122 of file ecore_sp.h.
#define ECORE_ATOMIC_SET | ( | a, | |
v | |||
) | atomic_store_rel_int((volatile int *)a, v) |
Definition at line 123 of file ecore_sp.h.
#define ECORE_BUG | ( | exp | ) |
Definition at line 258 of file ecore_sp.h.
#define ECORE_BUG_ON | ( | exp | ) |
Definition at line 262 of file ecore_sp.h.
#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.
#define ECORE_CLEAR_BIT | ( | bit, | |
var | |||
) | bxe_clear_bit(bit, var) |
Definition at line 119 of file ecore_sp.h.
#define ECORE_CLEAR_BIT_NA | ( | bit, | |
var | |||
) | bit_clear(var, bit) /* non-atomic */ |
Definition at line 116 of file ecore_sp.h.
#define ECORE_CPU_TO_LE16 | ( | x | ) | htole16(x) |
Definition at line 146 of file ecore_sp.h.
#define ECORE_CPU_TO_LE32 | ( | x | ) | htole32(x) |
Definition at line 147 of file ecore_sp.h.
#define ECORE_DBG_BREAK_IF | ( | exp | ) |
Definition at line 254 of file ecore_sp.h.
#define ECORE_ERR | ( | str, | |
... | |||
) | BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) |
Definition at line 269 of file ecore_sp.h.
#define ECORE_FCOE_CID | ( | sc | ) | ((sc)->fp[FCOE_IDX(sc)].cl_id) |
Definition at line 140 of file ecore_sp.h.
#define ECORE_FREE | ( | _s, | |
_buf, | |||
_size | |||
) | free(_buf, M_TEMP) |
Definition at line 161 of file ecore_sp.h.
#define ECORE_FUNC_ID SC_FUNC |
Definition at line 208 of file ecore_sp.h.
#define ECORE_GET_FLAG | ( | value, | |
mask | |||
) | (((value) &= (mask)) >> (mask##_SHIFT)) |
Definition at line 135 of file ecore_sp.h.
#define ECORE_ILT_FREE | ( | x, | |
y, | |||
size | |||
) |
Definition at line 182 of file ecore_sp.h.
#define ECORE_ILT_ZALLOC | ( | x, | |
y, | |||
size | |||
) |
Definition at line 166 of file ecore_sp.h.
#define ECORE_IS_MF_AFEX_MODE IS_MF_AFEX_MODE |
Definition at line 196 of file ecore_sp.h.
#define ECORE_IS_MF_SD_MODE IS_MF_SD_MODE |
Definition at line 194 of file ecore_sp.h.
#define ECORE_IS_MF_SI_MODE IS_MF_SI_MODE |
Definition at line 195 of file ecore_sp.h.
#define ECORE_IS_VALID_ETHER_ADDR | ( | _mac | ) | TRUE |
Definition at line 192 of file ecore_sp.h.
#define ECORE_LIKELY | ( | x | ) | __predict_true(x) |
Definition at line 152 of file ecore_sp.h.
#define ECORE_LIST_FIRST_ENTRY | ( | _list, | |
cast, | |||
_link | |||
) | (cast *)((_list)->head) |
Definition at line 305 of file ecore_sp.h.
#define ECORE_LIST_FOR_EACH_ENTRY | ( | pos, | |
_list, | |||
_link, | |||
cast | |||
) |
Definition at line 387 of file ecore_sp.h.
#define ECORE_LIST_FOR_EACH_ENTRY_SAFE | ( | pos, | |
n, | |||
_list, | |||
_link, | |||
cast | |||
) |
Definition at line 393 of file ecore_sp.h.
#define ECORE_LIST_INIT | ( | _list | ) |
Definition at line 289 of file ecore_sp.h.
#define ECORE_LIST_IS_EMPTY | ( | _list | ) | ((_list)->cnt == 0) |
Definition at line 301 of file ecore_sp.h.
#define ECORE_LIST_IS_LAST | ( | _elem, | |
_list | |||
) | (_elem == (_list)->tail) |
Definition at line 297 of file ecore_sp.h.
#define ECORE_LIST_NEXT | ( | _elem, | |
_link, | |||
cast | |||
) | (cast *)((&((_elem)->_link))->next) |
Definition at line 309 of file ecore_sp.h.
#define ECORE_LIST_PUSH_HEAD | ( | _elem, | |
_list | |||
) |
Definition at line 313 of file ecore_sp.h.
#define ECORE_LIST_PUSH_TAIL | ( | _elem, | |
_list | |||
) |
Definition at line 327 of file ecore_sp.h.
#define ECORE_LIST_REMOVE_ENTRY | ( | _elem, | |
_list | |||
) |
Definition at line 357 of file ecore_sp.h.
#define ECORE_LIST_SPLICE_INIT | ( | _list1, | |
_list2 | |||
) |
Definition at line 341 of file ecore_sp.h.
#define ECORE_MAX_EMUL_MULTI 1 |
Definition at line 92 of file ecore_sp.h.
#define ECORE_MAX_MULTICAST 64 |
Definition at line 91 of file ecore_sp.h.
#define ECORE_MC_HASH_OFFSET | ( | sc, | |
i | |||
) |
Definition at line 87 of file ecore_sp.h.
#define ECORE_MC_HASH_SIZE 8 |
Definition at line 86 of file ecore_sp.h.
#define ECORE_MCAST_BINS_NUM 256 |
Definition at line 1010 of file ecore_sp.h.
#define ECORE_MCAST_VEC_SZ (ECORE_MCAST_BINS_NUM / 64) |
Definition at line 1011 of file ecore_sp.h.
#define ECORE_MEMCMP | ( | _a, | |
_b, | |||
_s | |||
) | memcmp(_a, _b, _s) |
Definition at line 142 of file ecore_sp.h.
#define ECORE_MEMCPY | ( | _a, | |
_b, | |||
_s | |||
) | memcpy(_a, _b, _s) |
Definition at line 143 of file ecore_sp.h.
#define ECORE_MEMSET | ( | _a, | |
_c, | |||
_s | |||
) | memset(_a, _c, _s) |
Definition at line 144 of file ecore_sp.h.
#define ECORE_MIGHT_SLEEP | ( | ) |
Definition at line 138 of file ecore_sp.h.
#define ECORE_MMIOWB | ( | ) | wmb() |
Definition at line 113 of file ecore_sp.h.
Definition at line 274 of file ecore_sp.h.
#define ECORE_MSLEEP | ( | _t | ) | DELAY((_t) * 1000) |
Definition at line 150 of file ecore_sp.h.
#define ECORE_MULTI_TX_COS 3 /* Maximum possible */ |
Definition at line 1326 of file ecore_sp.h.
#define ECORE_MULTI_TX_COS_E1X 3 /* QM only */ |
Definition at line 1323 of file ecore_sp.h.
#define ECORE_MULTI_TX_COS_E2_E3A0 2 |
Definition at line 1324 of file ecore_sp.h.
#define ECORE_MULTI_TX_COS_E3B0 3 |
Definition at line 1325 of file ecore_sp.h.
#define ECORE_MUTEX_INIT | ( | _mutex | ) | mtx_init(_mutex, "ecore_lock", "ECORE Lock", MTX_DEF) |
Definition at line 97 of file ecore_sp.h.
#define ECORE_MUTEX_LOCK | ( | _mutex | ) | mtx_lock(_mutex) |
Definition at line 99 of file ecore_sp.h.
#define ECORE_MUTEX_UNLOCK | ( | _mutex | ) | mtx_unlock(_mutex) |
Definition at line 100 of file ecore_sp.h.
#define ECORE_PATH_ID SC_PATH |
Definition at line 206 of file ecore_sp.h.
#define ECORE_POOL_VEC_SIZE (MAX_MAC_CREDIT_E2 / 64) |
Definition at line 1123 of file ecore_sp.h.
#define ECORE_PORT_ID SC_PORT |
Definition at line 207 of file ecore_sp.h.
#define ECORE_PRIMARY_CID_INDEX 0 |
Definition at line 1322 of file ecore_sp.h.
#define ECORE_REG_WR_DMAE_LEN REG_WR_DMAE_LEN |
Definition at line 204 of file ecore_sp.h.
#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.
#define ECORE_SET_BIT | ( | bit, | |
var | |||
) | bxe_set_bit(bit, var) |
Definition at line 118 of file ecore_sp.h.
#define ECORE_SET_BIT_NA | ( | bit, | |
var | |||
) | bit_set(var, bit) /* non-atomic */ |
Definition at line 115 of file ecore_sp.h.
#define ECORE_SET_CTX_VALIDATION bxe_set_ctx_validation |
Definition at line 198 of file ecore_sp.h.
#define ECORE_SET_FLAG | ( | value, | |
mask, | |||
flag | |||
) |
Definition at line 129 of file ecore_sp.h.
#define ECORE_SMP_MB | ( | ) | mb() |
Definition at line 110 of file ecore_sp.h.
#define ECORE_SMP_MB_AFTER_CLEAR_BIT | ( | ) | mb() |
Definition at line 108 of file ecore_sp.h.
#define ECORE_SMP_MB_BEFORE_CLEAR_BIT | ( | ) | mb() |
Definition at line 109 of file ecore_sp.h.
#define ECORE_SMP_RMB | ( | ) | rmb() |
Definition at line 111 of file ecore_sp.h.
#define ECORE_SMP_WMB | ( | ) | wmb() |
Definition at line 112 of file ecore_sp.h.
#define ECORE_SP_H |
Definition at line 33 of file ecore_sp.h.
#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.
#define ECORE_SPIN_LOCK_BH | ( | _spin | ) | mtx_lock(_spin) /* bh = bottom-half */ |
Definition at line 105 of file ecore_sp.h.
#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.
#define ECORE_SPIN_UNLOCK_BH | ( | _spin | ) | mtx_unlock(_spin) /* bh = bottom-half */ |
Definition at line 106 of file ecore_sp.h.
#define ECORE_SWCID_MASK ((0x1 << ECORE_SWCID_SHIFT) - 1) |
Definition at line 84 of file ecore_sp.h.
#define ECORE_SWCID_SHIFT 17 |
Definition at line 83 of file ecore_sp.h.
#define ECORE_TEST_AND_CLEAR_BIT | ( | bit, | |
var | |||
) | bxe_test_and_clear_bit(bit, var) |
Definition at line 120 of file ecore_sp.h.
#define ECORE_TEST_BIT | ( | bit, | |
var | |||
) | bxe_test_bit(bit, var) |
Definition at line 117 of file ecore_sp.h.
#define ECORE_UNLIKELY | ( | x | ) | __predict_false(x) |
Definition at line 153 of file ecore_sp.h.
#define ECORE_UPDATE_COALESCE_SB_INDEX bxe_update_coalesce_sb_index |
Definition at line 200 of file ecore_sp.h.
#define ECORE_VLAN_MAC_CMP_FLAGS | ( | flags | ) | ((flags) & ECORE_VLAN_MAC_CMP_MASK) |
Definition at line 736 of file ecore_sp.h.
#define ECORE_VLAN_MAC_CMP_MASK |
Definition at line 732 of file ecore_sp.h.
#define ECORE_WAIT | ( | _s, | |
_t | |||
) | DELAY(1000) |
Definition at line 149 of file ecore_sp.h.
#define ECORE_ZALLOC | ( | _size, | |
_flags, | |||
_sc | |||
) | malloc(_size, M_TEMP, (M_NOWAIT | M_ZERO)) |
Definition at line 155 of file ecore_sp.h.
#define ETH_ALEN ETHER_ADDR_LEN /* 6 */ |
Definition at line 81 of file ecore_sp.h.
#define FW_DMAE_CMD_ID 6 |
Definition at line 1331 of file ecore_sp.h.
#define ILOG2 | ( | x | ) | bxe_ilog2(x) |
Definition at line 164 of file ecore_sp.h.
#define IRO sc->iro_array |
Definition at line 94 of file ecore_sp.h.
#define LITTLE_ENDIAN |
Definition at line 48 of file ecore_sp.h.
#define MAC_PAD (ECORE_ALIGN(ETH_ALEN, sizeof(uint32_t)) - ETH_ALEN) |
Definition at line 1327 of file ecore_sp.h.
#define PF_MAC_CREDIT_E2 | ( | sc, | |
func_num | |||
) |
Definition at line 1995 of file ecore_sp.h.
#define PF_VLAN_CREDIT_E2 | ( | sc, | |
func_num | |||
) |
Definition at line 1999 of file ecore_sp.h.
#define SC_ILT | ( | sc | ) | ((sc)->ilt) |
Definition at line 163 of file ecore_sp.h.
typedef volatile int ecore_atomic_t |
Definition at line 73 of file ecore_sp.h.
typedef bus_addr_t ecore_dma_addr_t |
Definition at line 72 of file ecore_sp.h.
typedef struct _ecore_list_entry_t ecore_list_entry_t |
typedef struct ecore_list_t ecore_list_t |
typedef struct mtx ECORE_MUTEX |
Definition at line 96 of file ecore_sp.h.
typedef struct mtx ECORE_MUTEX_SPIN |
Definition at line 102 of file ecore_sp.h.
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.
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.
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.
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.
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.
anonymous enum |
Enumerator | |
---|---|
SWITCH_UPDATE | |
AFEX_UPDATE |
Definition at line 466 of file ecore_sp.h.
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 |
Definition at line 509 of file ecore_sp.h.
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 |
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 |
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 |
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 |
Definition at line 1167 of file ecore_sp.h.
anonymous enum |
Definition at line 1228 of file ecore_sp.h.
anonymous enum |
Definition at line 1284 of file ecore_sp.h.
anonymous enum |
Definition at line 1570 of file ecore_sp.h.
enum ecore_func_cmd |
Definition at line 1594 of file ecore_sp.h.
enum 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.
enum 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.
enum 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.
Enumerator | |
---|---|
ECORE_Q_LOGICAL_STATE_ACTIVE | |
ECORE_Q_LOGICAL_STATE_STOPPED |
Definition at line 1262 of file ecore_sp.h.
enum ecore_q_state |
Definition at line 1248 of file ecore_sp.h.
enum 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.
enum ecore_queue_cmd |
Definition at line 1268 of file ecore_sp.h.
enum 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.
enum 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.
__FBSDID | ( | "$FreeBSD$" | ) |
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().
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().
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().
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().
int ecore_config_vlan_mac | ( | struct bxe_softc * | sc, |
struct ecore_vlan_mac_ramrod_params * | p | ||
) |
ecore_config_vlan_mac - configure VLAN/MAC/VLAN_MAC filtering rules.
@sc: device handle :
Definition at line 2118 of file ecore_sp.c.
References __ecore_vlan_mac_execute_step(), ecore_raw_obj::clear_pending, ecore_exe_queue_empty(), ecore_exe_queue_length(), ECORE_MSG, ECORE_PENDING, ECORE_SUCCESS, ECORE_TEST_BIT, ecore_vlan_mac_push_new_cmd(), ecore_vlan_mac_obj::exe_queue, RAMROD_COMP_WAIT, RAMROD_CONT, RAMROD_DRV_CLR_ONLY, RAMROD_EXEC, ecore_vlan_mac_ramrod_params::ramrod_flags, ecore_vlan_mac_obj::raw, ecore_vlan_mac_ramrod_params::vlan_mac_obj, and ecore_raw_obj::wait_comp.
Referenced by bxe_set_mac_one(), ecore_vlan_mac_del_all(), and ecore_vlan_mac_restore().
|
inlinestatic |
Definition at line 214 of file ecore_sp.h.
References calc_crc32().
Referenced by ecore_mcast_bin_from_mac().
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().
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().
int ecore_get_q_logical_state | ( | struct bxe_softc * | sc, |
struct ecore_queue_sp_obj * | obj | ||
) |
Definition at line 5780 of file ecore_sp.c.
References ECORE_INVAL, ECORE_Q_LOGICAL_STATE_ACTIVE, ECORE_Q_LOGICAL_STATE_STOPPED, ECORE_Q_STATE_ACTIVE, ECORE_Q_STATE_FLRED, ECORE_Q_STATE_INACTIVE, ECORE_Q_STATE_INITIALIZED, ECORE_Q_STATE_MCOS_TERMINATED, ECORE_Q_STATE_MULTI_COS, ECORE_Q_STATE_RESET, ECORE_Q_STATE_STOPPED, and ECORE_Q_STATE_TERMINATED.
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.
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().
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 | ||
) |
Definition at line 6554 of file ecore_sp.c.
References ecore_func_sp_obj::afex_rdata, ecore_func_sp_obj::afex_rdata_mapping, ecore_func_sp_obj::check_transition, ecore_func_sp_obj::complete_cmd, ecore_func_sp_obj::drv, ecore_func_chk_transition(), ecore_func_comp_cmd(), ecore_func_send_cmd(), ecore_func_wait_comp(), ECORE_MEMSET, ECORE_MUTEX_INIT, ecore_func_sp_obj::one_pending_mutex, ecore_func_sp_obj::rdata, ecore_func_sp_obj::rdata_mapping, ecore_func_sp_obj::send_cmd, and ecore_func_sp_obj::wait_comp.
Referenced by bxe_init_func_obj().
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().
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 | ||
) |
Definition at line 2321 of file ecore_sp.c.
References ecore_vlan_mac_obj::check_add, ecore_vlan_mac_obj::check_del, ecore_vlan_mac_obj::check_move, CHIP_IS_E1x, CLASSIFY_RULES_COUNT, ecore_check_mac_add(), ecore_check_mac_del(), ecore_check_move(), ecore_check_move_always_err(), ecore_exe_queue_init(), ecore_execute_vlan_mac(), ecore_exeq_get_mac(), ecore_get_cam_offset_mac(), ecore_get_credit_mac(), ecore_get_n_elements(), ecore_init_vlan_mac_common(), ecore_optimize_vlan_mac(), ecore_put_cam_offset_mac(), ecore_put_credit_mac(), ecore_remove_vlan_mac(), ecore_set_one_mac_e1x(), ecore_set_one_mac_e2(), ecore_validate_vlan_mac(), ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::get_cam_offset, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_obj::get_n_elements, ecore_vlan_mac_obj::put_cam_offset, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_obj::ramrod_cmd, RAMROD_CMD_ID_ETH_CLASSIFICATION_RULES, RAMROD_CMD_ID_ETH_SET_MAC, and ecore_vlan_mac_obj::set_one_rule.
Referenced by bxe_init_eth_fp().
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().
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 | ||
) |
Definition at line 5744 of file ecore_sp.c.
References ecore_queue_sp_obj::check_transition, CHIP_IS_E1x, ecore_queue_sp_obj::cids, ecore_queue_sp_obj::cl_id, ecore_queue_sp_obj::complete_cmd, ECORE_BUG_ON, ECORE_MEMSET, ECORE_MULTI_TX_COS, ECORE_Q_STATE_MAX, ECORE_Q_TYPE_FWD, ecore_queue_chk_fwd_transition(), ecore_queue_chk_transition(), ecore_queue_comp_cmd(), ecore_queue_send_cmd_e1x(), ecore_queue_send_cmd_e2(), ecore_queue_set_pending(), ecore_queue_wait_comp(), ECORE_TEST_BIT, ecore_queue_sp_obj::func_id, ecore_queue_sp_obj::max_cos, ecore_queue_sp_obj::next_state, ecore_queue_sp_obj::rdata, ecore_queue_sp_obj::rdata_mapping, ecore_queue_sp_obj::send_cmd, ecore_queue_sp_obj::set_pending, ecore_queue_sp_obj::type, and ecore_queue_sp_obj::wait_comp.
Referenced by bxe_init_eth_fp().
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 | ||
) |
Definition at line 4615 of file ecore_sp.c.
References ecore_raw_obj::cid, ecore_raw_obj::cl_id, ecore_rss_config_obj::config_rss, ecore_init_raw_obj(), ecore_setup_rss(), ecore_rss_config_obj::engine_id, ecore_raw_obj::func_id, ecore_raw_obj::pstate, ecore_rss_config_obj::raw, ecore_raw_obj::rdata, ecore_raw_obj::rdata_mapping, and ecore_raw_obj::state.
Referenced by bxe_init_objs().
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().
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().
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 | ||
) |
Definition at line 2416 of file ecore_sp.c.
References ecore_vlan_mac_obj::check_add, ecore_vlan_mac_obj::check_del, ecore_vlan_mac_obj::check_move, CHIP_IS_E1, CHIP_IS_E1H, CLASSIFY_RULES_COUNT, ECORE_BUG, ecore_check_move(), ecore_check_move_always_err(), ecore_check_vlan_mac_add(), ecore_check_vlan_mac_del(), ECORE_ERR, ecore_exe_queue_init(), ecore_execute_vlan_mac(), ecore_exeq_get_vlan_mac(), ecore_get_cam_offset_mac(), ecore_get_credit_vlan_mac(), ecore_init_vlan_mac_common(), ecore_optimize_vlan_mac(), ecore_put_cam_offset_mac(), ecore_put_credit_vlan_mac(), ecore_remove_vlan_mac(), ecore_set_one_vlan_mac_e1h(), ecore_set_one_vlan_mac_e2(), ecore_validate_vlan_mac(), ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::get_cam_offset, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_obj::put_cam_offset, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_obj::ramrod_cmd, RAMROD_CMD_ID_ETH_CLASSIFICATION_RULES, RAMROD_CMD_ID_ETH_SET_MAC, and ecore_vlan_mac_obj::set_one_rule.
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 | ||
) |
Definition at line 2375 of file ecore_sp.c.
References ecore_vlan_mac_obj::check_add, ecore_vlan_mac_obj::check_del, ecore_vlan_mac_obj::check_move, CHIP_IS_E1x, CLASSIFY_RULES_COUNT, ECORE_BUG, ecore_check_move(), ecore_check_vlan_add(), ecore_check_vlan_del(), ECORE_ERR, ecore_exe_queue_init(), ecore_execute_vlan_mac(), ecore_exeq_get_vlan(), ecore_get_cam_offset_vlan(), ecore_get_credit_vlan(), ecore_get_n_elements(), ecore_init_vlan_mac_common(), ecore_optimize_vlan_mac(), ecore_put_cam_offset_vlan(), ecore_put_credit_vlan(), ecore_remove_vlan_mac(), ecore_set_one_vlan_e2(), ecore_validate_vlan_mac(), ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::get_cam_offset, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_obj::get_n_elements, ecore_vlan_mac_obj::put_cam_offset, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_obj::ramrod_cmd, RAMROD_CMD_ID_ETH_CLASSIFICATION_RULES, and ecore_vlan_mac_obj::set_one_rule.
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 | ||
) |
Definition at line 2479 of file ecore_sp.c.
References ecore_vlan_mac_obj::check_add, ecore_vlan_mac_obj::check_del, ecore_vlan_mac_obj::check_move, CHIP_IS_E1x, CLASSIFY_RULES_COUNT, ECORE_BUG, ecore_check_move(), ecore_check_vxlan_fltr_add(), ecore_check_vxlan_fltr_del(), ECORE_ERR, ecore_exe_queue_init(), ecore_execute_vlan_mac(), ecore_exeq_get_vxlan_fltr(), ecore_get_cam_offset_mac(), ecore_get_credit_vlan_mac(), ecore_init_vlan_mac_common(), ecore_optimize_vlan_mac(), ecore_put_cam_offset_mac(), ecore_put_credit_vlan_mac(), ecore_remove_vlan_mac(), ecore_set_one_vxlan_fltr_e2(), ecore_validate_vlan_mac(), ecore_vlan_mac_obj::exe_queue, ecore_vlan_mac_obj::get_cam_offset, ecore_vlan_mac_obj::get_credit, ecore_vlan_mac_obj::put_cam_offset, ecore_vlan_mac_obj::put_credit, ecore_vlan_mac_obj::ramrod_cmd, RAMROD_CMD_ID_ETH_CLASSIFICATION_RULES, and ecore_vlan_mac_obj::set_one_rule.
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().
|
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().
Definition at line 895 of file ecore_sp.c.
References ECORE_IS_MF_SI_MODE, ECORE_LLH_CAM_MAX_PF_LINE, ECORE_MSG, ECORE_PORT_ID, ECORE_REG_WR_DMAE_LEN, IS_MF_AFEX, NIG_REG_LLH0_FUNC_MEM, NIG_REG_LLH0_FUNC_MEM_ENABLE, NIG_REG_LLH1_FUNC_MEM, NIG_REG_LLH1_FUNC_MEM_ENABLE, and REG_WR.
Referenced by ecore_set_one_mac_e2().
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().
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().
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 | ||
) |
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.
int ecore_vlan_mac_move | ( | struct bxe_softc * | sc, |
struct ecore_vlan_mac_ramrod_params * | p, | ||
struct ecore_vlan_mac_obj * | dest_o | ||
) |
|
extern |
Definition at line 257 of file bxe.c.
Referenced by bxe_add_sysctls(), and bxe_get_tunable_params().