FreeBSD kernel CXGBE device code
t4_l2t.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  l2t_entry
 
struct  l2t_data
 

Macros

#define S_SYNC_WR   12
 
#define V_SYNC_WR(x)   ((x) << S_SYNC_WR)
 
#define F_SYNC_WR   V_SYNC_WR(1)
 

Enumerations

enum  { L2T_SIZE = 4096 }
 
enum  {
  L2T_STATE_VALID , L2T_STATE_STALE , L2T_STATE_RESOLVING , L2T_STATE_FAILED ,
  L2T_STATE_SYNC_WRITE , L2T_STATE_SWITCHING , L2T_STATE_TLS , L2T_STATE_UNUSED
}
 

Functions

int t4_init_l2t (struct adapter *, int)
 
int t4_free_l2t (struct l2t_data *)
 
struct l2t_entryt4_alloc_l2e (struct l2t_data *)
 
struct l2t_entryt4_l2t_alloc_switching (struct adapter *, uint16_t, uint8_t, uint8_t *)
 
struct l2t_entryt4_l2t_alloc_tls (struct adapter *, struct sge_txq *, void *, int *, uint16_t, uint8_t, uint8_t *)
 
int t4_l2t_set_switching (struct adapter *, struct l2t_entry *, uint16_t, uint8_t, uint8_t *)
 
int t4_write_l2e (struct l2t_entry *, int)
 
int do_l2t_write_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *)
 
static void t4_l2t_release (struct l2t_entry *e)
 
int sysctl_l2t (SYSCTL_HANDLER_ARGS)
 

Macro Definition Documentation

◆ F_SYNC_WR

#define F_SYNC_WR   V_SYNC_WR(1)

Definition at line 38 of file t4_l2t.h.

◆ S_SYNC_WR

#define S_SYNC_WR   12

Definition at line 36 of file t4_l2t.h.

◆ V_SYNC_WR

#define V_SYNC_WR (   x)    ((x) << S_SYNC_WR)

Definition at line 37 of file t4_l2t.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
L2T_SIZE 

Definition at line 40 of file t4_l2t.h.

◆ anonymous enum

anonymous enum
Enumerator
L2T_STATE_VALID 
L2T_STATE_STALE 
L2T_STATE_RESOLVING 
L2T_STATE_FAILED 
L2T_STATE_SYNC_WRITE 
L2T_STATE_SWITCHING 
L2T_STATE_TLS 
L2T_STATE_UNUSED 

Definition at line 42 of file t4_l2t.h.

Function Documentation

◆ do_l2t_write_rpl()

int do_l2t_write_rpl ( struct sge_iq iq,
const struct rss_header rss,
struct mbuf *  m 
)

Definition at line 371 of file t4_l2t.c.

References CPL_ERR_NONE, GET_TID, L2T_SIZE, and cpl_l2t_write_rpl::status.

Referenced by mod_event().

Here is the caller graph for this function:

◆ sysctl_l2t()

int sysctl_l2t ( SYSCTL_HANDLER_ARGS  )

◆ t4_alloc_l2e()

struct l2t_entry * t4_alloc_l2e ( struct l2t_data d)

◆ t4_free_l2t()

int t4_free_l2t ( struct l2t_data d)

Definition at line 358 of file t4_l2t.c.

References l2t_data::l2t_size, l2t_data::l2tab, l2t_entry::lock, and l2t_data::lock.

Referenced by t4_detach_common().

Here is the caller graph for this function:

◆ t4_init_l2t()

int t4_init_l2t ( struct adapter sc,
int  flags 
)

◆ t4_l2t_alloc_switching()

struct l2t_entry * t4_l2t_alloc_switching ( struct adapter sc,
uint16_t  vlan,
uint8_t  port,
uint8_t *  eth_addr 
)

◆ t4_l2t_alloc_tls()

struct l2t_entry * t4_l2t_alloc_tls ( struct adapter sc,
struct sge_txq txq,
void *  dst,
int *  ndesc,
uint16_t  vlan,
uint8_t  port,
uint8_t *  eth_addr 
)

◆ t4_l2t_release()

static void t4_l2t_release ( struct l2t_entry e)
inlinestatic

Definition at line 105 of file t4_l2t.h.

References l2t_entry::idx, l2t_data::l2tab, l2t_data::nfree, and l2t_entry::refcnt.

Referenced by free_filter_resources(), and set_filter().

Here is the caller graph for this function:

◆ t4_l2t_set_switching()

int t4_l2t_set_switching ( struct adapter ,
struct l2t_entry ,
uint16_t  ,
uint8_t  ,
uint8_t *   
)

◆ t4_write_l2e()

int t4_write_l2e ( struct l2t_entry e,
int  sync 
)

Definition at line 171 of file t4_l2t.c.

References sge_wrq::adapter, commit_wrq_wr(), L2T_STATE_SWITCHING, L2T_STATE_SYNC_WRITE, l2t_entry::lock, mk_write_l2e(), start_wrq_wr(), l2t_entry::state, wrq, and l2t_entry::wrq.

Referenced by t4_l2t_alloc_switching().

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