FreeBSD kernel CXGBE device code
t4_smt.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  smt_entry
 
struct  smt_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  { SMT_SIZE = 256 }
 
enum  { SMT_STATE_SWITCHING , SMT_STATE_UNUSED , SMT_STATE_ERROR }
 

Functions

int t4_init_smt (struct adapter *, int)
 
int t4_free_smt (struct smt_data *)
 
struct smt_entryt4_find_or_alloc_sme (struct smt_data *, uint8_t *)
 
struct smt_entryt4_smt_alloc_switching (struct smt_data *, uint8_t *)
 
int t4_smt_set_switching (struct adapter *, struct smt_entry *, uint16_t, uint8_t *)
 
int t4_write_sme (struct smt_entry *)
 
int do_smt_write_rpl (struct sge_iq *, const struct rss_header *, struct mbuf *)
 
static void t4_smt_release (struct smt_entry *e)
 
int sysctl_smt (SYSCTL_HANDLER_ARGS)
 

Macro Definition Documentation

◆ F_SYNC_WR

#define F_SYNC_WR   V_SYNC_WR(1)

Definition at line 38 of file t4_smt.h.

◆ S_SYNC_WR

#define S_SYNC_WR   12

Definition at line 36 of file t4_smt.h.

◆ V_SYNC_WR

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

Definition at line 37 of file t4_smt.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SMT_SIZE 

Definition at line 40 of file t4_smt.h.

◆ anonymous enum

anonymous enum
Enumerator
SMT_STATE_SWITCHING 
SMT_STATE_UNUSED 
SMT_STATE_ERROR 

Definition at line 42 of file t4_smt.h.

Function Documentation

◆ do_smt_write_rpl()

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

Definition at line 268 of file t4_smt.c.

References sge_iq::adapter, CPL_ERR_NONE, G_TID_TID, GET_TID, iq, smt_entry::lock, adapter::smt, SMT_STATE_ERROR, smt_data::smtab, smt_entry::state, and cpl_smt_write_rpl::status.

Referenced by mod_event().

Here is the caller graph for this function:

◆ sysctl_smt()

int sysctl_smt ( SYSCTL_HANDLER_ARGS  )

Definition at line 301 of file t4_smt.c.

References smt_entry::idx, smt_entry::lock, smt_entry::refcnt, smt_entry::smac, adapter::smt, SMT_SIZE, smt_data::smt_size, smt_state(), SMT_STATE_UNUSED, smt_data::smtab, and smt_entry::state.

Referenced by t4_sysctls().

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

◆ t4_find_or_alloc_sme()

struct smt_entry * t4_find_or_alloc_sme ( struct smt_data s,
uint8_t *  smac 
)

Definition at line 73 of file t4_smt.c.

References smt_data::lock, smt_entry::refcnt, smt_entry::smac, smt_data::smt_size, SMT_STATE_SWITCHING, SMT_STATE_UNUSED, smt_data::smtab, and smt_entry::state.

Referenced by t4_smt_alloc_switching().

Here is the caller graph for this function:

◆ t4_free_smt()

int t4_free_smt ( struct smt_data s)

Definition at line 255 of file t4_smt.c.

References smt_entry::lock, smt_data::lock, smt_data::smt_size, and smt_data::smtab.

Referenced by t4_detach_common().

Here is the caller graph for this function:

◆ t4_init_smt()

int t4_init_smt ( struct adapter sc,
int  flags 
)

Definition at line 226 of file t4_smt.c.

References smt_entry::idx, smt_entry::lock, smt_data::lock, smt_entry::refcnt, adapter::smt, SMT_SIZE, smt_data::smt_size, SMT_STATE_UNUSED, smt_data::smtab, and smt_entry::state.

Referenced by t4_attach().

Here is the caller graph for this function:

◆ t4_smt_alloc_switching()

struct smt_entry * t4_smt_alloc_switching ( struct smt_data s,
uint8_t *  smac 
)

Definition at line 189 of file t4_smt.c.

References smt_data::lock, smt_entry::smac, and t4_find_or_alloc_sme().

Referenced by set_filter().

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

◆ t4_smt_release()

static void t4_smt_release ( struct smt_entry e)
inlinestatic

Definition at line 76 of file t4_smt.h.

References smt_entry::lock, smt_entry::refcnt, SMT_STATE_UNUSED, and smt_entry::state.

Referenced by free_filter_resources(), and set_filter().

Here is the caller graph for this function:

◆ t4_smt_set_switching()

int t4_smt_set_switching ( struct adapter sc,
struct smt_entry e,
uint16_t  pfvf,
uint8_t *  smac 
)

Definition at line 205 of file t4_smt.c.

References sge_iq::abs_id, sge::ctrlq, sge::fwq, smt_entry::iqid, smt_entry::lock, smt_entry::pfvf, smt_entry::refcnt, adapter::sge, smt_entry::smac, SMT_STATE_SWITCHING, smt_entry::state, t4_write_sme(), and smt_entry::wrq.

Referenced by set_filter().

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

◆ t4_write_sme()