Lines Matching +full:always +full:- +full:running
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2023-2024 Google LLC
63 #define GVE_TIMESTAMP_INVALID -1
72 /* PTYPEs are always 10 bits. */
154 #define GVE_RING_LOCK(ring) mtx_lock(&(ring)->ring_mtx)
155 #define GVE_RING_TRYLOCK(ring) mtx_trylock(&(ring)->ring_mtx)
156 #define GVE_RING_UNLOCK(ring) mtx_unlock(&(ring)->ring_mtx)
157 #define GVE_RING_ASSERT(ring) mtx_assert(&(ring)->ring_mtx, MA_OWNED)
206 * counter-array offset for this ring's counter.
213 /* Byte offset into BAR2 where this ring's 4-byte irq doorbell lies. */
215 /* Byte offset into BAR2 where this ring's 4-byte doorbell lies. */
218 * Index, not byte-offset, into the counter array where this ring's
219 * 4-byte counter lies.
231 * `priv->irq_db_indices` where this ring's irq doorbell's
239 * over the register-page-list adminq command.
265 uint16_t buf_id:11; /* Index into rx->dqo.bufs */
286 /* for chaining rx->dqo.used_bufs */
290 /* for chaining rx->dqo.free_bufs */
294 /* power-of-2 sized receive ring */
298 uint32_t cnt; /* free-running total number of completed packets */
299 uint32_t fill_cnt; /* free-running total number of descs and buffs posted */
302 /* GQI-only fields */
314 /* DQO-only fields */
331 * Only used in QPL mode. Pages referred to by if_input-ed mbufs
421 /* power-of-2 sized transmit ring */
434 uint32_t req; /* free-running total number of packets written to the nic */
435 uint32_t done; /* free-running total number of completed packets */
437 int64_t last_kicked; /* always-valid timestamp in seconds for the last queue kick */
495 * The completion taskqueue moves pending-packet objects to this
523 * always represents the same QPL page fragment. The value
539 * This should always be zero since state is not explicitly initialized.
605 * Admin queue - see gve_adminq.h
611 uint32_t adminq_prod_cnt; /* free-running count of AQ cmds executed */
612 uint32_t adminq_cmd_fail; /* free-running count of AQ cmds failed */
613 uint32_t adminq_timeouts; /* free-running count of AQ cmds timeouts */
614 /* free-running count of each distinct AQ cmd executed */
648 return (BIT_ISSET(GVE_NUM_STATE_FLAGS, pos, &priv->state_flags)); in gve_get_state_flag()
654 BIT_SET_ATOMIC(GVE_NUM_STATE_FLAGS, pos, &priv->state_flags); in gve_set_state_flag()
660 BIT_CLR_ATOMIC(GVE_NUM_STATE_FLAGS, pos, &priv->state_flags); in gve_clear_state_flag()
666 return (priv->queue_format == GVE_GQI_QPL_FORMAT); in gve_is_gqi()
672 return (priv->queue_format == GVE_GQI_QPL_FORMAT || in gve_is_qpl()
673 priv->queue_format == GVE_DQO_QPL_FORMAT); in gve_is_qpl()
679 return (priv->rx_buf_size_dqo == GVE_4K_RX_BUFFER_SIZE_DQO); in gve_is_4k_rx_buf()