Lines Matching refs:dqo
49 pending_packet = &tx->dqo.pending_packets[index]; in gve_alloc_pending_packet()
62 s16 index = pending_packet - tx->dqo.pending_packets; in gve_free_pending_packet()
82 for (i = 0; i < tx->dqo.num_pending_packets; i++) { in gve_tx_clean_pending_packets()
84 &tx->dqo.pending_packets[i]; in gve_tx_clean_pending_packets()
121 if (tx->dqo.compl_ring) { in gve_tx_free_ring_dqo()
122 bytes = sizeof(tx->dqo.compl_ring[0]) * in gve_tx_free_ring_dqo()
123 (tx->dqo.complq_mask + 1); in gve_tx_free_ring_dqo()
124 dma_free_coherent(hdev, bytes, tx->dqo.compl_ring, in gve_tx_free_ring_dqo()
126 tx->dqo.compl_ring = NULL; in gve_tx_free_ring_dqo()
129 if (tx->dqo.tx_ring) { in gve_tx_free_ring_dqo()
130 bytes = sizeof(tx->dqo.tx_ring[0]) * (tx->mask + 1); in gve_tx_free_ring_dqo()
131 dma_free_coherent(hdev, bytes, tx->dqo.tx_ring, tx->bus); in gve_tx_free_ring_dqo()
132 tx->dqo.tx_ring = NULL; in gve_tx_free_ring_dqo()
135 kvfree(tx->dqo.pending_packets); in gve_tx_free_ring_dqo()
136 tx->dqo.pending_packets = NULL; in gve_tx_free_ring_dqo()
157 tx->dqo.complq_mask = priv->options_dqo_rda.tx_comp_ring_entries - 1; in gve_tx_alloc_ring_dqo()
165 num_pending_packets = tx->dqo.complq_mask + 1; in gve_tx_alloc_ring_dqo()
171 (tx->dqo.complq_mask + 1) / GVE_TX_MIN_RE_INTERVAL; in gve_tx_alloc_ring_dqo()
178 tx->dqo.num_pending_packets = min_t(int, num_pending_packets, S16_MAX); in gve_tx_alloc_ring_dqo()
179 tx->dqo.pending_packets = kvcalloc(tx->dqo.num_pending_packets, in gve_tx_alloc_ring_dqo()
180 sizeof(tx->dqo.pending_packets[0]), in gve_tx_alloc_ring_dqo()
182 if (!tx->dqo.pending_packets) in gve_tx_alloc_ring_dqo()
186 for (i = 0; i < tx->dqo.num_pending_packets - 1; i++) in gve_tx_alloc_ring_dqo()
187 tx->dqo.pending_packets[i].next = i + 1; in gve_tx_alloc_ring_dqo()
189 tx->dqo.pending_packets[tx->dqo.num_pending_packets - 1].next = -1; in gve_tx_alloc_ring_dqo()
196 bytes = sizeof(tx->dqo.tx_ring[0]) * (tx->mask + 1); in gve_tx_alloc_ring_dqo()
197 tx->dqo.tx_ring = dma_alloc_coherent(hdev, bytes, &tx->bus, GFP_KERNEL); in gve_tx_alloc_ring_dqo()
198 if (!tx->dqo.tx_ring) in gve_tx_alloc_ring_dqo()
201 bytes = sizeof(tx->dqo.compl_ring[0]) * (tx->dqo.complq_mask + 1); in gve_tx_alloc_ring_dqo()
202 tx->dqo.compl_ring = dma_alloc_coherent(hdev, bytes, in gve_tx_alloc_ring_dqo()
205 if (!tx->dqo.compl_ring) in gve_tx_alloc_ring_dqo()
331 &tx->dqo.tx_ring[*desc_idx].pkt; in gve_tx_fill_pkt_desc_dqo()
466 completion_tag = pkt - tx->dqo.pending_packets; in gve_tx_add_skb_no_copy_dqo()
475 gve_tx_fill_tso_ctx_desc(&tx->dqo.tx_ring[desc_idx].tso_ctx, in gve_tx_add_skb_no_copy_dqo()
480 gve_tx_fill_general_ctx_desc(&tx->dqo.tx_ring[desc_idx].general_ctx, in gve_tx_add_skb_no_copy_dqo()
541 tx->dqo.tx_ring[last_desc_idx].pkt.report_event = true; in gve_tx_add_skb_no_copy_dqo()
709 index = pending_packet - tx->dqo.pending_packets; in add_to_list()
715 tx->dqo.pending_packets[old_tail].next = index; in add_to_list()
734 tx->dqo.pending_packets[prev_index].next = next_index; in remove_from_list()
740 tx->dqo.pending_packets[next_index].prev = prev_index; in remove_from_list()
772 if (unlikely(compl_tag >= tx->dqo.num_pending_packets)) { in gve_handle_packet_completion()
778 pending_packet = &tx->dqo.pending_packets[compl_tag]; in gve_handle_packet_completion()
831 if (unlikely(compl_tag >= tx->dqo.num_pending_packets)) { in gve_handle_miss_completion()
837 pending_packet = &tx->dqo.pending_packets[compl_tag]; in gve_handle_miss_completion()
866 pending_packet = &tx->dqo.pending_packets[next_index]; in remove_miss_completions()
886 (int)(pending_packet - tx->dqo.pending_packets)); in remove_miss_completions()
909 pending_packet = &tx->dqo.pending_packets[next_index]; in remove_timed_out_completions()
935 &tx->dqo.compl_ring[tx->dqo_compl.head]; in gve_clean_tx_done_dqo()
942 prefetch(&tx->dqo.compl_ring[(tx->dqo_compl.head + 1) & in gve_clean_tx_done_dqo()
943 tx->dqo.complq_mask]); in gve_clean_tx_done_dqo()
979 (tx->dqo_compl.head + 1) & tx->dqo.complq_mask; in gve_clean_tx_done_dqo()
1020 compl_desc = &tx->dqo.compl_ring[tx->dqo_compl.head]; in gve_tx_poll_dqo()