Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ena/ena.c
Show First 20 Lines • Show All 2,771 Lines • ▼ Show 20 Lines | ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) | ||||
ena_tx_ctx.header_len = header_len; | ena_tx_ctx.header_len = header_len; | ||||
/* Set flags and meta data */ | /* Set flags and meta data */ | ||||
ena_tx_csum(&ena_tx_ctx, *mbuf); | ena_tx_csum(&ena_tx_ctx, *mbuf); | ||||
/* Prepare the packet's descriptors and send them to device */ | /* Prepare the packet's descriptors and send them to device */ | ||||
rc = ena_com_prepare_tx(io_sq, &ena_tx_ctx, &nb_hw_desc); | rc = ena_com_prepare_tx(io_sq, &ena_tx_ctx, &nb_hw_desc); | ||||
if (unlikely(rc != 0)) { | if (unlikely(rc != 0)) { | ||||
ena_trace(ENA_WARNING, "failed to prepare tx bufs\n"); | ena_trace(ENA_WARNING, "failed to prepare tx bufs\n"); | ||||
counter_enter(); | counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1); | ||||
counter_u64_add_protected(tx_ring->tx_stats.queue_stop, 1); | |||||
counter_u64_add_protected(tx_ring->tx_stats.prepare_ctx_err, 1); | |||||
counter_exit(); | |||||
goto dma_error; | goto dma_error; | ||||
} | } | ||||
counter_enter(); | counter_enter(); | ||||
counter_u64_add_protected(tx_ring->tx_stats.cnt, 1); | counter_u64_add_protected(tx_ring->tx_stats.cnt, 1); | ||||
counter_u64_add_protected(tx_ring->tx_stats.bytes, | counter_u64_add_protected(tx_ring->tx_stats.bytes, | ||||
(*mbuf)->m_pkthdr.len); | (*mbuf)->m_pkthdr.len); | ||||
▲ Show 20 Lines • Show All 1,129 Lines • Show Last 20 Lines |