Lines Matching +full:per +full:- +full:queue
1 /* SPDX-License-Identifier: GPL-2.0 */
8 * struct netdev_config - queue-related configuration for a netdev
65 * struct netdev_stat_ops - netdev ops for fine grained stats
66 * @get_queue_stats_rx: get stats for a given Rx queue
67 * @get_queue_stats_tx: get stats for a given Tx queue
71 * on entry (specifically they are *not* zero-initialized). Drivers should
75 * Queue objects are not necessarily persistent, and only currently active
76 * queues are queried by the per-queue callbacks. This means that per-queue
83 * is issued to collect the delta, and then a series of per-queue callbacks.
85 * at the device level, meaning that unlike in queue callbacks, setting
95 * the @get_base_stats and subsequent per-queue calls are performed
98 * Device drivers are encouraged to reset the per-queue statistics when
100 * per-queue statistics is currently to detect traffic imbalance.
119 /* The queue checks and honours the page size qcfg parameter */
124 * struct netdev_queue_mgmt_ops - netdev ops for queue management
126 * @ndo_queue_mem_size: Size of the struct that describes a queue's memory.
128 * @ndo_queue_mem_alloc: Allocate memory for an RX queue at the specified index.
131 * @ndo_queue_mem_free: Free memory from an RX queue.
133 * @ndo_queue_start: Start an RX queue with the specified memory and at the
136 * @ndo_queue_stop: Stop the RX queue at the specified index. The stopped
137 * queue's memory is written at the specified address.
139 * @ndo_queue_get_dma_dev: Get dma device for zero-copy operations to be used
140 * for this queue. Return NULL on error.
142 * @ndo_default_qcfg: (Optional) Populate queue config struct with defaults.
143 * Queue config structs are passed to this helper before
144 * the user-requested settings are applied.
146 * @ndo_validate_qcfg: (Optional) Check if queue config is supported.
147 * Called when configuration affecting a queue may be
148 * changing, either due to NIC-wide config, or config
149 * scoped to the queue at a specified index.
150 * When NIC-wide config is changed the callback will
191 * DOC: Lockless queue stopping / waking helpers.
198 * wake attempts. The try-stop should happen from the xmit handler,
202 * The try-stop side is expected to run from the xmit handler and therefore
205 * handler may lead to xmit queue being enabled but not run.
234 _res = -1; \
240 * netif_txq_maybe_stop() - locklessly stop a Tx queue, if needed
243 * @stop_thrs: minimal number of available descriptors for queue to be left
245 * @start_thrs: minimal number of descriptors to re-enable the queue, can be
250 * return up-to-date information when evaluated!
254 * 0 if the queue was stopped
255 * 1 if the queue was left enabled
256 * -1 if the queue was re-enabled (raced with waking)
282 * __netif_txq_completed_wake() - locklessly wake a Tx queue, if needed
287 * @start_thrs: minimal number of descriptors to re-enable the queue
288 * @down_cond: down condition, predicate indicating that the queue should
293 * return up-to-date information when evaluated!
297 * 0 if the queue was woken up
298 * 1 if the queue was already enabled (or disabled but @down_cond is true)
299 * -1 if the queue was left unchanged (@start_thrs not reached)
307 * Barrier makes sure that anybody stopping the queue \
313 _res = -1; \
349 unsigned long trans_start = READ_ONCE(txq->trans_start);
352 time_after(jiffies, trans_start + txq->dev->watchdog_timeo))
353 return jiffies_to_msecs(jiffies - trans_start);