35#define LLFC_DRIVER_TRAFFIC_TYPE_MAX 3
41#define DCBX_COS_MAX_NUM_E2 DCBX_E2E3_MAX_NUM_COS
43#define BXE_MAX_COS_SUPPORT 3
44#define DCBX_COS_MAX_NUM_E3B0 BXE_MAX_COS_SUPPORT
45#define DCBX_COS_MAX_NUM BXE_MAX_COS_SUPPORT
55#define BXE_DCBX_STRICT_INVALID DCBX_COS_MAX_NUM
56#define BXE_DCBX_STRICT_COS_HIGHEST 0
57#define BXE_DCBX_STRICT_COS_NEXT_LOWER_PRI(sp) ((sp) + 1)
78#define BXE_DCBX_CONFIG_INV_VALUE (0xFFFFFFFF)
79#define BXE_DCBX_OVERWRITE_SETTINGS_DISABLE 0
80#define BXE_DCBX_OVERWRITE_SETTINGS_ENABLE 1
81#define BXE_DCBX_OVERWRITE_SETTINGS_INVALID (BXE_DCBX_CONFIG_INV_VALUE)
82#define BXE_IS_ETS_ENABLED(sc) \
83 ((sc)->dcb_state == BXE_DCB_STATE_ON && \
84 (sc)->dcbx_port_params.ets.enabled)
97#define LLDP_PARAMS_VER_NUM 2
102#define LLDP_TX_ONLY 0x01
103#define LLDP_RX_ONLY 0x02
104#define LLDP_TX_RX 0x03
105#define LLDP_DISABLED 0x04
115#define INVALID_TRAFFIC_TYPE_PRIORITY (0xFFFFFFFF)
117#define TRAFFIC_TYPE_ETH 0
118#define TRAFFIC_TYPE_PORT 1
122#define DCBX_CONFIG_MAX_APP_PROTOCOL 4
157#define BXE_DCBX_CURRENT_STATE_IS_SYNC (1 << 0)
158#define BXE_PFC_IS_CURRENTLY_OPERATIONAL (1 << 1)
159#define BXE_ETS_IS_CURRENTLY_OPERATIONAL (1 << 2)
160#define BXE_PRIORITY_TAGGING_IS_CURRENTLY_OPERATIONAL (1 << 3)
199#define GET_FLAGS(flags, bits) ((flags) & (bits))
200#define SET_FLAGS(flags, bits) ((flags) |= (bits))
201#define RESET_FLAGS(flags, bits) ((flags) &= ~(bits))
208#define ETH_TYPE_FCOE (0x8906)
209#define TCP_PORT_ISCSI (0xCBC)
211#define PFC_VALUE_FRAME_SIZE (512)
212#define PFC_QUANTA_IN_NANOSEC_FROM_SPEED_MEGA(mega_speed) \
213 ((1000 * PFC_VALUE_FRAME_SIZE)/(mega_speed))
215#define PFC_BRB1_REG_HIGH_LLFC_LOW_THRESHOLD 130
216#define PFC_BRB1_REG_HIGH_LLFC_HIGH_THRESHOLD 170
230#define DCBX_ILLEGAL_PG (0xFF)
231#define DCBX_PFC_PRI_MASK (0xFF)
232#define DCBX_STRICT_PRIORITY (15)
233#define DCBX_INVALID_COS_BW (0xFFFFFFFF)
234#define DCBX_PFC_PRI_NON_PAUSE_MASK(sc) \
235 ((sc)->dcbx_port_params.pfc.priority_non_pauseable_mask)
236#define DCBX_PFC_PRI_PAUSE_MASK(sc) \
237 ((uint8_t)~DCBX_PFC_PRI_NON_PAUSE_MASK(sc))
238#define DCBX_PFC_PRI_GET_PAUSE(sc, pg_pri) \
239 ((pg_pri) & (DCBX_PFC_PRI_PAUSE_MASK(sc)))
240#define DCBX_PFC_PRI_GET_NON_PAUSE(sc, pg_pri) \
241 (DCBX_PFC_PRI_NON_PAUSE_MASK(sc) & (pg_pri))
242#define DCBX_IS_PFC_PRI_SOME_PAUSE(sc, pg_pri) \
243 (0 != DCBX_PFC_PRI_GET_PAUSE(sc, pg_pri))
244#define IS_DCBX_PFC_PRI_ONLY_PAUSE(sc, pg_pri) \
245 (pg_pri == DCBX_PFC_PRI_GET_PAUSE((sc), (pg_pri)))
246#define IS_DCBX_PFC_PRI_ONLY_NON_PAUSE(sc, pg_pri) \
247 ((pg_pri) == DCBX_PFC_PRI_GET_NON_PAUSE((sc), (pg_pri)))
248#define IS_DCBX_PFC_PRI_MIX_PAUSE(sc, pg_pri) \
249 (!(IS_DCBX_PFC_PRI_ONLY_NON_PAUSE((sc), (pg_pri)) || \
250 IS_DCBX_PFC_PRI_ONLY_PAUSE((sc), (pg_pri))))
#define LLFC_DRIVER_TRAFFIC_TYPE_MAX
void bxe_dcbx_pmf_update(struct bxe_softc *sc)
int bxe_dcb_get_dcbx_params_ioctl(struct bxe_softc *sc, void *uaddr)
int bxe_dcb_set_dcbx_params_ioctl(struct bxe_softc *sc, void *uaddr)
int bxe_dcb_get_lldp_params_ioctl(struct bxe_softc *sc, void *uaddr)
#define DCBX_CONFIG_MAX_APP_PROTOCOL
void bxe_dcbx_init_params(struct bxe_softc *sc)
@ BXE_DCBX_STATE_NEG_RECEIVED
@ BXE_DCBX_STATE_TX_PAUSED
@ BXE_DCBX_STATE_TX_RELEASED
void bxe_dcbx_set_state(struct bxe_softc *sc, uint8_t dcb_on, uint32_t dcbx_enabled)
void bxe_dcbx_set_params(struct bxe_softc *sc, uint32_t state)
#define REM_PORT_ID_STAT_LEN
#define DCBX_MAX_APP_PROTOCOL
#define REM_CHASSIS_ID_STAT_LEN
#define LOCAL_CHASSIS_ID_STAT_LEN
#define LOCAL_PORT_ID_STAT_LEN
uint32_t admin_ets_configuration_tx_enable
struct bxe_admin_priority_app_table admin_priority_app_table[DCBX_CONFIG_MAX_APP_PROTOCOL]
uint32_t admin_ets_enable
uint32_t admin_pfc_enable
uint32_t admin_tc_supported_tx_enable
uint32_t admin_pfc_bitmap
uint32_t admin_pfc_willing
uint32_t admin_configuration_ets_pg[8]
uint32_t admin_ets_willing
uint32_t admin_ets_reco_valid
uint32_t admin_application_priority_tx_enable
uint32_t admin_ets_recommendation_tx_enable
uint32_t admin_default_priority
uint32_t admin_configuration_bw_precentage[8]
uint32_t admin_app_priority_willing
uint32_t overwrite_settings
uint32_t admin_pfc_tx_enable
uint32_t admin_recommendation_bw_precentage[8]
uint32_t admin_dcbx_version
uint32_t admin_recommendation_ets_pg[8]
uint32_t overwrite_settings
uint32_t traffic_type_priority[LLFC_DRIVER_TRAFFIC_TYPE_MAX]
uint32_t pfc_frames_received[2]
uint32_t remote_ets_reco_valid
uint32_t local_pfc_enable
uint32_t local_configuration_ets_pg[8]
uint32_t priority_app_mismatch
uint32_t remote_tc_supported
struct bxe_admin_priority_app_table local_priority_app_table[DCBX_MAX_APP_PROTOCOL]
uint32_t local_tc_supported
uint32_t remote_pfc_bitmap
uint32_t local_pfc_bitmap
uint32_t remote_ets_willing
uint32_t remote_app_priority_willing
struct bxe_admin_priority_app_table remote_priority_app_table[DCBX_MAX_APP_PROTOCOL]
uint32_t remote_pfc_willing
uint32_t dcb_current_state
uint32_t pfc_frames_sent[2]
uint32_t local_configuration_bw_precentage[8]
uint32_t dcbx_frames_sent
uint32_t remote_recommendation_ets_pg[8]
struct bxe_config_dcbx_params config_dcbx_params
uint32_t remote_configuration_ets_pg[8]
uint32_t dcbx_frames_received
uint32_t remote_configuration_bw_precentage[8]
uint32_t local_ets_enable
uint32_t remote_recommendation_bw_precentage[8]
struct bxe_config_dcbx_params config_dcbx_params
uint32_t priority_non_pauseable_mask
struct bxe_dcbx_cos_params cos_params[DCBX_COS_MAX_NUM]
struct bxe_dcbx_pg_params ets
struct bxe_dcbx_app_params app
struct bxe_dcbx_pfc_params pfc
uint32_t local_port_id[LOCAL_PORT_ID_STAT_LEN]
struct bxe_config_lldp_params config_lldp_params
uint32_t remote_port_id[REM_PORT_ID_STAT_LEN]
uint32_t local_chassis_id[LOCAL_CHASSIS_ID_STAT_LEN]
uint32_t remote_chassis_id[REM_CHASSIS_ID_STAT_LEN]
struct cos_entry_help_data data[DCBX_COS_MAX_NUM]
struct pg_entry_help_data data[LLFC_DRIVER_TRAFFIC_TYPE_MAX]