FreeBSD kernel CXGBE device code
|
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/counter.h>
#include <sys/rman.h>
#include <sys/types.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/rwlock.h>
#include <sys/sx.h>
#include <sys/vmem.h>
#include <vm/uma.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <machine/bus.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/taskqueue.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_media.h>
#include <net/pfil.h>
#include <netinet/in.h>
#include <netinet/tcp_lro.h>
#include "offload.h"
#include "t4_ioctl.h"
#include "common/t4_msg.h"
#include "firmware/t4fw_interface.h"
Go to the source code of this file.
Data Structures | |
struct | vi_info |
struct | tx_ch_rl_params |
struct | tx_cl_rl_params |
struct | tx_sched_params |
struct | port_info |
struct | cluster_metadata |
struct | fl_sdesc |
struct | tx_desc |
struct | tx_sdesc |
struct | iq_desc |
struct | sge_iq |
struct | sge_eq |
struct | rx_buf_info |
struct | memwin |
struct | sge_fl |
struct | txpkts |
struct | sge_txq |
struct | sge_rxq |
struct | sge_ofld_rxq |
struct | wrqe |
struct | wrq_cookie |
struct | sge_wrq |
struct | sge_ofld_txq |
struct | sge_nm_rxq |
struct | sge_nm_txq |
struct | sge |
struct | devnames |
struct | adapter |
struct | adapter::irq |
Macros | |
#define | KTR_CXGBE KTR_SPARE3 |
#define | CXGBE_UNIMPLEMENTED(s) panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) |
#define | CXGBE_LIST_HEAD(name, type) |
#define | SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD |
#define | sysctl_handle_64 sysctl_handle_quad |
#define | CTLTYPE_U64 CTLTYPE_QUAD |
#define | IS_DOOMED(vi) ((vi)->flags & DOOMED) |
#define | SET_DOOMED(vi) do {(vi)->flags |= DOOMED;} while (0) |
#define | IS_BUSY(sc) ((sc)->flags & CXGBE_BUSY) |
#define | SET_BUSY(sc) do {(sc)->flags |= CXGBE_BUSY;} while (0) |
#define | CLR_BUSY(sc) do {(sc)->flags &= ~CXGBE_BUSY;} while (0) |
#define | IS_MAIN_VI(vi) ((vi) == &((vi)->pi->vi[0])) |
#define | IQ_PAD (IQ_ESIZE - sizeof(struct rsp_ctrl) - sizeof(struct rss_header)) |
#define | FL_RUNNING_LOW(fl) (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) <= fl->lowat) |
#define | FL_NOT_RUNNING_LOW(fl) (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) >= 2 * fl->lowat) |
#define | INVALID_NM_RXQ_CNTXT_ID ((uint16_t)(-1)) |
#define | INVALID_NM_TXQ_CNTXT_ID ((u_int)(-1)) |
#define | ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) |
#define | ADAPTER_UNLOCK(sc) mtx_unlock(&(sc)->sc_lock) |
#define | ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) |
#define | ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) |
#define | ASSERT_SYNCHRONIZED_OP(sc) |
#define | PORT_LOCK(pi) mtx_lock(&(pi)->pi_lock) |
#define | PORT_UNLOCK(pi) mtx_unlock(&(pi)->pi_lock) |
#define | PORT_LOCK_ASSERT_OWNED(pi) mtx_assert(&(pi)->pi_lock, MA_OWNED) |
#define | PORT_LOCK_ASSERT_NOTOWNED(pi) mtx_assert(&(pi)->pi_lock, MA_NOTOWNED) |
#define | FL_LOCK(fl) mtx_lock(&(fl)->fl_lock) |
#define | FL_TRYLOCK(fl) mtx_trylock(&(fl)->fl_lock) |
#define | FL_UNLOCK(fl) mtx_unlock(&(fl)->fl_lock) |
#define | FL_LOCK_ASSERT_OWNED(fl) mtx_assert(&(fl)->fl_lock, MA_OWNED) |
#define | FL_LOCK_ASSERT_NOTOWNED(fl) mtx_assert(&(fl)->fl_lock, MA_NOTOWNED) |
#define | RXQ_FL_LOCK(rxq) FL_LOCK(&(rxq)->fl) |
#define | RXQ_FL_UNLOCK(rxq) FL_UNLOCK(&(rxq)->fl) |
#define | RXQ_FL_LOCK_ASSERT_OWNED(rxq) FL_LOCK_ASSERT_OWNED(&(rxq)->fl) |
#define | RXQ_FL_LOCK_ASSERT_NOTOWNED(rxq) FL_LOCK_ASSERT_NOTOWNED(&(rxq)->fl) |
#define | EQ_LOCK(eq) mtx_lock(&(eq)->eq_lock) |
#define | EQ_TRYLOCK(eq) mtx_trylock(&(eq)->eq_lock) |
#define | EQ_UNLOCK(eq) mtx_unlock(&(eq)->eq_lock) |
#define | EQ_LOCK_ASSERT_OWNED(eq) mtx_assert(&(eq)->eq_lock, MA_OWNED) |
#define | EQ_LOCK_ASSERT_NOTOWNED(eq) mtx_assert(&(eq)->eq_lock, MA_NOTOWNED) |
#define | TXQ_LOCK(txq) EQ_LOCK(&(txq)->eq) |
#define | TXQ_TRYLOCK(txq) EQ_TRYLOCK(&(txq)->eq) |
#define | TXQ_UNLOCK(txq) EQ_UNLOCK(&(txq)->eq) |
#define | TXQ_LOCK_ASSERT_OWNED(txq) EQ_LOCK_ASSERT_OWNED(&(txq)->eq) |
#define | TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) |
#define | for_each_txq(vi, iter, q) |
#define | for_each_rxq(vi, iter, q) |
#define | for_each_ofld_txq(vi, iter, q) |
#define | for_each_ofld_rxq(vi, iter, q) |
#define | for_each_nm_txq(vi, iter, q) |
#define | for_each_nm_rxq(vi, iter, q) |
#define | for_each_vi(_pi, _iter, _vi) |
#define | IDXINCR(idx, incr, wrap) |
#define | IDXDIFF(head, tail, wrap) ((head) >= (tail) ? (head) - (tail) : (wrap) - (tail) + (head)) |
#define | T4_EXTRA_INTR 2 |
#define | T4VF_EXTRA_INTR 1 |
Typedefs | |
typedef struct adapter | adapter_t |
typedef int(* | cpl_handler_t) (struct sge_iq *, const struct rss_header *, struct mbuf *) |
typedef int(* | an_handler_t) (struct sge_iq *, const struct rsp_ctrl *) |
typedef int(* | fw_msg_handler_t) (struct adapter *, const __be64 *) |
Functions | |
MALLOC_DECLARE (M_CXGBE) | |
SYSCTL_DECL (_hw_cxgbe) | |
CTASSERT (sizeof(struct iq_desc)==IQ_ESIZE) | |
struct sge_txq | __aligned (CACHE_LINE_SIZE) |
uint8_t ss[SGE_MAX_WR_LEN] | __aligned (16) |
static struct sge_rxq * | iq_to_rxq (struct sge_iq *iq) |
static struct sge_ofld_rxq * | iq_to_ofld_rxq (struct sge_iq *iq) |
TAILQ_HEAD (wrq_incomplete_wrs, wrq_cookie) incomplete_wrs | |
STAILQ_HEAD (, wrqe) wr_list | |
static int | forwarding_intr_to_fwq (struct adapter *sc) |
static bool | hw_off_limits (struct adapter *sc) |
static uint32_t | t4_read_reg (struct adapter *sc, uint32_t reg) |
static void | t4_write_reg (struct adapter *sc, uint32_t reg, uint32_t val) |
static uint64_t | t4_read_reg64 (struct adapter *sc, uint32_t reg) |
static void | t4_write_reg64 (struct adapter *sc, uint32_t reg, uint64_t val) |
static void | t4_os_pci_read_cfg1 (struct adapter *sc, int reg, uint8_t *val) |
static void | t4_os_pci_write_cfg1 (struct adapter *sc, int reg, uint8_t val) |
static void | t4_os_pci_read_cfg2 (struct adapter *sc, int reg, uint16_t *val) |
static void | t4_os_pci_write_cfg2 (struct adapter *sc, int reg, uint16_t val) |
static void | t4_os_pci_read_cfg4 (struct adapter *sc, int reg, uint32_t *val) |
static void | t4_os_pci_write_cfg4 (struct adapter *sc, int reg, uint32_t val) |
static struct port_info * | adap2pinfo (struct adapter *sc, int idx) |
static void | t4_os_set_hw_addr (struct port_info *pi, uint8_t hw_addr[]) |
static int | tx_resume_threshold (struct sge_eq *eq) |
static int | t4_use_ldst (struct adapter *sc) |
static void | CH_DUMP_MBOX (struct adapter *sc, int mbox, const int reg, const char *msg, const __be64 *const p, const bool err) |
int | t4_os_find_pci_capability (struct adapter *, int) |
int | t4_os_pci_save_state (struct adapter *) |
int | t4_os_pci_restore_state (struct adapter *) |
void | t4_os_portmod_changed (struct port_info *) |
void | t4_os_link_changed (struct port_info *) |
void | t4_iterate (void(*)(struct adapter *, void *), void *) |
void | t4_init_devnames (struct adapter *) |
void | t4_add_adapter (struct adapter *) |
int | t4_detach_common (device_t) |
int | t4_map_bars_0_and_4 (struct adapter *) |
int | t4_map_bar_2 (struct adapter *) |
int | t4_setup_intr_handlers (struct adapter *) |
void | t4_sysctls (struct adapter *) |
int | begin_synchronized_op (struct adapter *, struct vi_info *, int, char *) |
void | doom_vi (struct adapter *, struct vi_info *) |
void | end_synchronized_op (struct adapter *, int) |
int | update_mac_settings (struct ifnet *, int) |
int | adapter_init (struct adapter *) |
int | vi_init (struct vi_info *) |
void | vi_sysctls (struct vi_info *) |
int | rw_via_memwin (struct adapter *, int, uint32_t, uint32_t *, int, int) |
int | alloc_atid (struct adapter *, void *) |
void * | lookup_atid (struct adapter *, int) |
void | free_atid (struct adapter *, int) |
void | release_tid (struct adapter *, int, struct sge_wrq *) |
int | cxgbe_media_change (struct ifnet *) |
void | cxgbe_media_status (struct ifnet *, struct ifmediareq *) |
void | t4_os_cim_err (struct adapter *) |
void | t4_aes_getdeckey (void *, const void *, unsigned int) |
void | t4_copy_partial_hash (int, union authctx *, void *) |
void | t4_init_gmac_hash (const char *, int, char *) |
void | t4_init_hmac_digest (const struct auth_hash *, u_int, const char *, int, char *) |
void | t4_sge_modload (void) |
void | t4_sge_modunload (void) |
uint64_t | t4_sge_extfree_refs (void) |
void | t4_tweak_chip_settings (struct adapter *) |
int | t4_verify_chip_settings (struct adapter *) |
void | t4_init_rx_buf_info (struct adapter *) |
int | t4_create_dma_tag (struct adapter *) |
void | t4_sge_sysctls (struct adapter *, struct sysctl_ctx_list *, struct sysctl_oid_list *) |
int | t4_destroy_dma_tag (struct adapter *) |
int | alloc_ring (struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, bus_addr_t *, void **) |
int | free_ring (struct adapter *, bus_dma_tag_t, bus_dmamap_t, bus_addr_t, void *) |
void | free_fl_buffers (struct adapter *, struct sge_fl *) |
int | t4_setup_adapter_queues (struct adapter *) |
int | t4_teardown_adapter_queues (struct adapter *) |
int | t4_setup_vi_queues (struct vi_info *) |
int | t4_teardown_vi_queues (struct vi_info *) |
void | t4_intr_all (void *) |
void | t4_intr (void *) |
void | t4_intr_err (void *) |
void | t4_intr_evt (void *) |
void | t4_wrq_tx_locked (struct adapter *, struct sge_wrq *, struct wrqe *) |
void | t4_update_fl_bufsize (struct ifnet *) |
struct mbuf * | alloc_wr_mbuf (int, int) |
int | parse_pkt (struct mbuf **, bool) |
void * | start_wrq_wr (struct sge_wrq *, int, struct wrq_cookie *) |
void | commit_wrq_wr (struct sge_wrq *, void *, struct wrq_cookie *) |
int | tnl_cong (struct port_info *, int) |
void | t4_register_an_handler (an_handler_t) |
void | t4_register_fw_msg_handler (int, fw_msg_handler_t) |
void | t4_register_cpl_handler (int, cpl_handler_t) |
void | t4_register_shared_cpl_handler (int, cpl_handler_t, int) |
void | t4_tracer_modload (void) |
void | t4_tracer_modunload (void) |
void | t4_tracer_port_detach (struct adapter *) |
int | t4_get_tracer (struct adapter *, struct t4_tracer *) |
int | t4_set_tracer (struct adapter *, struct t4_tracer *) |
int | t4_trace_pkt (struct sge_iq *, const struct rss_header *, struct mbuf *) |
int | t5_trace_pkt (struct sge_iq *, const struct rss_header *, struct mbuf *) |
int | t4_set_sched_class (struct adapter *, struct t4_sched_params *) |
int | t4_set_sched_queue (struct adapter *, struct t4_sched_queue *) |
int | t4_init_tx_sched (struct adapter *) |
int | t4_free_tx_sched (struct adapter *) |
void | t4_update_tx_sched (struct adapter *) |
int | t4_reserve_cl_rl_kbps (struct adapter *, int, u_int, int *) |
void | t4_release_cl_rl (struct adapter *, int, int) |
int | sysctl_tc (SYSCTL_HANDLER_ARGS) |
int | sysctl_tc_params (SYSCTL_HANDLER_ARGS) |
int | get_filter_mode (struct adapter *, uint32_t *) |
int | set_filter_mode (struct adapter *, uint32_t) |
int | set_filter_mask (struct adapter *, uint32_t) |
int | get_filter (struct adapter *, struct t4_filter *) |
int | set_filter (struct adapter *, struct t4_filter *) |
int | del_filter (struct adapter *, struct t4_filter *) |
int | t4_filter_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *) |
int | t4_hashfilter_ao_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *) |
int | t4_hashfilter_tcb_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *) |
int | t4_del_hashfilter_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *) |
void | free_hftid_hash (struct tid_info *) |
static struct wrqe * | alloc_wrqe (int wr_len, struct sge_wrq *wrq) |
static void * | wrtod (struct wrqe *wr) |
static void | free_wrqe (struct wrqe *wr) |
static void | t4_wrq_tx (struct adapter *sc, struct wrqe *wr) |
static int | read_via_memwin (struct adapter *sc, int idx, uint32_t addr, uint32_t *val, int len) |
static int | write_via_memwin (struct adapter *sc, int idx, uint32_t addr, const uint32_t *val, int len) |
static int | tx_len16_to_desc (int len16) |
#define ADAPTER_LOCK_ASSERT_NOTOWNED | ( | sc | ) | mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) |
#define ADAPTER_LOCK_ASSERT_OWNED | ( | sc | ) | mtx_assert(&(sc)->sc_lock, MA_OWNED) |
#define ASSERT_SYNCHRONIZED_OP | ( | sc | ) |
#define CLR_BUSY | ( | sc | ) | do {(sc)->flags &= ~CXGBE_BUSY;} while (0) |
#define CXGBE_LIST_HEAD | ( | name, | |
type | |||
) |
#define CXGBE_UNIMPLEMENTED | ( | s | ) | panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) |
#define for_each_nm_rxq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_nm_txq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_ofld_rxq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_ofld_txq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_rxq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_txq | ( | vi, | |
iter, | |||
q | |||
) |
#define for_each_vi | ( | _pi, | |
_iter, | |||
_vi | |||
) |
#define IDXDIFF | ( | head, | |
tail, | |||
wrap | |||
) | ((head) >= (tail) ? (head) - (tail) : (wrap) - (tail) + (head)) |
#define IDXINCR | ( | idx, | |
incr, | |||
wrap | |||
) |
#define IQ_PAD (IQ_ESIZE - sizeof(struct rsp_ctrl) - sizeof(struct rss_header)) |
#define IS_BUSY | ( | sc | ) | ((sc)->flags & CXGBE_BUSY) |
#define PORT_LOCK_ASSERT_NOTOWNED | ( | pi | ) | mtx_assert(&(pi)->pi_lock, MA_NOTOWNED) |
#define PORT_LOCK_ASSERT_OWNED | ( | pi | ) | mtx_assert(&(pi)->pi_lock, MA_OWNED) |
#define RXQ_FL_LOCK_ASSERT_NOTOWNED | ( | rxq | ) | FL_LOCK_ASSERT_NOTOWNED(&(rxq)->fl) |
#define RXQ_FL_LOCK_ASSERT_OWNED | ( | rxq | ) | FL_LOCK_ASSERT_OWNED(&(rxq)->fl) |
#define SET_BUSY | ( | sc | ) | do {(sc)->flags |= CXGBE_BUSY;} while (0) |
#define SET_DOOMED | ( | vi | ) | do {(vi)->flags |= DOOMED;} while (0) |
#define TXQ_LOCK_ASSERT_NOTOWNED | ( | txq | ) | EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) |
#define TXQ_LOCK_ASSERT_OWNED | ( | txq | ) | EQ_LOCK_ASSERT_OWNED(&(txq)->eq) |
#define TXQ_TRYLOCK | ( | txq | ) | EQ_TRYLOCK(&(txq)->eq) |
typedef int(* cpl_handler_t) (struct sge_iq *, const struct rss_header *, struct mbuf *) |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum clrl_state |
uint8_t ss[SGE_MAX_WR_LEN] __aligned::__aligned | ( | 16 | ) |
struct sge_txq __aligned | ( | CACHE_LINE_SIZE | ) |
Definition at line 1196 of file adapter.h.
References adapter::port.
Referenced by t4_clr_port_stats(), t4_get_lb_stats(), t4_handle_fw_rpl(), and t4_port_init().
int adapter_init | ( | struct adapter * | sc | ) |
Definition at line 6568 of file t4_main.c.
References adapter_full_init(), adapter_full_uninit(), ADAPTER_LOCK_ASSERT_NOTOWNED, ASSERT_SYNCHRONIZED_OP, adapter::flags, and FULL_INIT_DONE.
Referenced by cxgbe_init_synchronized(), and set_filter().
int alloc_atid | ( | struct adapter * | sc, |
void * | ctx | ||
) |
Definition at line 3851 of file t4_main.c.
References tid_info::afree, tid_info::atid_tab, tid_info::atids_in_use, aopen_entry::data, M_TID_TID, aopen_entry::next, and adapter::tids.
Referenced by set_hashfilter().
int alloc_ring | ( | struct adapter * | sc, |
size_t | len, | ||
bus_dma_tag_t * | tag, | ||
bus_dmamap_t * | map, | ||
bus_addr_t * | pa, | ||
void ** | va | ||
) |
Definition at line 3435 of file t4_sge.c.
References CH_ERR, adapter::dmat, free_ring(), oneseg_dma_callback(), and tag.
Referenced by alloc_eq(), and alloc_iq_fl().
struct mbuf * alloc_wr_mbuf | ( | int | len, |
int | how | ||
) |
Definition at line 2386 of file t4_sge.c.
References MC_RAW_WR, set_mbuf_cflags(), and set_mbuf_len16().
Definition at line 1437 of file adapter.h.
References wrqe::wr_len, wrq, and wrqe::wrq.
Referenced by ccr_ccm(), ccr_cipher(), ccr_eta(), ccr_gcm(), ccr_hash(), release_tid(), and start_wrq_wr().
Definition at line 6121 of file t4_main.c.
References ADAPTER_LOCK, ADAPTER_UNLOCK, adapter::flags, HOLD_LOCK, INTR_OK, IS_BUSY, IS_DOOMED, adapter::last_op, adapter::last_op_flags, adapter::last_op_thr, mcaddr_ctx::rc, adapter::sc_lock, SET_BUSY, and SLEEP_OK.
Referenced by bind_txq_to_traffic_class(), collect_mps_tcam(), collect_tid(), cudbg_t4_fwcache(), cxgbe_init(), cxgbe_ioctl(), cxgbe_media_change(), cxgbe_media_status(), get_sge_context(), load_boot(), load_bootcfg(), load_cfg(), load_fw(), match_name(), read_i2c(), read_sge_ctxt(), reset_adapter(), set_filter(), set_filter_mask(), set_filter_mode(), set_sched_class_config(), set_sched_class_params(), sysctl_autoneg(), sysctl_btphy(), sysctl_force_fec(), sysctl_holdoff_pktc_idx(), sysctl_holdoff_tmr_idx(), sysctl_loadavg(), sysctl_module_fec(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_pause_settings(), sysctl_qsize_rxq(), sysctl_qsize_txq(), sysctl_requested_fec(), sysctl_reset_sensor(), sysctl_temperature(), sysctl_tx_vm_wr(), sysctl_vdd(), t4_get_tracer(), t4_os_portmod_changed(), t4_resume(), t4_set_tracer(), t4_suspend(), t4_vxlan_start(), t4_vxlan_stop(), update_tx_sched(), and vcxgbe_attach().
|
inlinestatic |
Definition at line 1229 of file adapter.h.
References be64_to_cpu, adapter::debug_flags, adapter::dev, DF_DUMP_MBOX, and t4_read_reg64().
Referenced by t4_wr_mbox_meat_timeout().
void commit_wrq_wr | ( | struct sge_wrq * | wrq, |
void * | w, | ||
struct wrq_cookie * | cookie | ||
) |
Definition at line 2994 of file t4_sge.c.
References sge_wrq::adapter, sge_eq::cidx, sge_eq::dbidx, sge_eq::desc, drain_wrq_wr_list(), eq, sge_wrq::eq, EQ_ESIZE, EQ_LOCK, EQ_UNLOCK, sge_eq::equiq, fw_eth_tx_pkt_wr::equiq_to_len16, F_FW_WR_EQUEQ, F_FW_WR_EQUIQ, IDXDIFF, wrq_cookie::ndesc, pidx, sge_eq::pidx, wrq_cookie::pidx, ring_eq_db(), sidx, sge_eq::sidx, sge_wrq::ss, sge_wrq::ss_len, sge_wrq::ss_pidx, t4_wrq_tx(), sge_wrq::tx_wrs_direct, sge_wrq::tx_wrs_ss, and wrq.
Referenced by del_hashfilter(), del_tcamfilter(), set_hashfilter(), set_tcamfilter(), set_tcb_field(), t4_write_l2e(), and t4_write_sme().
int cxgbe_media_change | ( | struct ifnet * | ifp | ) |
Definition at line 3170 of file t4_main.c.
References port_info::adapter, apply_link_config(), AUTONEG_DISABLE, AUTONEG_ENABLE, begin_synchronized_op(), end_synchronized_op(), fixup_link_config(), FW_PORT_CAP32_ANEG, hw_off_limits(), ifp, INTR_OK, port_info::link_cfg, port_info::media, PAUSE_AUTONEG, PAUSE_RX, PAUSE_TX, link_config::pcaps, vi_info::pi, PORT_LOCK, PORT_UNLOCK, link_config::requested_aneg, link_config::requested_fc, link_config::requested_speed, SLEEP_OK, port_info::up_vis, and port_info::vi.
Referenced by t4_attach(), and t4vf_attach().
void cxgbe_media_status | ( | struct ifnet * | ifp, |
struct ifmediareq * | ifmr | ||
) |
Definition at line 3359 of file t4_main.c.
References port_info::adapter, begin_synchronized_op(), build_medialist(), end_synchronized_op(), link_config::fc, hw_off_limits(), ifp, INTR_OK, port_info::link_cfg, link_config::link_ok, PAUSE_RX, PAUSE_TX, vi_info::pi, PORT_LOCK, port_mword(), PORT_UNLOCK, SLEEP_OK, link_config::speed, speed_to_fwcap(), t4_update_port_info(), port_info::up_vis, and port_info::vi.
Referenced by t4_attach(), and t4vf_attach().
Definition at line 1146 of file t4_filter.c.
References del_hashfilter(), del_tcamfilter(), adapter::flags, t4_filter::fs, tid_info::ftid_tab, FULL_INIT_DONE, t4_filter_specification::hash, tid_info::hftid_hash_4t, tid_info::hpftid_tab, t4_filter_specification::prio, separate_hpfilter_region(), and adapter::tids.
Referenced by t4_ioctl().
Definition at line 6183 of file t4_main.c.
References ADAPTER_LOCK, ADAPTER_UNLOCK, adapter::flags, IS_BUSY, adapter::last_op, adapter::last_op_flags, adapter::last_op_thr, adapter::sc_lock, SET_BUSY, and SET_DOOMED.
Referenced by cxgbe_detach(), and vcxgbe_detach().
void end_synchronized_op | ( | struct adapter * | sc, |
int | flags | ||
) |
Definition at line 6204 of file t4_main.c.
References ADAPTER_LOCK, ADAPTER_LOCK_ASSERT_OWNED, ADAPTER_UNLOCK, CLR_BUSY, adapter::flags, IS_BUSY, and LOCK_HELD.
Referenced by bind_txq_to_traffic_class(), collect_mps_tcam(), collect_tid(), cudbg_t4_fwcache(), cxgbe_detach(), cxgbe_init(), cxgbe_ioctl(), cxgbe_media_change(), cxgbe_media_status(), get_sge_context(), load_boot(), load_bootcfg(), load_cfg(), load_fw(), read_i2c(), read_sge_ctxt(), reset_adapter(), set_filter(), set_filter_mask(), set_filter_mode(), set_sched_class_config(), set_sched_class_params(), sysctl_autoneg(), sysctl_btphy(), sysctl_force_fec(), sysctl_holdoff_pktc_idx(), sysctl_holdoff_tmr_idx(), sysctl_loadavg(), sysctl_module_fec(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_pause_settings(), sysctl_qsize_rxq(), sysctl_qsize_txq(), sysctl_requested_fec(), sysctl_reset_sensor(), sysctl_temperature(), sysctl_tx_vm_wr(), sysctl_vdd(), t4_cloner_create(), t4_get_tracer(), t4_os_portmod_changed(), t4_resume(), t4_set_tracer(), t4_suspend(), t4_vxlan_start(), t4_vxlan_stop(), update_tx_sched(), vcxgbe_attach(), and vcxgbe_detach().
|
inlinestatic |
Definition at line 1088 of file adapter.h.
References adapter::intr_count.
Referenced by t4_setup_intr_handlers(), and t4_setup_vi_queues().
void free_atid | ( | struct adapter * | sc, |
int | atid | ||
) |
Definition at line 3879 of file t4_main.c.
References tid_info::afree, tid_info::atid_tab, tid_info::atids_in_use, aopen_entry::next, and adapter::tids.
Referenced by set_hashfilter(), and t4_hashfilter_ao_rpl().
Definition at line 5066 of file t4_sge.c.
References fl_sdesc::cl, cl_metadata(), extfree_rels, fl, FL_BUF_PACKING, FL_BUF_RESUME, sge_fl::flags, sge_fl::m0, fl_sdesc::nmbuf, cluster_metadata::refcount, sge::rx_buf_info, sge_fl::sdesc, adapter::sge, sge_fl::sidx, fl_sdesc::zidx, and rx_buf_info::zone.
Referenced by free_iq_fl(), and quiesce_iq_fl().
void free_hftid_hash | ( | struct tid_info * | t | ) |
Definition at line 140 of file t4_filter.c.
References tid_info::hftid_4t_mask, tid_info::hftid_cv, tid_info::hftid_hash_4t, tid_info::hftid_hash_tid, tid_info::hftid_tid_mask, LIST_HEAD(), and tid_info::tids_in_use.
Referenced by t4_detach_common().
int free_ring | ( | struct adapter * | sc, |
bus_dma_tag_t | tag, | ||
bus_dmamap_t | map, | ||
bus_addr_t | pa, | ||
void * | va | ||
) |
Definition at line 3467 of file t4_sge.c.
References tag.
Referenced by alloc_iq_fl(), alloc_ring(), free_eq(), and free_iq_fl().
|
inlinestatic |
Definition at line 1457 of file adapter.h.
Referenced by drain_wrq_wr_list().
Definition at line 626 of file t4_filter.c.
References t4_filter::fs, get_hashfilter(), get_tcamfilter(), and t4_filter_specification::hash.
Referenced by t4_ioctl().
int get_filter_mode | ( | struct adapter * | sc, |
uint32_t * | mode | ||
) |
Definition at line 494 of file t4_filter.c.
References fconf_to_mode(), tp_params::filter_mask, tp_params::filter_mode, adapter::params, adapter_params::tp, and tp_params::vnic_mode.
Referenced by t4_ioctl().
Definition at line 1096 of file adapter.h.
References adapter::error_flags, and HW_OFF_LIMITS.
Referenced by clear_stats(), cxgbe_ioctl(), cxgbe_media_change(), cxgbe_media_status(), get_filter_hits(), get_sge_context(), load_boot(), load_bootcfg(), load_cfg(), load_fw(), read_card_mem(), read_i2c(), reset_adapter(), sbuf_cim_la(), sbuf_devlog(), set_filter(), set_filter_mask(), set_filter_mode(), set_sched_class_config(), set_sched_class_params(), sysctl_autoneg(), sysctl_btphy(), sysctl_cctrl(), sysctl_cim_ibq_obq(), sysctl_cim_ma_la(), sysctl_cim_pif_la(), sysctl_cim_qcfg(), sysctl_cpl_stats(), sysctl_ddp_stats(), sysctl_fcoe_stats(), sysctl_force_fec(), sysctl_handle_t4_reg64(), sysctl_hw_sched(), sysctl_lb_stats(), sysctl_loadavg(), sysctl_meminfo(), sysctl_module_fec(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_path_mtus(), sysctl_pause_settings(), sysctl_pm_stats(), sysctl_rdma_stats(), sysctl_requested_fec(), sysctl_reset(), sysctl_reset_sensor(), sysctl_tcp_stats(), sysctl_temperature(), sysctl_tid_stats(), sysctl_tids(), sysctl_tnl_stats(), sysctl_tp_err_stats(), sysctl_tp_la(), sysctl_tp_la_mask(), sysctl_tx_rate(), sysctl_tx_vm_wr(), sysctl_ulprx_la(), sysctl_vdd(), sysctl_wcwr_stats(), t4_get_tracer(), t4_ioctl(), t4_os_pci_read_cfg1(), t4_os_pci_read_cfg2(), t4_os_pci_read_cfg4(), t4_os_pci_write_cfg1(), t4_os_pci_write_cfg2(), t4_os_pci_write_cfg4(), t4_read_reg(), t4_read_reg64(), t4_resume(), t4_set_tracer(), t4_suspend(), t4_vxlan_start(), t4_vxlan_stop(), t4_write_reg(), and t4_write_reg64().
|
inlinestatic |
Definition at line 666 of file adapter.h.
References iq.
Referenced by service_iq_fl().
void * lookup_atid | ( | struct adapter * | sc, |
int | atid | ||
) |
Definition at line 3871 of file t4_main.c.
References tid_info::atid_tab, aopen_entry::data, and adapter::tids.
Referenced by t4_hashfilter_ao_rpl().
MALLOC_DECLARE | ( | M_CXGBE | ) |
int parse_pkt | ( | struct mbuf ** | mp, |
bool | vm_wr | ||
) |
Definition at line 2682 of file t4_sge.c.
References calculate_mbuf_len16(), count_mbuf_nsegs(), defrags, max_nsegs_allowed(), mbuf_cflags(), MC_NOMAP, MC_TLS, needs_hwcsum(), needs_outer_tcp_csum(), needs_tso(), needs_vxlan_csum(), needs_vxlan_tso(), pullups, set_mbuf_cflags(), set_mbuf_len16(), set_mbuf_nsegs(), t6_ktls_parse_pkt(), txerr_interval, txerr_ratecheck, V_FW_ETH_TX_EO_WR_TSCLK, and V_FW_ETH_TX_EO_WR_TSOFF.
Referenced by cxgbe_transmit().
|
inlinestatic |
Definition at line 1473 of file adapter.h.
References rw_via_memwin().
Referenced by get_filter_hits(), read_card_mem(), and sbuf_devlog().
Definition at line 3899 of file t4_main.c.
References alloc_wrqe(), CPL_TID_RELEASE, INIT_TP_WR_MIT_CPL, queue_tid_release(), t4_wrq_tx(), and wrtod().
Referenced by t4_del_hashfilter_rpl(), t4_hashfilter_ao_rpl(), and t4_hashfilter_tcb_rpl().
int rw_via_memwin | ( | struct adapter * | sc, |
int | idx, | ||
uint32_t | addr, | ||
uint32_t * | val, | ||
int | len, | ||
int | rw | ||
) |
Definition at line 3765 of file t4_main.c.
References adapter::memwin, memwin::mw_aperture, memwin::mw_base, memwin::mw_curpos, NUM_MEMWIN, position_memwin(), t4_read_reg(), and t4_write_reg().
Referenced by read_via_memwin(), and write_via_memwin().
Definition at line 909 of file t4_filter.c.
References t4_filter_specification::action, adapter_init(), alloc_hftid_hash(), begin_synchronized_op(), check_fspec_against_fconf_iconf(), t4_filter_specification::dirsteer, t4_filter_specification::dirsteerhash, t4_filter_specification::dmac, end_synchronized_op(), t4_filter_specification::eport, FILTER_SWITCH, adapter::flags, t4_filter::fs, tid_info::ftid_cv, tid_info::ftid_tab, tid_info::ftids_in_use, FULL_INIT_DONE, t4_filter_specification::hash, hashfilter_ntuple(), tid_info::hftid_hash_4t, t4_filter_specification::hitcnts, tid_info::hpftid_tab, tid_info::hpftids_in_use, hw_off_limits(), t4_filter::idx, INTR_OK, t4_filter_tuple::iport, t4_filter_specification::iq, is_4tuple_specified(), is_hashfilter(), is_t4(), is_t5(), t4_filter_specification::maskhash, t4_filter_specification::nat_mode, t4_filter_specification::newdmac, t4_filter_specification::newsmac, t4_filter_specification::newvlan, tid_info::nftids, tid_info::nhpftids, adapter_params::nports, tid_info::ntids, adapter::params, t4_filter_specification::prio, separate_hpfilter_region(), set_hashfilter(), set_tcamfilter(), SLEEP_OK, t4_filter_specification::smac, adapter::smt, t4_filter_specification::swapmac, t4_l2t_alloc_switching(), t4_l2t_release(), t4_smt_alloc_switching(), t4_smt_release(), t4_smt_set_switching(), adapter::tids, t4_filter_specification::type, t4_filter_specification::val, t4_filter_specification::vlan, VLAN_REMOVE, and VLAN_REWRITE.
Referenced by t4_ioctl().
int set_filter_mask | ( | struct adapter * | sc, |
uint32_t | mode | ||
) |
Definition at line 552 of file t4_filter.c.
References begin_synchronized_op(), end_synchronized_op(), tp_params::filter_mask, tp_params::filter_mode, hw_off_limits(), INTR_OK, mode_to_fconf(), mode_to_iconf(), adapter::params, SLEEP_OK, t4_set_filter_cfg(), adapter::tids, tid_info::tids_in_use, adapter_params::tp, ULD_TOM, and tp_params::vnic_mode.
Referenced by t4_ioctl().
int set_filter_mode | ( | struct adapter * | sc, |
uint32_t | mode | ||
) |
Definition at line 510 of file t4_filter.c.
References begin_synchronized_op(), end_synchronized_op(), tp_params::filter_mode, tid_info::ftids_in_use, tid_info::hpftids_in_use, hw_off_limits(), INTR_OK, mode_to_fconf(), mode_to_iconf(), adapter::params, SLEEP_OK, t4_set_filter_cfg(), adapter::tids, tid_info::tids_in_use, adapter_params::tp, ULD_TOM, and tp_params::vnic_mode.
Referenced by t4_ioctl().
__aligned::STAILQ_HEAD | ( | wrqe | ) |
void * start_wrq_wr | ( | struct sge_wrq * | wrq, |
int | len16, | ||
struct wrq_cookie * | cookie | ||
) |
Definition at line 2940 of file t4_sge.c.
References sge_wrq::adapter, alloc_wrqe(), sge_eq::cidx, sge_eq::desc, drain_wrq_wr_list(), eq, sge_wrq::eq, EQ_LOCK, EQ_UNLOCK, IDXDIFF, IDXINCR, wrq_cookie::ndesc, sge_eq::pidx, wrq_cookie::pidx, read_hw_cidx(), SGE_MAX_WR_NDESC, sge_eq::sidx, sge_wrq::ss, sge_wrq::ss_len, sge_wrq::ss_pidx, tx_len16_to_desc(), and wrq.
Referenced by del_hashfilter(), del_tcamfilter(), set_hashfilter(), set_tcamfilter(), set_tcb_field(), t4_write_l2e(), and t4_write_sme().
SYSCTL_DECL | ( | _hw_cxgbe | ) |
int sysctl_tc | ( | SYSCTL_HANDLER_ARGS | ) |
Definition at line 592 of file t4_sched.c.
References vi_info::adapter, bind_txq_to_traffic_class(), vi_info::first_txq, adapter::flags, in_range(), IS_VF, adapter_params::nsched_cls, vi_info::ntxq, adapter::params, adapter::sge, tc_idx, sge_txq::tc_idx, and sge::txq.
Referenced by add_txq_sysctls().
int sysctl_tc_params | ( | SYSCTL_HANDLER_ARGS | ) |
Definition at line 616 of file t4_sched.c.
References tx_cl_rl_params::burstsize, tx_sched_params::cl_rl, CS_PARAMS_SET, tx_cl_rl_params::maxrate, tx_cl_rl_params::mode, tx_cl_rl_params::pktsize, adapter::port, port_top_speed(), tx_cl_rl_params::ratemode, tx_cl_rl_params::rateunit, SCHED_CLASS_MODE_CLASS, SCHED_CLASS_MODE_FLOW, SCHED_CLASS_RATEMODE_ABS, SCHED_CLASS_RATEMODE_REL, SCHED_CLASS_RATEUNIT_BITS, SCHED_CLASS_RATEUNIT_PKTS, port_info::sched_params, tx_cl_rl_params::state, and adapter::tc_lock.
Referenced by cxgbe_sysctls().
void t4_add_adapter | ( | struct adapter * | sc | ) |
Definition at line 3580 of file t4_main.c.
References t4_list_lock.
Referenced by t4_attach(), and t4vf_attach().
void t4_aes_getdeckey | ( | void * | dec_key, |
const void * | enc_key, | ||
unsigned int | kbits | ||
) |
Definition at line 375 of file t4_keyctx.c.
Referenced by ccr_aes_setkey().
void t4_copy_partial_hash | ( | int | alg, |
union authctx * | auth_ctx, | ||
void * | dst | ||
) |
Definition at line 314 of file t4_keyctx.c.
Referenced by ccr_init_hash_digest(), and t4_init_hmac_digest().
int t4_create_dma_tag | ( | struct adapter * | sc | ) |
Definition at line 977 of file t4_sge.c.
References adapter::dev, and adapter::dmat.
Referenced by t4_attach(), and t4vf_attach().
int t4_del_hashfilter_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1380 of file t4_filter.c.
References sge_iq::adapter, sge::ctrlq, free_filter_resources(), GET_TID, tid_info::hftid_cv, iq, lookup_hftid(), release_tid(), remove_hf(), remove_hftid(), adapter::sge, cpl_abort_rpl_rss::status, and adapter::tids.
Referenced by mod_event().
int t4_destroy_dma_tag | ( | struct adapter * | sc | ) |
Definition at line 1020 of file t4_sge.c.
References adapter::dmat.
Referenced by t4_detach_common().
int t4_detach_common | ( | device_t | dev | ) |
Definition at line 1681 of file t4_main.c.
References adapter_full_uninit(), adapter::cdev, sge::ctrlq, adapter::ctx, port_info::dev, sge::eqmap, adapter::flags, free_hftid_hash(), free_offload_policy(), tid_info::ftid_cv, tid_info::ftid_tab, FULL_INIT_DONE, FW_OK, tid_info::hpftid_tab, adapter::ifp_lock, adapter::intr_count, INTR_MSI, INTR_MSIX, adapter::intr_type, sge::iqmap, IS_VF, adapter::key_map, adapter::ktls_tick, adapter::l2t, MAX_NPORTS, adapter::mbox, adapter::memwin, adapter::msix_res, adapter::msix_rid, sge::nm_rxq, sge::nm_txq, NUM_MEMWIN, sge::ofld_rxq, sge::ofld_txq, adapter::pf, port_info::pi_lock, adapter::policy, adapter::policy_lock, adapter::port, adapter::reg_lock, adapter::regs_res, adapter::regs_rid, sge::rxq, adapter::sc_lock, adapter::sfl_callout, adapter::sfl_lock, adapter::sge, adapter::smt, t4_destroy_clip_table(), t4_destroy_dma_tag(), t4_free_atid_table(), t4_free_irq(), t4_free_l2t(), t4_free_smt(), t4_free_tx_sched(), t4_free_vi(), t4_fw_bye(), t4_intr_disable(), t4_list_lock, tid_info::tid_tab, adapter::tids, tom_tunables::tls_rx_ports, adapter::tt, sge::txq, adapter::udbs_res, adapter::udbs_rid, port_info::vi, and vi_info::viid.
Referenced by t4_attach(), t4_detach(), and t4vf_attach().
int t4_filter_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1224 of file t4_filter.c.
References sge_iq::adapter, cpl_set_tcb_rpl::cookie, free_filter_resources(), tid_info::ftid_base, tid_info::ftid_cv, tid_info::ftid_tab, tid_info::ftids_in_use, FW_FILTER_WR_EINVAL, FW_FILTER_WR_FLT_ADDED, FW_FILTER_WR_FLT_DELETED, FW_FILTER_WR_SMT_TBL_FULL, FW_FILTER_WR_SUCCESS, G_COOKIE, GET_TID, tid_info::hpftid_base, tid_info::hpftid_tab, tid_info::hpftids_in_use, iq, is_ftid(), is_hpftid(), M_TCB_SMAC_SEL, rss_header::opcode, S_TF_CCTRL_CWR, separate_hpfilter_region(), set_tcb_field(), set_tcb_tflag(), adapter::tids, V_TCB_SMAC_SEL, and W_TCB_SMAC_SEL.
Referenced by mod_event().
int t4_free_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 472 of file t4_sched.c.
References for_each_port, adapter::port, port_info::sched_params, adapter::tc_lock, and adapter::tc_task.
Referenced by t4_detach_common().
Definition at line 275 of file t4_tracer.c.
References begin_synchronized_op(), adapter::chan_map, t4_trace_params::data, trace_params::data, t4_tracer::enabled, end_synchronized_op(), HOLD_LOCK, hw_off_limits(), t4_tracer::idx, INTR_OK, trace_params::invert, t4_trace_params::invert, LOCK_HELD, t4_trace_params::mask, trace_params::mask, trace_params::min_len, t4_trace_params::min_len, NTRACE, trace_params::port, t4_trace_params::port, trace_params::skip_len, t4_trace_params::skip_len, trace_params::skip_ofst, t4_trace_params::skip_ofst, SLEEP_OK, trace_params::snap_len, t4_trace_params::snap_len, t4_get_trace_filter(), t4_tracer::tp, adapter::tracer_valid, and t4_tracer::valid.
Referenced by t4_ioctl().
int t4_hashfilter_ao_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1296 of file t4_filter.c.
References act_open_has_tid(), act_open_rpl_status_to_errno(), sge_iq::adapter, cpl_act_open_rpl::atid_status, configure_hashfilter_tcb(), CPL_ERR_NONE, sge::ctrlq, free_atid(), free_filter_resources(), G_AOPEN_ATID, G_AOPEN_STATUS, G_TID_TID, GET_TID, tid_info::hftid_cv, insert_hftid(), iq, lookup_atid(), lookup_hftid(), release_tid(), remove_hf(), adapter::sge, and adapter::tids.
Referenced by mod_event().
int t4_hashfilter_tcb_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1345 of file t4_filter.c.
References sge_iq::adapter, sge::ctrlq, free_filter_resources(), GET_TID, tid_info::hftid_cv, iq, lookup_hftid(), release_tid(), remove_hf(), remove_hftid(), adapter::sge, cpl_set_tcb_rpl::status, and adapter::tids.
Referenced by mod_event().
void t4_init_devnames | ( | struct adapter * | sc | ) |
Definition at line 1076 of file t4_main.c.
References CHELSIO_T4, chip_id(), adapter::dev, and adapter::names.
Referenced by t4_attach(), and t4vf_attach().
void t4_init_gmac_hash | ( | const char * | key, |
int | klen, | ||
char * | ghash | ||
) |
Definition at line 301 of file t4_keyctx.c.
Referenced by ccr_newsession(), and ccr_process().
void t4_init_hmac_digest | ( | const struct auth_hash * | axf, |
u_int | partial_digest_len, | ||
const char * | key, | ||
int | klen, | ||
char * | dst | ||
) |
Definition at line 352 of file t4_keyctx.c.
References t4_copy_partial_hash().
Referenced by ccr_newsession(), and ccr_process().
void t4_init_rx_buf_info | ( | struct adapter * | sc | ) |
Definition at line 854 of file t4_sge.c.
References BUF_PACKING_OK, CL_METADATA_SIZE, adapter::flags, rx_buf_info::hwidx1, rx_buf_info::hwidx2, hwsz_ok(), adapter::params, sge::rx_buf_info, sge::safe_zidx, safest_rx_cluster, adapter::sge, adapter_params::sge, sge_params::sge_fl_buffer_size, SGE_FLBUF_SIZES, rx_buf_info::size1, rx_buf_info::size2, SW_ZONE_SIZES, rx_buf_info::type, and rx_buf_info::zone.
Referenced by get_params__post_init().
int t4_init_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 454 of file t4_sched.c.
References for_each_port, adapter_params::nsched_cls, adapter::params, adapter::port, port_info::sched_params, adapter::tc_lock, adapter::tc_task, and update_tx_sched().
Referenced by t4_attach().
void t4_intr | ( | void * | arg | ) |
Definition at line 1339 of file t4_sge.c.
References iq, IQS_BUSY, IQS_IDLE, service_iq_fl(), and sge_iq::state.
Referenced by t4_setup_intr_handlers().
void t4_intr_all | ( | void * | arg | ) |
Definition at line 1282 of file t4_sge.c.
References A_PCIE_PF_CLI, sge::fwq, adapter::intr_count, INTR_INTX, adapter::intr_type, MYPF_REG, adapter::sge, t4_intr_err(), t4_intr_evt(), and t4_write_reg().
Referenced by t4_setup_intr_handlers().
void t4_intr_err | ( | void * | arg | ) |
Definition at line 1301 of file t4_sge.c.
References A_PL_PF_INT_CAUSE, ADAP_FATAL_ERR, adapter::debug_flags, DF_VERBOSE_SLOWINTR, adapter::error_flags, F_PFSW, MYPF_REG, adapter::swintr, t4_fatal_err(), t4_read_reg(), t4_slow_intr_handler(), and t4_write_reg().
Referenced by t4_intr_all(), and t4_setup_intr_handlers().
void t4_intr_evt | ( | void * | arg | ) |
Definition at line 1325 of file t4_sge.c.
References iq, IQS_BUSY, IQS_IDLE, service_iq(), and sge_iq::state.
Referenced by t4_intr_all(), and t4_setup_intr_handlers().
void t4_iterate | ( | void(*)(struct adapter *, void *) | func, |
void * | arg | ||
) |
Definition at line 12190 of file t4_main.c.
References t4_list_lock.
Referenced by t4_cloner_create(), t4_vxlan_start_handler(), and t4_vxlan_stop_handler().
int t4_map_bar_2 | ( | struct adapter * | sc | ) |
Definition at line 3614 of file t4_main.c.
References A_SGE_STAT_CFG, CHELSIO_T5, chip_id(), adapter::dev, DOORBELL_UDB, DOORBELL_UDBWC, DOORBELL_WCWR, adapter::doorbells, is_t4(), is_t5(), adapter::iwt, adapter::rdmacaps, t4_write_reg(), adapter::udbs_base, adapter::udbs_res, adapter::udbs_rid, V_STATMODE, V_STATSOURCE_T5, V_T6_STATMODE, and iw_tunables::wc_en.
Referenced by t4_attach(), and t4vf_attach().
int t4_map_bars_0_and_4 | ( | struct adapter * | sc | ) |
Definition at line 3588 of file t4_main.c.
References adapter::bh, adapter::bt, adapter::dev, DOORBELL_KDB, adapter::doorbells, adapter::mmio_len, adapter::msix_res, adapter::msix_rid, adapter::regs_res, and adapter::regs_rid.
Referenced by t4_attach(), and t4vf_attach().
void t4_os_cim_err | ( | struct adapter * | sc | ) |
Definition at line 9026 of file t4_main.c.
References ADAP_CIM_ERR, and adapter::error_flags.
Referenced by cim_intr_handler().
int t4_os_find_pci_capability | ( | struct adapter * | sc, |
int | cap | ||
) |
Definition at line 12070 of file t4_main.c.
References adapter::dev.
Referenced by get_pci_mode(), set_pcie_completion_timeout(), and t4_prep_adapter().
void t4_os_link_changed | ( | struct port_info * | pi | ) |
Definition at line 12145 of file t4_main.c.
References A_MAC_PORT_AFRAMECHECKSEQUENCEERRORS, A_MAC_PORT_MTIP_1G10G_RX_CRCERRORS, port_info::adapter, port_info::fcs_base, port_info::fcs_reg, link_config::fec, FEC_RS, for_each_vi, ifp, vi_info::ifp, is_t6(), port_info::link_cfg, link_config::link_ok, PORT_LOCK_ASSERT_OWNED, port_stats::rx_fcs_err, link_config::speed, port_info::stats, t4_read_reg64(), T5_PORT_REG, and port_info::tx_chan.
Referenced by cxgbe_init_synchronized(), cxgbe_uninit_synchronized(), t4_handle_fw_rpl(), t4_resume(), and t4_suspend().
|
inlinestatic |
Definition at line 1147 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
|
inlinestatic |
Definition at line 1163 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
Referenced by get_pci_mode(), set_pcie_completion_timeout(), t4_load_boot(), t4_prep_adapter(), and t4_seeprom_wait().
|
inlinestatic |
Definition at line 1180 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
Referenced by t4_seeprom_read().
int t4_os_pci_restore_state | ( | struct adapter * | sc | ) |
Definition at line 12091 of file t4_main.c.
References adapter::dev.
int t4_os_pci_save_state | ( | struct adapter * | sc | ) |
Definition at line 12078 of file t4_main.c.
References adapter::dev.
|
inlinestatic |
Definition at line 1155 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
|
inlinestatic |
Definition at line 1172 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
Referenced by set_pcie_completion_timeout(), t4_seeprom_read(), and t4_seeprom_write().
|
inlinestatic |
Definition at line 1188 of file adapter.h.
References adapter::dev, hw_off_limits(), and adapter::reset_thread.
Referenced by t4_seeprom_write().
void t4_os_portmod_changed | ( | struct port_info * | pi | ) |
Definition at line 12104 of file t4_main.c.
References port_info::adapter, apply_link_config(), begin_synchronized_op(), build_medialist(), end_synchronized_op(), FIXED_IFMEDIA, fixup_link_config(), port_info::flags, FW_PORT_MOD_TYPE_NONE, FW_PORT_MOD_TYPE_NOTSUPPORTED, FW_PORT_MOD_TYPE_UNKNOWN, HOLD_LOCK, ifp, vi_info::ifp, LOCK_HELD, port_info::mod_type, PORT_LOCK, port_top_speed(), port_info::port_type, PORT_UNLOCK, and port_info::vi.
Referenced by t4_handle_fw_rpl().
|
inlinestatic |
Definition at line 1203 of file adapter.h.
References vi_info::hw_addr, and port_info::vi.
Referenced by t4_port_init(), and t4vf_attach().
|
inlinestatic |
Definition at line 1104 of file adapter.h.
References adapter::bh, adapter::bt, hw_off_limits(), and adapter::reset_thread.
Referenced by check_busy_bit(), check_tx_state(), cim_ha_rreg(), cim_intr_handler(), collect_clk_info(), collect_full(), collect_hw_sched(), collect_le_tcam(), collect_mem_info(), collect_mps_tcam(), collect_rss_config(), collect_sw_state(), collect_tid(), collect_tp_la(), collect_ulptx_la(), collect_wc_stats(), contact_firmware(), cudbg_read_tid(), dump_cim_regs(), fill_meminfo(), get_filter_hits(), get_max_ctxt_qid(), get_params__post_init(), load_boot(), ma_wrap_status(), mem_intr_handler(), mps_intr_handler(), mps_rpl_backdoor(), position_memwin(), read_filter_mode_and_ingress_config(), read_sge_debug_data(), read_vf_stat(), rw_via_memwin(), set_params__post_init(), setup_memwin(), sf1_read(), sf1_write(), sge_intr_handler(), sysctl_hw_sched(), sysctl_meminfo(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_tids(), sysctl_tp_la(), sysctl_wcwr_stats(), t4_attach(), t4_cim_read(), t4_cim_read_ma_la(), t4_cim_read_pif_la(), t4_cim_write(), t4_edc_err_read(), t4_edc_read(), t4_fw_hello(), t4_fw_restart(), t4_get_chan_txrate(), t4_get_mps_bg_map(), t4_get_port_stats(), t4_get_regs(), t4_get_rx_e_chan_map(), t4_get_trace_filter(), t4_handle_intr(), t4_hw_pci_read_cfg4(), t4_idma_monitor(), t4_init_devlog_params(), t4_init_sge_params(), t4_init_tp_params(), t4_intr_clear(), t4_intr_err(), t4_ioctl(), t4_mc_read(), t4_pmrx_get_stats(), t4_pmtx_get_stats(), t4_prep_adapter(), t4_read_cim_ibq(), t4_read_cim_obq(), t4_read_cimq_cfg(), t4_read_cong_tbl(), t4_read_indirect(), t4_read_mtu_tbl(), t4_read_pace_tbl(), t4_read_rss_vf_config(), t4_report_fw_error(), t4_resume(), t4_set_reg_field(), t4_set_sched_bps(), t4_set_sched_ipg(), t4_set_trace_filter(), t4_sge_ctxt_rd_bd(), t4_sge_decode_idma_state(), t4_show_intr_info(), t4_shutdown_adapter(), t4_slow_intr_handler(), t4_tp_read_la(), t4_tp_wr_bits_indirect(), t4_ulprx_read_la(), t4_verify_chip_settings(), t4_wait_op_done_val(), t4_wol_pat_enable(), t4_wr_mbox_meat_timeout(), t4_write_rss_key(), t4_write_rss_vf_config(), t4vf_get_sge_params(), t4vf_ioctl(), t4vf_wait_dev_ready(), t5_wtp_data(), t6_wtp_data(), validate_mem_range(), and validate_mt_off_len().
|
inlinestatic |
Definition at line 1120 of file adapter.h.
References adapter::bh, adapter::bt, hw_off_limits(), and adapter::reset_thread.
Referenced by CH_DUMP_MBOX(), clear_stats(), collect_mps_tcam(), get_mbox_rpl(), read_tx_state_one(), sysctl_handle_t4_reg64(), sysctl_mps_tcam(), t4_edc_err_read(), t4_edc_read(), t4_get_port_stats(), t4_ioctl(), t4_mc_read(), t4_os_link_changed(), t4_pmrx_get_stats(), t4_pmtx_get_stats(), t4_tp_read_la(), and t4vf_ioctl().
void t4_register_an_handler | ( | an_handler_t | h | ) |
Definition at line 357 of file t4_sge.c.
References t4_an_handler.
void t4_register_cpl_handler | ( | int | opcode, |
cpl_handler_t | h | ||
) |
Definition at line 387 of file t4_sge.c.
References t4_cpl_handler.
Referenced by ccr_modevent(), mod_event(), t4_init_shared_cpl_handlers(), and t4_sge_modload().
void t4_register_fw_msg_handler | ( | int | type, |
fw_msg_handler_t | h | ||
) |
Definition at line 368 of file t4_sge.c.
References FW6_TYPE_RSSCPL, FW_TYPE_RSSCPL, and t4_fw_msg_handler.
Referenced by t4_sge_modload().
void t4_register_shared_cpl_handler | ( | int | opcode, |
cpl_handler_t | h, | ||
int | cookie | ||
) |
Definition at line 496 of file t4_sge.c.
References abort_rpl_rss_handlers, act_open_rpl_handlers, CPL_ABORT_RPL_RSS, CPL_ACT_OPEN_RPL, CPL_COOKIE_RESERVED, CPL_FW4_ACK, CPL_L2T_WRITE_RPL, CPL_SET_TCB_RPL, fw4_ack_handlers, l2t_write_rpl_handlers, NUM_CPL_COOKIES, set_tcb_rpl_handlers, and t4_cpl_handler.
Referenced by mod_event(), and t4_sge_modload().
void t4_release_cl_rl | ( | struct adapter * | sc, |
int | port_id, | ||
int | tc_idx | ||
) |
Definition at line 577 of file t4_sched.c.
References tx_sched_params::cl_rl, adapter::port, tx_cl_rl_params::refcount, port_info::sched_params, tc_idx, and adapter::tc_lock.
int t4_reserve_cl_rl_kbps | ( | struct adapter * | sc, |
int | port_id, | ||
u_int | maxrate, | ||
int * | tc_idx | ||
) |
Definition at line 497 of file t4_sched.c.
References tx_cl_rl_params::burstsize, tx_sched_params::burstsize, CF_USER, tx_sched_params::cl_rl, CS_HW_UPDATE_REQUESTED, CS_PARAMS_SET, CS_UNINITIALIZED, tx_cl_rl_params::flags, FW_SCHED_PARAMS_MODE_FLOW, FW_SCHED_PARAMS_RATE_ABS, FW_SCHED_PARAMS_UNIT_BITRATE, vi_info::ifp, tx_cl_rl_params::maxrate, tx_cl_rl_params::mode, adapter_params::nsched_cls, adapter::params, tx_cl_rl_params::pktsize, tx_sched_params::pktsize, adapter::port, port_info::port_id, tx_cl_rl_params::ratemode, tx_cl_rl_params::rateunit, tx_cl_rl_params::refcount, port_info::sched_params, tx_cl_rl_params::state, t4_update_tx_sched(), tc_idx, adapter::tc_lock, and port_info::vi.
int t4_set_sched_class | ( | struct adapter * | sc, |
struct t4_sched_params * | p | ||
) |
Definition at line 304 of file t4_sched.c.
References t4_sched_params::config, t4_sched_params::minmax, t4_sched_params::params, SCHED_CLASS_SUBCMD_CONFIG, SCHED_CLASS_SUBCMD_PARAMS, SCHED_CLASS_TYPE_PACKET, set_sched_class_config(), set_sched_class_params(), t4_sched_params::subcmd, t4_sched_params::type, and t4_sched_params::u.
Referenced by t4_ioctl(), and t4vf_ioctl().
int t4_set_sched_queue | ( | struct adapter * | sc, |
struct t4_sched_queue * | p | ||
) |
Definition at line 405 of file t4_sched.c.
References bind_txq_to_traffic_class(), t4_sched_queue::cl, vi_info::first_txq, vi_info::flags, for_each_txq, in_range(), adapter_params::nports, adapter_params::nsched_cls, vi_info::ntxq, adapter::params, adapter::port, t4_sched_queue::port, t4_sched_queue::queue, adapter::sge, sge::txq, port_info::vi, and VI_INIT_DONE.
Referenced by t4_ioctl(), and t4vf_ioctl().
Definition at line 333 of file t4_tracer.c.
References A_MPS_TRC_CFG, begin_synchronized_op(), t4_trace_params::data, trace_params::data, t4_tracer::enabled, end_synchronized_op(), F_TRCEN, HOLD_LOCK, hw_off_limits(), t4_tracer::idx, INTR_OK, trace_params::invert, t4_trace_params::invert, LOCK_HELD, M_TFLENGTH, M_TFMINPKTSIZE, M_TFOFFSET, t4_trace_params::mask, trace_params::mask, trace_params::min_len, t4_trace_params::min_len, NTRACE, adapter::port, trace_params::port, t4_trace_params::port, trace_params::skip_len, t4_trace_params::skip_len, trace_params::skip_ofst, t4_trace_params::skip_ofst, SLEEP_OK, trace_params::snap_len, t4_trace_params::snap_len, t4_set_reg_field(), t4_set_trace_filter(), t4_tracer::tp, adapter::tracer_enabled, adapter::tracer_valid, port_info::tx_chan, and t4_tracer::valid.
Referenced by t4_ioctl().
int t4_setup_adapter_queues | ( | struct adapter * | sc | ) |
Definition at line 1036 of file t4_sge.c.
References ADAPTER_LOCK_ASSERT_NOTOWNED, alloc_ctrlq(), alloc_fwq(), adapter::flags, for_each_port, and IS_VF.
Referenced by adapter_full_init().
int t4_setup_intr_handlers | ( | struct adapter * | sc | ) |
Definition at line 6373 of file t4_main.c.
References adapter::dev, vi_info::first_intr, vi_info::first_nm_rxq, vi_info::first_rxq, adapter::flags, for_each_ofld_rxq, for_each_port, for_each_rxq, for_each_vi, forwarding_intr_to_fwq(), sge::fwq, adapter::intr_count, INTR_INTX, adapter::intr_type, IS_VF, vi_info::nintr, nm_rxq, sge::nm_rxq, vi_info::nnmrxq, adapter_params::nports, vi_info::nrxq, adapter::params, adapter::port, rid, rxq, sge::rxq, adapter::sge, t4_alloc_irq(), T4_EXTRA_INTR, t4_intr(), t4_intr_all(), t4_intr_err(), t4_intr_evt(), T4VF_EXTRA_INTR, and sge_nm_rxq::vi.
Referenced by t4_attach(), and t4vf_attach().
int t4_setup_vi_queues | ( | struct vi_info * | vi | ) |
Definition at line 1107 of file t4_sge.c.
References vi_info::adapter, alloc_rxq(), alloc_txq(), vi_info::first_intr, vi_info::first_nm_rxq, for_each_nm_rxq, for_each_nm_txq, for_each_ofld_rxq, for_each_ofld_txq, for_each_rxq, for_each_txq, forwarding_intr_to_fwq(), ifp, vi_info::ifp, iqidx, max_rx_payload(), nm_rxq, vi_info::nnmrxq, vi_info::nrxq, rxq, and t4_teardown_vi_queues().
Referenced by vi_full_init().
uint64_t t4_sge_extfree_refs | ( | void | ) |
Definition at line 623 of file t4_sge.c.
References extfree_refs, and extfree_rels.
Referenced by mod_event().
void t4_sge_modload | ( | void | ) |
Definition at line 533 of file t4_sge.c.
References cong_drop, CPL_COOKIE_ETHOFLD, CPL_FW4_ACK, CPL_FW4_MSG, CPL_FW6_MSG, CPL_SGE_EGR_UPDATE, defrags, extfree_refs, extfree_rels, fl_pktshift, FW6_TYPE_CMD_RPL, FW6_TYPE_WRERR_RPL, handle_fw_msg(), handle_sge_egr_update(), largest_rx_cluster, pullups, safest_rx_cluster, spg_len, t4_handle_fw_rpl(), t4_handle_wrerr_rpl(), t4_init_shared_cpl_handlers(), t4_register_cpl_handler(), t4_register_fw_msg_handler(), t4_register_shared_cpl_handler(), and tscale.
Referenced by mod_event().
void t4_sge_modunload | ( | void | ) |
Definition at line 613 of file t4_sge.c.
References defrags, extfree_refs, extfree_rels, and pullups.
Referenced by mod_event().
void t4_sge_sysctls | ( | struct adapter * | sc, |
struct sysctl_ctx_list * | ctx, | ||
struct sysctl_oid_list * | children | ||
) |
Definition at line 994 of file t4_sge.c.
References cong_drop, sge_params::fl_pktshift, sge_params::pack_boundary, sge_params::pad_boundary, adapter::params, adapter_params::sge, sge_params::spg_len, and sysctl_bufsizes().
Referenced by t4_sysctls().
void t4_sysctls | ( | struct adapter * | sc | ) |
Definition at line 7179 of file t4_main.c.
References A_TP_FINWAIT2_TIMER, A_TP_INIT_SRTT, A_TP_KEEP_IDLE, A_TP_KEEP_INTVL, A_TP_PERS_MAX, A_TP_PERS_MIN, A_TP_RXT_MAX, A_TP_RXT_MIN, tom_tunables::autorcvbuf_inc, adapter::bs_version, vpd_params::cclk, adapter::cfcsum, adapter::cfg_file, CHELSIO_T4, CHELSIO_T5, chip_id(), chip_rev(), CIM_NUM_IBQ, tls_tunables::combo_wrs, tom_tunables::cong_algorithm, tom_tunables::cop_managed_offloading, sge_params::counter_val, adapter::ctx, tom_tunables::ddp, adapter::debug_flags, adapter::dev, doorbells, adapter::doorbells, vpd_params::ec, adapter::er_version, adapter::flags, adapter::fw_version, tls_tunables::inline_keys, is_ktls(), is_offload(), IS_VF, tom_tunables::iso, adapter::lro_timeout, vpd_params::md, vpd_params::na, tid_info::nftids, adapter_params::nports, adapter::params, vpd_params::pn, tom_tunables::rx_coalesce, S_KEEPALIVEMAXR2, S_RXTSHIFTMAXR2, S_SYNSHIFTMAX, adapter::sc_do_rxcopy, adapter_params::scfg_vers, adapter_params::sge, vpd_params::sn, tom_tunables::sndbuf, adapter::swintr, sysctl_bitfield_8b(), SYSCTL_CAP, sysctl_cctrl(), sysctl_cim_ibq_obq(), sysctl_cim_la(), sysctl_cim_ma_la(), sysctl_cim_pif_la(), sysctl_cim_qcfg(), sysctl_clip(), sysctl_cpl_stats(), sysctl_cpus(), sysctl_ddp_stats(), sysctl_devlog(), sysctl_fcoe_stats(), sysctl_hw_sched(), sysctl_int_array(), sysctl_l2t(), sysctl_lb_stats(), sysctl_loadavg(), sysctl_meminfo(), sysctl_mps_tcam(), sysctl_mps_tcam_t6(), sysctl_path_mtus(), sysctl_pm_stats(), sysctl_rdma_stats(), sysctl_reset(), sysctl_reset_sensor(), sysctl_smt(), sysctl_tcp_stats(), sysctl_temperature(), sysctl_tid_stats(), sysctl_tids(), sysctl_tnl_stats(), sysctl_tp_err_stats(), sysctl_tp_la(), sysctl_tp_la_mask(), sysctl_tx_rate(), sysctl_ulprx_la(), sysctl_vdd(), sysctl_wcwr_stats(), t4_sge_sysctls(), adapter::tids, sge_params::timer_val, tom_tunables::tls, tom_tunables::tls_rx_timeout, adapter::tlst, adapter::tp_version, adapter::tt, tom_tunables::tx_align, tom_tunables::tx_zcopy, tom_tunables::update_hc_on_pmtu_change, adapter_params::vpd, and adapter_params::vpd_vers.
Referenced by t4_attach(), and t4vf_attach().
int t4_teardown_adapter_queues | ( | struct adapter * | sc | ) |
Definition at line 1075 of file t4_sge.c.
References ADAPTER_LOCK_ASSERT_NOTOWNED, sge::ctrlq, adapter::flags, for_each_port, free_ctrlq(), free_fwq(), IS_VF, and adapter::sge.
Referenced by adapter_full_uninit().
int t4_teardown_vi_queues | ( | struct vi_info * | vi | ) |
Definition at line 1215 of file t4_sge.c.
References for_each_nm_rxq, for_each_nm_txq, for_each_ofld_rxq, for_each_ofld_txq, for_each_rxq, for_each_txq, free_rxq(), free_txq(), vi_info::ifp, nm_rxq, and rxq.
Referenced by t4_setup_vi_queues(), and vi_full_uninit().
int t4_trace_pkt | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 420 of file t4_tracer.c.
References sge_iq::adapter, ifp, adapter::ifp, adapter::ifp_lock, iq, and rss_header::opcode.
Referenced by mod_event().
void t4_tracer_modload | ( | void | ) |
Definition at line 234 of file t4_tracer.c.
References t4_cloner, t4_cloner_create(), t4_cloner_destroy(), t4_cloner_match(), t4_cloner_name, and t4_trace_lock.
Referenced by mod_event().
void t4_tracer_modunload | ( | void | ) |
Definition at line 243 of file t4_tracer.c.
References t4_cloner, and t4_trace_lock.
Referenced by mod_event().
void t4_tracer_port_detach | ( | struct adapter * | sc | ) |
Definition at line 260 of file t4_tracer.c.
References adapter::ifp, adapter::ifp_lock, adapter::media, and t4_trace_lock.
Referenced by cxgbe_detach().
void t4_tweak_chip_settings | ( | struct adapter * | sc | ) |
Definition at line 712 of file t4_sge.c.
References A_SGE_CONTROL, A_SGE_FL_BUFFER_SIZE0, A_SGE_FL_BUFFER_SIZE1, A_SGE_FL_BUFFER_SIZE15, A_SGE_FL_BUFFER_SIZE2, A_SGE_HOST_PAGE_SIZE, A_SGE_INGRESS_RX_THRESHOLD, A_SGE_ITP_CONTROL, A_SGE_TIMER_VALUE_0_AND_1, A_SGE_TIMER_VALUE_2_AND_3, A_SGE_TIMER_VALUE_4_AND_5, A_TP_CMM_CONFIG, A_TP_PARA_REG5, A_ULP_RX_CTL, A_ULP_RX_ISCSI_PSZ, A_ULP_RX_TDDP_PSZ, vpd_params::cclk, CHELSIO_T6, chip_id(), CL_METADATA_SIZE, adapter::debug_flags, DF_DISABLE_TCB_CACHE, F_EGRSTATUSPAGESIZE, F_ISCSITAGTCB, F_REARMDDPOFFSET, F_RESETDDPOFFSET, F_RXPKTCPLMODE, F_TDDPTAGTCB, F_WRTHRTHRESHEN, fl_pktshift, adapter::flags, M_INDICATESIZE, M_PKTSHIFT, M_RDTHRESHOLD, M_TIMERVALUE0, M_TSCALE, M_WRTHRTHRESH, MASTER_PF, adapter::params, RX_COPY_THRESHOLD, setup_pad_and_pack_boundaries(), SGE_NCOUNTERS, SGE_NTIMERS, spg_len, t4_set_reg_field(), t4_tp_pio_read(), t4_tp_pio_write(), t4_write_reg(), tscale, us_to_core_ticks(), V_EGRSTATUSPAGESIZE, V_HOSTPAGESIZEPF0, V_HOSTPAGESIZEPF1, V_HOSTPAGESIZEPF2, V_HOSTPAGESIZEPF3, V_HOSTPAGESIZEPF4, V_HOSTPAGESIZEPF5, V_HOSTPAGESIZEPF6, V_HOSTPAGESIZEPF7, V_HPZ0, V_HPZ1, V_HPZ2, V_HPZ3, V_INDICATESIZE, V_PKTSHIFT, V_RDTHRESHOLD, V_THRESHOLD_0, V_THRESHOLD_1, V_THRESHOLD_2, V_THRESHOLD_3, V_TIMERVALUE0, V_TIMERVALUE1, V_TIMERVALUE2, V_TIMERVALUE3, V_TIMERVALUE4, V_TIMERVALUE5, V_TSCALE, V_WRTHRTHRESH, and adapter_params::vpd.
Referenced by apply_cfg_and_initialize().
void t4_update_fl_bufsize | ( | struct ifnet * | ifp | ) |
Definition at line 2222 of file t4_sge.c.
References vi_info::adapter, find_refill_source(), fl, sge_rxq::fl, sge_ofld_rxq::fl, FL_BUF_PACKING, FL_LOCK, FL_UNLOCK, sge_fl::flags, for_each_ofld_rxq, for_each_rxq, ifp, max_rx_payload(), rxq, and sge_fl::zidx.
Referenced by cxgbe_ioctl().
void t4_update_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 490 of file t4_sched.c.
References adapter::tc_task.
Referenced by t4_reserve_cl_rl_kbps().
|
inlinestatic |
Definition at line 1218 of file adapter.h.
References adapter::flags, and FW_OK.
Referenced by t4_tp_indirect_rw().
int t4_verify_chip_settings | ( | struct adapter * | sc | ) |
Definition at line 920 of file t4_sge.c.
References A_TP_PARA_REG5, A_ULP_RX_CTL, A_ULP_RX_TDDP_PSZ, t4_virt_res::ddp, adapter::dev, F_REARMDDPOFFSET, F_RESETDDPOFFSET, F_RXPKTCPLMODE, F_TDDPTAGTCB, adapter::flags, IS_VF, M_INDICATESIZE, sge_params::page_shift, adapter::params, r, RX_COPY_THRESHOLD, adapter_params::sge, sge_params::sge_control, t4_range::size, t4_read_reg(), V_HPZ0, V_HPZ1, V_HPZ2, V_HPZ3, V_INDICATESIZE, and adapter::vres.
Referenced by get_params__post_init().
|
inlinestatic |
Definition at line 1112 of file adapter.h.
References adapter::bh, adapter::bt, hw_off_limits(), and adapter::reset_thread.
Referenced by alloc_iq_fl_hwq(), cim_ha_rreg(), cim_intr_handler(), collect_mps_tcam(), cudbg_read_tid(), cxgbe_init_synchronized(), enable_vxlan_rx(), ma_wrap_status(), mem_intr_handler(), mps_intr_handler(), position_memwin(), rd_rss_row(), read_sge_debug_data(), read_vf_stat(), ring_eq_db(), ring_fl_db(), rw_via_memwin(), service_iq(), service_iq_fl(), setup_memwin(), sf1_read(), sf1_write(), sge_intr_handler(), sysctl_mps_tcam_t6(), t4_cim_read(), t4_cim_read_ma_la(), t4_cim_read_pif_la(), t4_cim_write(), t4_clr_port_stats(), t4_clr_vi_stats(), t4_edc_read(), t4_flash_erase_sectors(), t4_get_flash_params(), t4_handle_intr(), t4_hw_pci_read_cfg4(), t4_idma_monitor(), t4_intr_all(), t4_intr_clear(), t4_intr_disable(), t4_intr_enable(), t4_intr_err(), t4_ioctl(), t4_load_mtus(), t4_map_bar_2(), t4_mc_read(), t4_pmrx_get_stats(), t4_pmtx_get_stats(), t4_read_cim_ibq(), t4_read_cim_obq(), t4_read_cimq_cfg(), t4_read_cong_tbl(), t4_read_flash(), t4_read_indirect(), t4_read_mtu_tbl(), t4_read_pace_tbl(), t4_read_rss_vf_config(), t4_set_pace_tbl(), t4_set_reg_field(), t4_set_sched_bps(), t4_set_sched_ipg(), t4_set_trace_filter(), t4_sge_ctxt_rd_bd(), t4_shutdown_adapter(), t4_slow_intr_handler(), t4_tp_read_la(), t4_tp_wr_bits_indirect(), t4_tweak_chip_settings(), t4_ulprx_read_la(), t4_wol_magic_enable(), t4_wol_pat_enable(), t4_wr_mbox_meat_timeout(), t4_write_flash(), t4_write_indirect(), t4_write_rss_key(), t4_write_rss_vf_config(), and t4vf_ioctl().
|
inlinestatic |
Definition at line 1134 of file adapter.h.
References adapter::bh, adapter::bt, hw_off_limits(), and adapter::reset_thread.
Referenced by t4_ioctl(), t4_wr_mbox_meat_timeout(), and t4vf_ioctl().
Definition at line 1463 of file adapter.h.
References t4_wrq_tx_locked(), TXQ_LOCK, TXQ_UNLOCK, wrq, and wrqe::wrq.
Referenced by ccr_ccm(), ccr_cipher(), ccr_eta(), ccr_gcm(), ccr_hash(), commit_wrq_wr(), release_tid(), and t4_l2t_send().
Definition at line 2197 of file t4_sge.c.
References sge_eq::dbidx, drain_wrq_wr_list(), eq, sge_wrq::eq, EQ_ESIZE, EQ_LOCK_ASSERT_OWNED, sge_wrq::ndesc_needed, sge_wrq::nwr_pending, sge_eq::pidx, SGE_MAX_WR_LEN, wrqe::wr_len, and wrq.
Referenced by t4_wrq_tx().
int t5_trace_pkt | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 442 of file t4_tracer.c.
References sge_iq::adapter, ifp, adapter::ifp, adapter::ifp_lock, iq, and rss_header::opcode.
Referenced by mod_event().
__aligned::TAILQ_HEAD | ( | wrq_incomplete_wrs | , |
wrq_cookie | |||
) |
int tnl_cong | ( | struct port_info * | pi, |
int | drop | ||
) |
Definition at line 3927 of file t4_sge.c.
References port_info::rx_e_chan_map.
Referenced by alloc_rxq().
|
inlinestatic |
Definition at line 1490 of file adapter.h.
References EQ_ESIZE.
Referenced by add_to_txpkts_pf(), add_to_txpkts_vf(), eth_tx(), start_wrq_wr(), write_raw_wr(), write_txpkt_vm_wr(), write_txpkt_wr(), write_txpkts_vm_wr(), and write_txpkts_wr().
|
inlinestatic |
Definition at line 1210 of file adapter.h.
References eq, and sge_eq::sidx.
int update_mac_settings | ( | struct ifnet * | ifp, |
int | flags | ||
) |
Definition at line 5993 of file t4_main.c.
References port_info::adapter, add_maddr(), ASSERT_SYNCHRONIZED_OP, mcaddr_ctx::del, adapter::flags, mcaddr_ctx::hash, mcaddr_ctx::i, ifp, mcaddr_ctx::ifp, IS_MAIN_VI, adapter::mbox, mcaddr_ctx::mcaddr, vi_info::pi, port_info::port_id, adapter::rawf_base, mcaddr_ctx::rc, vi_info::smt_idx, t4_alloc_mac_filt(), t4_alloc_raw_mac_filt(), t4_change_mac(), t4_set_addr_hash(), t4_set_rxmode(), port_info::vi, vi_info::viid, adapter::vxlan_refcount, port_info::vxlan_tcam_entry, vi_info::xact_addr_filt, XGMAC_ALLMULTI, XGMAC_MCADDRS, XGMAC_MTU, XGMAC_PROMISC, XGMAC_UCADDR, and XGMAC_VLANEX.
Referenced by cxgbe_init_synchronized(), cxgbe_ioctl(), and t4_resume().
int vi_init | ( | struct vi_info * | vi | ) |
Definition at line 6789 of file t4_main.c.
References vi_info::adapter, ASSERT_SYNCHRONIZED_OP, vi_info::flags, vi_full_init(), vi_full_uninit(), and VI_INIT_DONE.
Referenced by cxgbe_init_synchronized().
void vi_sysctls | ( | struct vi_info * | vi | ) |
Definition at line 7694 of file t4_main.c.
References vi_info::adapter, vi_info::ctx, vi_info::dev, vi_info::first_nm_rxq, vi_info::first_nm_txq, vi_info::first_ofld_rxq, vi_info::first_ofld_txq, vi_info::first_rxq, vi_info::first_txq, vi_info::flags, adapter::flags, IS_MAIN_VI, IS_VF, vi_info::nnmrxq, vi_info::nnmtxq, vi_info::nofldrxq, vi_info::nofldtxq, vi_info::nrxq, vi_info::ntxq, vi_info::rss_base, vi_info::rss_size, sysctl_holdoff_pktc_idx(), sysctl_holdoff_tmr_idx(), sysctl_noflowq(), sysctl_qsize_rxq(), sysctl_qsize_txq(), sysctl_tx_vm_wr(), TX_USES_VM_WR, and vi_info::viid.
Referenced by cxgbe_vi_attach().
|
inlinestatic |
Definition at line 1481 of file adapter.h.
References rw_via_memwin().
Referenced by copy_cfg_file_to_card().
|
inlinestatic |
Definition at line 1451 of file adapter.h.
Referenced by ccr_ccm(), ccr_cipher(), ccr_eta(), ccr_gcm(), ccr_hash(), and release_tid().
struct sge __aligned |
bus_addr_t ba |
Definition at line 19 of file adapter.h.
Referenced by oneseg_dma_callback().
uint16_t cidx |
Definition at line 1 of file adapter.h.
Referenced by drain_ring(), drain_txpkts(), eth_tx(), move_to_next_rxbuf(), and read_hw_cidx().
u_int cntxt_id |
Definition at line 10 of file adapter.h.
Referenced by alloc_iq_fl_hwq(), ctrl_eq_alloc(), and eth_eq_alloc().
uint8_t doorbells |
Definition at line 7 of file adapter.h.
Referenced by t4_sysctls().
struct sge_eq eq |
Definition at line 0 of file adapter.h.
Referenced by add_eq_sysctls(), alloc_eq(), alloc_eq_hwq(), alloc_txq(), alloc_wrq(), can_resume_eth_tx(), commit_wrq_wr(), copy_to_txd(), ctrl_eq_alloc(), discard_tx(), drain_wrq_wr_list(), eth_eq_alloc(), eth_tx(), free_eq(), free_eq_hwq(), free_txq(), handle_eth_egr_update(), handle_sge_egr_update(), handle_wrq_egr_update(), init_eq(), quiesce_txq(), read_hw_cidx(), reclaim_tx_descs(), reclaimable_tx_desc(), ring_eq_db(), set_txupdate_flags(), start_wrq_wr(), t4_wrq_tx_locked(), total_available_tx_desc(), tx_reclaim(), tx_resume_threshold(), write_gl_to_txd(), write_raw_wr(), write_txpkt_vm_wr(), write_txpkt_wr(), write_txpkts_vm_wr(), write_txpkts_wr(), and wrq_tx_drain().
struct sge_fl fl |
Definition at line 1 of file adapter.h.
Referenced by add_fl_sysctls(), add_fl_to_sfl(), alloc_iq_fl(), alloc_iq_fl_hwq(), eth_rx(), free_fl_buffers(), free_iq_fl(), free_iq_fl_hwq(), get_fl_payload(), get_scatter_segment(), get_segment_len(), init_fl(), move_to_next_rxbuf(), quiesce_iq_fl(), refill_fl(), refill_sfl(), ring_fl_db(), service_iq_fl(), skip_fl_payload(), skip_scatter_segment(), and t4_update_fl_bufsize().
struct sglist* gl |
Definition at line 5 of file adapter.h.
Referenced by get_pkt_gl(), and write_gl_to_txd().
struct ifnet * ifp |
Definition at line 2 of file adapter.h.
Referenced by alloc_rxq(), cxgbe_get_counter(), cxgbe_init_synchronized(), cxgbe_ioctl(), cxgbe_media_change(), cxgbe_media_status(), cxgbe_qflush(), cxgbe_transmit(), cxgbe_uninit_synchronized(), cxgbe_vi_attach(), cxgbe_vi_detach(), eth_rx(), eth_tx(), max_rx_payload(), t4_cloner_create(), t4_cloner_destroy(), t4_os_link_changed(), t4_os_portmod_changed(), t4_resume(), t4_setup_vi_queues(), t4_suspend(), t4_trace_pkt(), t4_update_fl_bufsize(), t4_vxlan_start_handler(), t4_vxlan_stop_handler(), t5_trace_pkt(), tracer_ioctl(), update_mac_settings(), and vi_get_counter().
struct sge_iq iq |
Definition at line 0 of file adapter.h.
Referenced by abort_rpl_rss_handler(), act_open_rpl_handler(), add_iq_sysctls(), alloc_iq_fl(), alloc_iq_fl_hwq(), do_cpl6_fw_pld(), do_smt_write_rpl(), free_iq_fl(), free_iq_fl_hwq(), fw4_ack_handler(), handle_fw_msg(), handle_sge_egr_update(), init_eq(), init_iq(), iq_to_ofld_rxq(), iq_to_rxq(), l2t_write_rpl_handler(), quiesce_iq_fl(), service_iq(), service_iq_fl(), set_tcb_rpl_handler(), t4_del_hashfilter_rpl(), t4_filter_rpl(), t4_hashfilter_ao_rpl(), t4_hashfilter_tcb_rpl(), t4_intr(), t4_intr_evt(), t4_trace_pkt(), and t5_trace_pkt().
int iqidx |
Definition at line 20 of file adapter.h.
Referenced by alloc_txq(), and t4_setup_vi_queues().
uint64_t last_tx |
Definition at line 8 of file adapter.h.
Referenced by record_eth_tx_time().
struct lro_ctrl lro |
Definition at line 4 of file adapter.h.
Referenced by eth_rx(), and service_iq_fl().
struct sge_nm_rxq* nm_rxq |
Definition at line 4 of file adapter.h.
Referenced by t4_setup_intr_handlers(), t4_setup_vi_queues(), and t4_teardown_vi_queues().
uint16_t pidx |
Definition at line 2 of file adapter.h.
Referenced by commit_wrq_wr(), drain_ring(), drain_txpkts(), eth_tx(), refill_fl(), total_available_tx_desc(), write_txpkt_vm_wr(), and write_txpkt_wr().
struct mp_ring* r |
Definition at line 3 of file adapter.h.
Referenced by can_resume_eth_tx(), decompress_buffer(), drain_ring(), drain_txpkts(), eth_tx(), free_offload_policy(), increment_idx(), mp_ring_alloc(), mp_ring_check_drainage(), mp_ring_enqueue(), mp_ring_free(), mp_ring_is_idle(), mp_ring_reset_stats(), mp_ring_sysctls(), set_offload_policy(), space_available(), strstrip(), t4_cim_read_la(), t4_init_sge_params(), t4_init_tp_params(), t4_verify_chip_settings(), and validate_mem_range().
struct resource* res |
Definition at line 0 of file adapter.h.
Referenced by t4_wr_mbox_meat_timeout().
int rid |
Definition at line 1 of file adapter.h.
Referenced by t4_alloc_irq(), and t4_setup_intr_handlers().
struct sge_rxq* rxq |
Definition at line 3 of file adapter.h.
Referenced by add_rxq_sysctls(), alloc_rxq(), clear_stats(), cxgbe_ioctl(), eth_rx(), free_rxq(), quiesce_vi(), service_iq_fl(), sysctl_holdoff_tmr_idx(), t4_cfg_pfvf(), t4_setup_intr_handlers(), t4_setup_vi_queues(), t4_suspend(), t4_teardown_vi_queues(), t4_update_fl_bufsize(), t4vf_ioctl(), and vi_full_init().
uint16_t sidx |
Definition at line 3 of file adapter.h.
Referenced by commit_wrq_wr(), drain_wrq_wr_list(), and set_txupdate_flags().
uint8_t ss[SGE_MAX_WR_LEN] |
Definition at line 27 of file adapter.h.
Referenced by build_medialist(), and ccr_write_ulptx_sgl().
uint16_t ss_len |
Definition at line 26 of file adapter.h.
Referenced by get_flit().
|
extern |
Referenced by cfg_itype_and_nqueues(), and tweak_tunables().
|
extern |
Referenced by calculate_iaq(), cfg_itype_and_nqueues(), and tweak_tunables().
|
extern |
Referenced by calculate_iaq(), cfg_itype_and_nqueues(), and tweak_tunables().
|
extern |
Referenced by t4_attach(), t4vf_attach(), and tweak_tunables().
|
extern |
Referenced by t4_attach(), t4vf_attach(), and tweak_tunables().
|
extern |
Referenced by t4_attach(), t4vf_attach(), and tweak_tunables().
|
extern |
Referenced by t4_attach(), t4vf_attach(), and tweak_tunables().
void* tag |
Definition at line 2 of file adapter.h.
Referenced by alloc_ring(), free_ring(), and get_vpd_keyword_val().
int tc_idx |
Definition at line 7 of file adapter.h.
Referenced by sysctl_tc(), t4_release_cl_rl(), and t4_reserve_cl_rl_kbps().
struct txpkts txp |
Definition at line 9 of file adapter.h.
Referenced by add_to_txpkts_pf(), add_to_txpkts_vf(), alloc_txq(), cmp_l2hdr(), eth_tx(), save_l2hdr(), set_txupdate_flags(), write_txpkts_vm_wr(), and write_txpkts_wr().
volatile uint32_t* udb |
Definition at line 8 of file adapter.h.
Referenced by alloc_eq_hwq(), and alloc_iq_fl_hwq().
struct sge_wrq wrq |
Definition at line 0 of file adapter.h.
Referenced by add_wrq_sysctls(), alloc_wrq(), alloc_wrqe(), clear_stats(), commit_wrq_wr(), drain_wrq_wr_list(), free_wrq(), handle_wrq_egr_update(), start_wrq_wr(), t4_suspend(), t4_write_l2e(), t4_write_sme(), t4_wrq_tx(), t4_wrq_tx_locked(), and wrq_tx_drain().