Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/al_eth/al_eth.c
Show First 20 Lines • Show All 1,579 Lines • ▼ Show 20 Lines | al_eth_rx_mbuf(struct al_eth_adapter *adapter, | ||||
*next_to_clean = AL_ETH_RX_RING_IDX_NEXT(rx_ring, *next_to_clean); | *next_to_clean = AL_ETH_RX_RING_IDX_NEXT(rx_ring, *next_to_clean); | ||||
return (mbuf); | return (mbuf); | ||||
} | } | ||||
static void | static void | ||||
al_eth_rx_recv_work(void *arg, int pending) | al_eth_rx_recv_work(void *arg, int pending) | ||||
{ | { | ||||
struct epoch_tracker et; | |||||
struct al_eth_ring *rx_ring = arg; | struct al_eth_ring *rx_ring = arg; | ||||
struct mbuf *mbuf; | struct mbuf *mbuf; | ||||
struct lro_entry *queued; | struct lro_entry *queued; | ||||
unsigned int qid = rx_ring->ring_id; | unsigned int qid = rx_ring->ring_id; | ||||
struct al_eth_pkt *hal_pkt = &rx_ring->hal_pkt; | struct al_eth_pkt *hal_pkt = &rx_ring->hal_pkt; | ||||
uint16_t next_to_clean = rx_ring->next_to_clean; | uint16_t next_to_clean = rx_ring->next_to_clean; | ||||
uint32_t refill_required; | uint32_t refill_required; | ||||
uint32_t refill_actual; | uint32_t refill_actual; | ||||
uint32_t do_if_input; | uint32_t do_if_input; | ||||
NET_EPOCH_ENTER(et); | |||||
if (napi != 0) { | if (napi != 0) { | ||||
rx_ring->enqueue_is_running = 1; | rx_ring->enqueue_is_running = 1; | ||||
al_data_memory_barrier(); | al_data_memory_barrier(); | ||||
} | } | ||||
do { | do { | ||||
unsigned int descs; | unsigned int descs; | ||||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
if (napi != 0) { | if (napi != 0) { | ||||
rx_ring->enqueue_is_running = 0; | rx_ring->enqueue_is_running = 0; | ||||
al_data_memory_barrier(); | al_data_memory_barrier(); | ||||
} | } | ||||
/* unmask irq */ | /* unmask irq */ | ||||
al_eth_irq_config(rx_ring->unmask_reg_offset, rx_ring->unmask_val); | al_eth_irq_config(rx_ring->unmask_reg_offset, rx_ring->unmask_val); | ||||
NET_EPOCH_EXIT(et); | |||||
} | } | ||||
static void | static void | ||||
al_eth_start_xmit(void *arg, int pending) | al_eth_start_xmit(void *arg, int pending) | ||||
{ | { | ||||
struct al_eth_ring *tx_ring = arg; | struct al_eth_ring *tx_ring = arg; | ||||
struct mbuf *mbuf; | struct mbuf *mbuf; | ||||
▲ Show 20 Lines • Show All 1,874 Lines • Show Last 20 Lines |