FreeBSD kernel CXGBE device code
t4_smt.c File Reference
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/rwlock.h>
#include <sys/socket.h>
#include <sys/sbuf.h>
#include <netinet/in.h>
#include "common/common.h"
#include "common/t4_msg.h"
#include "t4_smt.h"
Include dependency graph for t4_smt.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
struct smt_entryt4_find_or_alloc_sme (struct smt_data *s, uint8_t *smac)
 
int t4_write_sme (struct smt_entry *e)
 
struct smt_entryt4_smt_alloc_switching (struct smt_data *s, uint8_t *smac)
 
int t4_smt_set_switching (struct adapter *sc, struct smt_entry *e, uint16_t pfvf, uint8_t *smac)
 
int t4_init_smt (struct adapter *sc, int flags)
 
int t4_free_smt (struct smt_data *s)
 
int do_smt_write_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
 
static char smt_state (const struct smt_entry *e)
 
int sysctl_smt (SYSCTL_HANDLER_ARGS)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ 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:

◆ smt_state()

static char smt_state ( const struct smt_entry e)
static

Definition at line 291 of file t4_smt.c.

References SMT_STATE_ERROR, SMT_STATE_SWITCHING, and smt_entry::state.

Referenced by sysctl_smt().

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_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()