Lines Matching +full:tx +full:- +full:sec

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates.
37 #include "ena-com/ena_com.h"
38 #include "ena-com/ena_eth_com.h"
55 /* Calculate DMA mask - width for ena cannot exceed 48, so it is safe */
56 #define ENA_DMA_BIT_MASK(x) ((1ULL << (x)) - 1ULL)
72 #define ENA_BASE_CPU_UNSPECIFIED -1
98 * TX budget for cleaning. It should be half of the RX budget to reduce amount
102 /* RX cleanup budget. -1 stands for infinity. */
106 * RX or TX budget was depleted.
119 #define ENA_TX_RING_IDX_NEXT(idx, ring_size) (((idx) + 1) & ((ring_size) - 1))
121 #define ENA_RX_RING_IDX_NEXT(idx, ring_size) (((idx) + 1) & ((ring_size) - 1))
126 #define ENA_IO_RXQ_IDX_TO_COMBINED_IDX(q) (((q) - 1) / 2)
135 * ENA device should send keep alive msg every 1 sec.
136 * We wait for 6 sec just to be on the safe side.
189 BIT_ZERO(ENA_FLAGS_NUMBER, &(adapter)->flags)
191 BIT_ISSET(ENA_FLAGS_NUMBER, (bit), &(adapter)->flags)
193 BIT_SET_ATOMIC(ENA_FLAGS_NUMBER, (bit), &(adapter)->flags)
195 BIT_CLR_ATOMIC(ENA_FLAGS_NUMBER, (bit), &(adapter)->flags)
265 /* Used to detect missing tx packets */
316 /* Holds the empty requests for TX/RX out of order completions */
328 /* Determines if device will use LLQ or normal mode for TX */
351 struct ena_tx_buffer *tx_buffer_info; /* contex of tx packet */
354 int ring_size; /* number of tx/rx_buffer_info's entries */
356 struct buf_ring *br; /* only for TX */
374 /* For Tx ring to indicate if it's running or not */
378 /* How many packets are sent in one Tx loop, used for doorbells */
437 /* MSI-X */
441 /* DMA tags used throughout the driver adapter for Tx and Rx */
481 /* Queue will represent one TX and one RX ring */
485 /* TX */
523 #define ENA_RING_MTX_LOCK(_ring) mtx_lock(&(_ring)->ring_mtx)
524 #define ENA_RING_MTX_TRYLOCK(_ring) mtx_trylock(&(_ring)->ring_mtx)
525 #define ENA_RING_MTX_UNLOCK(_ring) mtx_unlock(&(_ring)->ring_mtx)
527 mtx_assert(&(_ring)->ring_mtx, MA_OWNED)
537 callout_init(&(_adapter)->timer_service, true)
539 callout_drain(&(_adapter)->timer_service)
541 callout_reset_sbt(&(_adapter)->timer_service, SBT_1S, SBT_1S, \
594 while ((mbuf = mbuf->m_next) != NULL) in ena_mbuf_count()
603 enum ena_regs_reset_reason_types reset_reason = adapter->reset_reason; in ena_increment_reset_counter()
607 if (ena_reset_stats_offset->has_counter) { in ena_increment_reset_counter()
608 uint64_t *stat_ptr = (uint64_t *)&adapter->dev_stats + in ena_increment_reset_counter()
609 ena_reset_stats_offset->stat_offset; in ena_increment_reset_counter()
614 counter_u64_add(adapter->dev_stats.total_resets, 1); in ena_increment_reset_counter()
622 adapter->reset_reason = reset_reason; in ena_trigger_reset()
630 ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq); in ena_ring_tx_doorbell()
631 counter_u64_add(tx_ring->tx_stats.doorbells, 1); in ena_ring_tx_doorbell()
632 tx_ring->acum_pkts = 0; in ena_ring_tx_doorbell()