FreeBSD kernel CXGBE device code
t4_mp_ring.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mp_ring
 

Typedefs

typedef u_int(* ring_drain_t) (struct mp_ring *, u_int, u_int, bool *)
 
typedef u_int(* ring_can_drain_t) (struct mp_ring *)
 

Functions

int mp_ring_alloc (struct mp_ring **, int, void *, ring_drain_t, ring_can_drain_t, struct malloc_type *, struct mtx *, int)
 
void mp_ring_free (struct mp_ring *)
 
int mp_ring_enqueue (struct mp_ring *, void **, int, int)
 
void mp_ring_check_drainage (struct mp_ring *, int)
 
void mp_ring_reset_stats (struct mp_ring *)
 
bool mp_ring_is_idle (struct mp_ring *)
 
void mp_ring_sysctls (struct mp_ring *, struct sysctl_ctx_list *, struct sysctl_oid_list *)
 

Typedef Documentation

◆ ring_can_drain_t

typedef u_int(* ring_can_drain_t) (struct mp_ring *)

Definition at line 40 of file t4_mp_ring.h.

◆ ring_drain_t

typedef u_int(* ring_drain_t) (struct mp_ring *, u_int, u_int, bool *)

Definition at line 39 of file t4_mp_ring.h.

Function Documentation

◆ mp_ring_alloc()

int mp_ring_alloc ( struct mp_ring **  pr,
int  size,
void *  cookie,
ring_drain_t  drain,
ring_can_drain_t  can_drain,
struct malloc_type *  mt,
struct mtx *  lck,
int  flags 
)

Definition at line 261 of file t4_mp_ring.c.

References mp_ring::abdications, mp_ring::can_drain, mp_ring::cons_idle, mp_ring::cons_idle2, mp_ring::cons_lock, mp_ring::consumed, mp_ring::consumer, mp_ring::cookie, mp_ring::drain, mp_ring::dropped, mp_ring_free(), mp_ring::mt, mp_ring::not_consumer, r, and mp_ring::stalls.

Referenced by alloc_txq().

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

◆ mp_ring_check_drainage()

void mp_ring_check_drainage ( struct mp_ring r,
int  budget 
)

Definition at line 479 of file t4_mp_ring.c.

References BUSY, mp_ring::can_drain, ring_state::cidx, COALESCING, mp_ring::cons_lock, drain_ring(), drain_txpkts(), ring_state::flags, ring_state::pidx_tail, r, STALLED, and ring_state::state.

Referenced by cxgbe_qflush(), handle_eth_egr_update(), mp_ring_enqueue(), and quiesce_txq().

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

◆ mp_ring_enqueue()

int mp_ring_enqueue ( struct mp_ring r,
void **  items,
int  n,
int  budget 
)

◆ mp_ring_free()

void mp_ring_free ( struct mp_ring r)

◆ mp_ring_is_idle()

bool mp_ring_is_idle ( struct mp_ring r)

Definition at line 522 of file t4_mp_ring.c.

References ring_state::cidx, ring_state::flags, IDLE, ring_state::pidx_head, ring_state::pidx_tail, r, and ring_state::state.

Referenced by cxgbe_qflush(), handle_eth_egr_update(), and quiesce_txq().

Here is the caller graph for this function:

◆ mp_ring_reset_stats()

void mp_ring_reset_stats ( struct mp_ring r)

Definition at line 506 of file t4_mp_ring.c.

References mp_ring::abdications, mp_ring::cons_idle, mp_ring::cons_idle2, mp_ring::consumed, mp_ring::consumer, mp_ring::dropped, mp_ring::not_consumer, r, and mp_ring::stalls.

Referenced by clear_stats(), and t4vf_ioctl().

Here is the caller graph for this function:

◆ mp_ring_sysctls()

void mp_ring_sysctls ( struct mp_ring r,
struct sysctl_ctx_list *  ctx,
struct sysctl_oid_list *  children 
)

Definition at line 535 of file t4_mp_ring.c.

References mp_ring::abdications, C_2, C_3, C_FAST, C_TAKEOVER, mp_ring::cons_idle, mp_ring::cons_idle2, mp_ring::consumed, mp_ring::consumer, mp_ring::dropped, mp_ring::not_consumer, r, and mp_ring::stalls.

Referenced by add_txq_sysctls().

Here is the caller graph for this function: