Lines Matching refs:complq

153 static void idpf_compl_desc_rel(struct idpf_compl_queue *complq)  in idpf_compl_desc_rel()  argument
155 if (!complq->comp) in idpf_compl_desc_rel()
158 dma_free_coherent(complq->netdev->dev.parent, complq->size, in idpf_compl_desc_rel()
159 complq->comp, complq->dma); in idpf_compl_desc_rel()
160 complq->comp = NULL; in idpf_compl_desc_rel()
161 complq->next_to_use = 0; in idpf_compl_desc_rel()
162 complq->next_to_clean = 0; in idpf_compl_desc_rel()
185 idpf_compl_desc_rel(txq_grp->complq); in idpf_tx_desc_rel_all()
285 struct idpf_compl_queue *complq) in idpf_compl_desc_alloc() argument
287 complq->size = array_size(complq->desc_count, sizeof(*complq->comp)); in idpf_compl_desc_alloc()
289 complq->comp = dma_alloc_coherent(complq->netdev->dev.parent, in idpf_compl_desc_alloc()
290 complq->size, &complq->dma, in idpf_compl_desc_alloc()
292 if (!complq->comp) in idpf_compl_desc_alloc()
295 complq->next_to_use = 0; in idpf_compl_desc_alloc()
296 complq->next_to_clean = 0; in idpf_compl_desc_alloc()
297 idpf_queue_set(GEN_CHK, complq); in idpf_compl_desc_alloc()
363 err = idpf_compl_desc_alloc(vport, vport->txq_grps[i].complq); in idpf_tx_desc_alloc_all()
1004 kfree(txq_grp->complq); in idpf_txq_group_rel()
1005 txq_grp->complq = NULL; in idpf_txq_group_rel()
1413 tx_qgrp->complq = kcalloc(IDPF_COMPLQ_PER_GROUP, in idpf_txq_group_alloc()
1414 sizeof(*tx_qgrp->complq), in idpf_txq_group_alloc()
1416 if (!tx_qgrp->complq) in idpf_txq_group_alloc()
1419 tx_qgrp->complq->desc_count = vport->complq_desc_count; in idpf_txq_group_alloc()
1420 tx_qgrp->complq->txq_grp = tx_qgrp; in idpf_txq_group_alloc()
1421 tx_qgrp->complq->netdev = vport->netdev; in idpf_txq_group_alloc()
1422 tx_qgrp->complq->clean_budget = vport->compln_clean_budget; in idpf_txq_group_alloc()
1425 idpf_queue_set(FLOW_SCH_EN, tx_qgrp->complq); in idpf_txq_group_alloc()
1971 static bool idpf_tx_clean_complq(struct idpf_compl_queue *complq, int budget, in idpf_tx_clean_complq() argument
1975 s16 ntc = complq->next_to_clean; in idpf_tx_clean_complq()
1981 complq_budget = complq->clean_budget; in idpf_tx_clean_complq()
1982 tx_desc = &complq->comp[ntc]; in idpf_tx_clean_complq()
1983 ntc -= complq->desc_count; in idpf_tx_clean_complq()
1996 if (idpf_queue_has(GEN_CHK, complq) != gen) in idpf_tx_clean_complq()
2002 if (rel_tx_qid >= complq->txq_grp->num_txq || in idpf_tx_clean_complq()
2003 !complq->txq_grp->txqs[rel_tx_qid]) { in idpf_tx_clean_complq()
2004 netdev_err(complq->netdev, "TxQ not found\n"); in idpf_tx_clean_complq()
2007 tx_q = complq->txq_grp->txqs[rel_tx_qid]; in idpf_tx_clean_complq()
2037 complq->num_completions++; in idpf_tx_clean_complq()
2044 ntc -= complq->desc_count; in idpf_tx_clean_complq()
2045 tx_desc = &complq->comp[0]; in idpf_tx_clean_complq()
2046 idpf_queue_change(GEN_CHK, complq); in idpf_tx_clean_complq()
2058 if (unlikely(IDPF_TX_COMPLQ_PENDING(complq->txq_grp) > in idpf_tx_clean_complq()
2059 IDPF_TX_COMPLQ_OVERFLOW_THRESH(complq))) in idpf_tx_clean_complq()
2062 np = netdev_priv(complq->netdev); in idpf_tx_clean_complq()
2063 for (i = 0; i < complq->txq_grp->num_txq; ++i) { in idpf_tx_clean_complq()
2064 struct idpf_tx_queue *tx_q = complq->txq_grp->txqs[i]; in idpf_tx_clean_complq()
2092 ntc += complq->desc_count; in idpf_tx_clean_complq()
2093 complq->next_to_clean = ntc; in idpf_tx_clean_complq()
2153 IDPF_TX_COMPLQ_OVERFLOW_THRESH(tx_q->txq_grp->complq))) in idpf_tx_maybe_stop_splitq()
3548 kfree(q_vector->complq); in idpf_vport_intr_rel()
3549 q_vector->complq = NULL; in idpf_vport_intr_rel()
3951 clean_complete &= idpf_tx_clean_complq(q_vec->complq[i], in idpf_tx_splitq_clean_all()
4124 struct idpf_compl_queue *q = tx_qgrp->complq; in idpf_vport_intr_map_vector_to_qs()
4127 q->q_vector->complq[q->q_vector->num_complq++] = q; in idpf_vport_intr_map_vector_to_qs()
4257 q_vector->complq = kcalloc(complqs_per_vector, in idpf_vport_intr_alloc()
4258 sizeof(*q_vector->complq), in idpf_vport_intr_alloc()
4260 if (!q_vector->complq) in idpf_vport_intr_alloc()