Lines Matching +full:rx +full:- +full:only
1 /* SPDX-License-Identifier: GPL-2.0-only */
29 /* Number of descriptors in a queue should be a multiple of 32. RX queue
71 * given RX completion queue has descriptors. This includes _ALL_ buffer
73 * you have a total of 1024 buffers so your RX queue _must_ have at least that
74 * many descriptors. This macro divides a given number of RX descriptors by
76 * can have without overrunning the RX queue.
88 #define IDPF_RX_BUFQ_WORKING_SET(rxq) ((rxq)->desc_count - 1)
92 if (unlikely(++(ntc) == (rxq)->desc_count)) { \
100 if (unlikely(++(idx) == (q)->desc_count)) \
111 * only relevant in flow scheduling mode
122 ((((txq)->next_to_clean > (txq)->next_to_use) ? 0 : (txq)->desc_count) + \
123 (txq)->next_to_clean - (txq)->next_to_use - 1)
125 #define IDPF_TX_COMPLQ_OVERFLOW_THRESH(txcq) ((txcq)->desc_count >> 1)
130 (((txq)->num_completions_pending >= (txq)->complq->num_completions ? \
132 (txq)->num_completions_pending - (txq)->complq->num_completions)
154 * struct idpf_tx_offload_params - Offload parameters for a given packet
222 /* The size limit for a transmit buffer in a descriptor is (16K - 1).
227 #define IDPF_TX_MAX_DESC_DATA (SZ_16K - 1)
238 DIV_ROUND_DOWN_ULL((IDPF_CTLQ_MAX_BUF_LEN - IDPF_RX_PTYPE_HDR_SZ), \
241 #define IDPF_GET_PTYPE_SIZE(p) struct_size((p), proto_id, (p)->proto_id_count)
274 * 0->1 or 1->0 on each ring wrap. SW maintains its own
280 * @__IDPF_Q_RFL_GEN_CHK: Refill queues are SW only, so Q_GEN acts as the HW
285 * @__IDPF_Q_HSPLIT_EN: enable header split on Rx (splitq)
286 * @__IDPF_Q_PTP: indicates whether the Rx timestamping is enabled for the
288 * @__IDPF_Q_NOIRQ: queue is polling-driven and has no interrupt
308 #define idpf_queue_set(f, q) __set_bit(__IDPF_Q_##f, (q)->flags)
309 #define idpf_queue_clear(f, q) __clear_bit(__IDPF_Q_##f, (q)->flags)
310 #define idpf_queue_change(f, q) __change_bit(__IDPF_Q_##f, (q)->flags)
311 #define idpf_queue_has(f, q) test_bit(__IDPF_Q_##f, (q)->flags)
314 __test_and_clear_bit(__IDPF_Q_##f, (q)->flags)
316 __assign_bit(__IDPF_Q_##f, (q)->flags, v)
342 * @rx_itr: RX ITR register
366 * @num_rxq: Number of RX queues
371 * @rx: Array of RX queues to service
385 * @rx_dim: Data for RX net_dim algorithm
386 * @rx_itr_value: RX interrupt throttling rate
388 * @rx_itr_idx: RX ITR index
400 struct idpf_rx_queue **rx; member
476 * struct idpf_rx_queue - software structure representing a receive queue
477 * @rx: universal receive descriptor array
487 * @idx: For RX queue, it is used to index to total RX queue across groups and
492 * @rxdids: Supported RX descriptor ids
494 * @rx_ptype_lkup: LUT of Rx ptypes
498 * @next_to_alloc: RX buffer to allocate at
502 * @cached_phc_time: Cached PHC time for the Rx queue
509 * @rx_buffer_low_watermark: RX buffer low watermark
512 * @rx_max_pkt_size: RX max packet size
517 union virtchnl2_rx_desc *rx; member
586 96 + offsetof(struct idpf_rx_queue, q_stats) -
591 * struct idpf_tx_queue - software structure representing a transmit queue
613 * @tx_max_bufs: Max buffers that can be transmitted with scatter-gather
614 * @cleaned_bytes: Splitq only, TXQ only: When a TX completion is received on
621 * only once at the end of the cleaning routine.
622 * @clean_budget: singleq only, queue cleaning budget
719 offsetof(struct idpf_tx_queue, cached_tstamp_caps) -
721 offsetof(struct idpf_tx_queue, q_stats) -
726 * struct idpf_buf_queue - software structure representing a buffer queue
730 * @xsk_buf: &xdp_buff for XSk Rx buffers
740 * @next_to_alloc: RX buffer to allocate at
748 * @rx_buffer_low_watermark: RX buffer low watermark
800 * struct idpf_compl_queue - software structure representing a completion queue
801 * @comp: 8-byte completion descriptor array
802 * @comp_4b: 4-byte completion descriptor array
812 * @num_completions: Only relevant for TX completion queue. It tracks the
865 * lockless buffer management system and are strictly software only constructs.
886 * @rxq: RX queue
889 * Splitq only. idpf_rxq_set associates an rxq with at an array of refillqs.
905 * Splitq only. idpf_bufq_set associates a bufq to an array of refillqs.
923 * @singleq.num_rxq: Number of RX queues associated
924 * @singleq.rxqs: Array of RX queue pointers
926 * @splitq.num_rxq_sets: Number of RX queue sets
927 * @splitq.rxq_sets: Array of RX queue sets
955 * @complq: Associated completion queue pointer, split queue only
982 cpu = cpumask_first(&q_vector->napi.config->affinity_mask); in idpf_q_vector_to_mem()
988 * idpf_size_to_txd_count - Get number of descriptors needed for large Tx frag
1001 * idpf_tx_singleq_build_ctob - populate command tag offset and size
1026 * idpf_tx_splitq_build_desc - determine which type of data descriptor to build
1036 if (params->dtype == IDPF_TX_DESC_DTYPE_FLEX_L2TAG1_L2TAG2) in idpf_tx_splitq_build_desc()
1043 * idpf_vport_intr_set_wb_on_itr - enable descriptor writeback on disabled interrupts
1050 if (q_vector->wb_on_itr) in idpf_vport_intr_set_wb_on_itr()
1053 q_vector->wb_on_itr = true; in idpf_vport_intr_set_wb_on_itr()
1054 reg = &q_vector->intr_reg; in idpf_vport_intr_set_wb_on_itr()
1056 writel(reg->dyn_ctl_wb_on_itr_m | reg->dyn_ctl_intena_msk_m | in idpf_vport_intr_set_wb_on_itr()
1057 (IDPF_NO_ITR_UPDATE_IDX << reg->dyn_ctl_itridx_s), in idpf_vport_intr_set_wb_on_itr()
1058 reg->dyn_ctl); in idpf_vport_intr_set_wb_on_itr()
1062 * idpf_tx_splitq_get_free_bufs - get number of free buf_ids in refillq
1067 return (refillq->next_to_use > refillq->next_to_clean ? in idpf_tx_splitq_get_free_bufs()
1068 0 : refillq->desc_count) + in idpf_tx_splitq_get_free_bufs()
1069 refillq->next_to_use - refillq->next_to_clean - 1; in idpf_tx_splitq_get_free_bufs()