FreeBSD kernel CXGBE device code
|
#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"
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
struct l2t_entry * | t4_alloc_l2e (struct l2t_data *d) |
static struct l2t_entry * | find_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_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) |
struct l2t_entry * | t4_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) |
__FBSDID | ( | "$FreeBSD$" | ) |
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().
|
static |
Definition at line 112 of file t4_l2t.c.
References l2t_entry::dmac, l2t_entry::first, l2t_entry::hash, l2t_data::l2t_size, L2T_STATE_SWITCHING, L2T_STATE_UNUSED, l2t_data::l2tab, l2t_entry::lport, l2t_entry::next, port, l2t_entry::refcnt, l2t_entry::state, and l2t_entry::vlan.
Referenced by t4_l2t_alloc_switching().
|
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().
|
static |
Definition at line 149 of file t4_l2t.c.
References CPL_L2T_WRITE_REQ, l2t_entry::dmac, cpl_l2t_write_req::dst_mac, l2t_entry::idx, INIT_TP_WR, l2t_entry::iqid, t4_virt_res::l2t, cpl_l2t_write_req::l2t_idx, l2t_entry::lport, MK_OPCODE_TID, OPCODE_TID, cpl_l2t_write_req::params, t4_range::start, V_L2T_W_NOREPLY, V_L2T_W_PORT, V_SYNC_WR, V_TID_QID, cpl_l2t_write_req::vlan, l2t_entry::vlan, and adapter::vres.
Referenced by t4_l2t_alloc_tls(), and t4_write_l2e().
int sysctl_l2t | ( | SYSCTL_HANDLER_ARGS | ) |
Definition at line 409 of file t4_l2t.c.
References l2t_entry::addr, l2t_entry::dmac, l2t_entry::idx, l2t_entry::ifp, l2t_entry::ipv6, l2e_state(), adapter::l2t, l2t_data::l2t_size, L2T_STATE_SWITCHING, L2T_STATE_UNUSED, l2t_data::l2tab, l2t_entry::lock, l2t_entry::lport, l2t_entry::refcnt, l2t_entry::state, l2t_entry::vlan, and vlan_prio().
Referenced by t4_sysctls().
Definition at line 73 of file t4_l2t.c.
References l2t_entry::first, l2t_entry::hash, l2t_data::l2t_size, L2T_STATE_SWITCHING, L2T_STATE_UNUSED, l2t_data::l2tab, l2t_data::lock, l2t_entry::next, l2t_data::nfree, l2t_entry::refcnt, l2t_data::rover, and l2t_entry::state.
Referenced by t4_l2t_alloc_tls().
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().
int t4_init_l2t | ( | struct adapter * | sc, |
int | flags | ||
) |
Definition at line 323 of file t4_l2t.c.
References l2t_entry::idx, adapter::l2t, t4_virt_res::l2t, l2t_data::l2t_size, L2T_STATE_UNUSED, l2t_data::l2tab, l2t_entry::lock, l2t_data::lock, l2t_data::nfree, l2t_entry::refcnt, l2t_data::rover, t4_range::size, l2t_entry::state, and adapter::vres.
Referenced by t4_attach().
struct l2t_entry * t4_l2t_alloc_switching | ( | struct adapter * | sc, |
uint16_t | vlan, | ||
uint8_t | port, | ||
uint8_t * | eth_addr | ||
) |
Definition at line 288 of file t4_l2t.c.
References sge_iq::abs_id, sge::ctrlq, l2t_entry::dmac, find_or_alloc_l2e(), sge::fwq, l2t_entry::iqid, adapter::l2t, L2T_STATE_SWITCHING, l2t_entry::lock, l2t_data::lock, l2t_entry::lport, l2t_data::nfree, port, l2t_entry::refcnt, adapter::sge, l2t_entry::state, t4_write_l2e(), l2t_entry::vlan, and l2t_entry::wrq.
Referenced by set_filter().
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 | ||
) |
Definition at line 212 of file t4_l2t.c.
References sge_iq::abs_id, l2t_entry::dmac, EQ_ESIZE, sge::fwq, l2t_entry::iqid, adapter::l2t, l2t_data::l2t_size, L2T_STATE_TLS, l2t_data::l2tab, l2t_data::lock, l2t_entry::lport, mk_write_l2e(), l2t_data::nfree, port, l2t_entry::refcnt, adapter::sge, l2t_entry::state, t4_alloc_l2e(), TXQ_LOCK_ASSERT_OWNED, l2t_entry::vlan, and l2t_entry::wrq.
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().
|
inlinestatic |
Definition at line 389 of file t4_l2t.c.
References l2t_entry::vlan.
Referenced by sysctl_l2t().