Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_em.c
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | static struct if_shared_ctx em_sctx_init = { | ||||
.isc_nrxd_min = {EM_MIN_RXD}, | .isc_nrxd_min = {EM_MIN_RXD}, | ||||
.isc_ntxd_min = {EM_MIN_TXD}, | .isc_ntxd_min = {EM_MIN_TXD}, | ||||
.isc_nrxd_max = {EM_MAX_RXD}, | .isc_nrxd_max = {EM_MAX_RXD}, | ||||
.isc_ntxd_max = {EM_MAX_TXD}, | .isc_ntxd_max = {EM_MAX_TXD}, | ||||
.isc_nrxd_default = {EM_DEFAULT_RXD}, | .isc_nrxd_default = {EM_DEFAULT_RXD}, | ||||
.isc_ntxd_default = {EM_DEFAULT_TXD}, | .isc_ntxd_default = {EM_DEFAULT_TXD}, | ||||
}; | }; | ||||
if_shared_ctx_t em_sctx = &em_sctx_init; | |||||
static struct if_shared_ctx igb_sctx_init = { | static struct if_shared_ctx igb_sctx_init = { | ||||
.isc_magic = IFLIB_MAGIC, | .isc_magic = IFLIB_MAGIC, | ||||
.isc_q_align = PAGE_SIZE, | .isc_q_align = PAGE_SIZE, | ||||
.isc_tx_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), | .isc_tx_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), | ||||
.isc_tx_maxsegsize = PAGE_SIZE, | .isc_tx_maxsegsize = PAGE_SIZE, | ||||
.isc_tso_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), | .isc_tso_maxsize = EM_TSO_SIZE + sizeof(struct ether_vlan_header), | ||||
.isc_tso_maxsegsize = EM_TSO_SEG_SIZE, | .isc_tso_maxsegsize = EM_TSO_SEG_SIZE, | ||||
.isc_rx_maxsize = MJUM9BYTES, | .isc_rx_maxsize = MJUM9BYTES, | ||||
Show All 11 Lines | static struct if_shared_ctx igb_sctx_init = { | ||||
.isc_nrxd_min = {EM_MIN_RXD}, | .isc_nrxd_min = {EM_MIN_RXD}, | ||||
.isc_ntxd_min = {EM_MIN_TXD}, | .isc_ntxd_min = {EM_MIN_TXD}, | ||||
.isc_nrxd_max = {IGB_MAX_RXD}, | .isc_nrxd_max = {IGB_MAX_RXD}, | ||||
.isc_ntxd_max = {IGB_MAX_TXD}, | .isc_ntxd_max = {IGB_MAX_TXD}, | ||||
.isc_nrxd_default = {EM_DEFAULT_RXD}, | .isc_nrxd_default = {EM_DEFAULT_RXD}, | ||||
.isc_ntxd_default = {EM_DEFAULT_TXD}, | .isc_ntxd_default = {EM_DEFAULT_TXD}, | ||||
}; | }; | ||||
if_shared_ctx_t igb_sctx = &igb_sctx_init; | |||||
/***************************************************************** | /***************************************************************** | ||||
* | * | ||||
* Dump Registers | * Dump Registers | ||||
* | * | ||||
****************************************************************/ | ****************************************************************/ | ||||
#define IGB_REGS_LEN 739 | #define IGB_REGS_LEN 739 | ||||
static int em_get_regs(SYSCTL_HANDLER_ARGS) | static int em_get_regs(SYSCTL_HANDLER_ARGS) | ||||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | #endif | ||||
rc = sbuf_finish(sb); | rc = sbuf_finish(sb); | ||||
sbuf_delete(sb); | sbuf_delete(sb); | ||||
return(rc); | return(rc); | ||||
} | } | ||||
static void * | static void * | ||||
em_register(device_t dev) | em_register(device_t dev) | ||||
{ | { | ||||
return (em_sctx); | return (&em_sctx_init); | ||||
} | } | ||||
static void * | static void * | ||||
igb_register(device_t dev) | igb_register(device_t dev) | ||||
{ | { | ||||
return (igb_sctx); | return (&igb_sctx_init); | ||||
} | } | ||||
static int | static int | ||||
em_set_num_queues(if_ctx_t ctx) | em_set_num_queues(if_ctx_t ctx) | ||||
{ | { | ||||
struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
int maxqueues; | int maxqueues; | ||||
▲ Show 20 Lines • Show All 3,903 Lines • Show Last 20 Lines |