FreeBSD kernel CXGBE device code
t4_l2t.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_l2t.h"
Include dependency graph for t4_l2t.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
struct l2t_entryt4_alloc_l2e (struct l2t_data *d)
 
static struct l2t_entryfind_or_alloc_l2e (struct l2t_data *d, uint16_t vlan, uint8_t port, uint8_t *dmac)
 
static void mk_write_l2e (struct adapter *sc, struct l2t_entry *e, int sync, int reply, void *dst)
 
int t4_write_l2e (struct l2t_entry *e, int sync)
 
struct l2t_entryt4_l2t_alloc_tls (struct adapter *sc, struct sge_txq *txq, void *dst, int *ndesc, uint16_t vlan, uint8_t port, uint8_t *eth_addr)
 
struct l2t_entryt4_l2t_alloc_switching (struct adapter *sc, uint16_t vlan, uint8_t port, uint8_t *eth_addr)
 
int t4_init_l2t (struct adapter *sc, int flags)
 
int t4_free_l2t (struct l2t_data *d)
 
int do_l2t_write_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
 
static unsigned int vlan_prio (const struct l2t_entry *e)
 
static char l2e_state (const struct l2t_entry *e)
 
int sysctl_l2t (SYSCTL_HANDLER_ARGS)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

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

◆ find_or_alloc_l2e()

static struct l2t_entry * find_or_alloc_l2e ( struct l2t_data d,
uint16_t  vlan,
uint8_t  port,
uint8_t *  dmac 
)
static

◆ l2e_state()

static char l2e_state ( const struct l2t_entry e)
static

Definition at line 395 of file t4_l2t.c.

References L2T_STATE_RESOLVING, L2T_STATE_STALE, L2T_STATE_SWITCHING, L2T_STATE_SYNC_WRITE, L2T_STATE_TLS, L2T_STATE_VALID, and l2t_entry::state.

Referenced by sysctl_l2t().

Here is the caller graph for this function:

◆ mk_write_l2e()

static void mk_write_l2e ( struct adapter sc,
struct l2t_entry e,
int  sync,
int  reply,
void *  dst 
)
static

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

◆ vlan_prio()

static unsigned int vlan_prio ( const struct l2t_entry e)
inlinestatic

Definition at line 389 of file t4_l2t.c.

References l2t_entry::vlan.

Referenced by sysctl_l2t().

Here is the caller graph for this function: