• Home
  • Raw
  • Download

Lines Matching refs:tx

126 static void hfi1_ipoib_free_tx(struct ipoib_txreq *tx, int budget)  in hfi1_ipoib_free_tx()  argument
128 struct hfi1_ipoib_dev_priv *priv = tx->priv; in hfi1_ipoib_free_tx()
130 if (likely(!tx->sdma_status)) { in hfi1_ipoib_free_tx()
131 dev_sw_netstats_tx_add(priv->netdev, 1, tx->skb->len); in hfi1_ipoib_free_tx()
136 __func__, tx->sdma_status, in hfi1_ipoib_free_tx()
137 le64_to_cpu(tx->sdma_hdr.pbc), tx->txq->q_idx, in hfi1_ipoib_free_tx()
138 tx->txq->sde->this_idx); in hfi1_ipoib_free_tx()
141 napi_consume_skb(tx->skb, budget); in hfi1_ipoib_free_tx()
142 sdma_txclean(priv->dd, &tx->txreq); in hfi1_ipoib_free_tx()
143 kmem_cache_free(priv->txreq_cache, tx); in hfi1_ipoib_free_tx()
194 static void hfi1_ipoib_add_tx(struct ipoib_txreq *tx) in hfi1_ipoib_add_tx() argument
196 struct hfi1_ipoib_circ_buf *tx_ring = &tx->txq->tx_ring; in hfi1_ipoib_add_tx()
208 tx_ring->items[head] = tx; in hfi1_ipoib_add_tx()
212 napi_schedule_irqoff(tx->txq->napi); in hfi1_ipoib_add_tx()
214 struct hfi1_ipoib_txq *txq = tx->txq; in hfi1_ipoib_add_tx()
215 struct hfi1_ipoib_dev_priv *priv = tx->priv; in hfi1_ipoib_add_tx()
218 hfi1_ipoib_free_tx(tx, 0); in hfi1_ipoib_add_tx()
228 struct ipoib_txreq *tx = container_of(txreq, struct ipoib_txreq, txreq); in hfi1_ipoib_sdma_complete() local
230 tx->sdma_status = status; in hfi1_ipoib_sdma_complete()
232 hfi1_ipoib_add_tx(tx); in hfi1_ipoib_sdma_complete()
235 static int hfi1_ipoib_build_ulp_payload(struct ipoib_txreq *tx, in hfi1_ipoib_build_ulp_payload() argument
239 struct sdma_txreq *txreq = &tx->txreq; in hfi1_ipoib_build_ulp_payload()
240 struct sk_buff *skb = tx->skb; in hfi1_ipoib_build_ulp_payload()
266 static int hfi1_ipoib_build_tx_desc(struct ipoib_txreq *tx, in hfi1_ipoib_build_tx_desc() argument
270 struct sdma_txreq *txreq = &tx->txreq; in hfi1_ipoib_build_tx_desc()
271 struct hfi1_sdma_header *sdma_hdr = &tx->sdma_hdr; in hfi1_ipoib_build_tx_desc()
273 sizeof(sdma_hdr->pbc) + (txp->hdr_dwords << 2) + tx->skb->len; in hfi1_ipoib_build_tx_desc()
289 return hfi1_ipoib_build_ulp_payload(tx, txp); in hfi1_ipoib_build_tx_desc()
292 static void hfi1_ipoib_build_ib_tx_headers(struct ipoib_txreq *tx, in hfi1_ipoib_build_ib_tx_headers() argument
295 struct hfi1_ipoib_dev_priv *priv = tx->priv; in hfi1_ipoib_build_ib_tx_headers()
296 struct hfi1_sdma_header *sdma_hdr = &tx->sdma_hdr; in hfi1_ipoib_build_ib_tx_headers()
297 struct sk_buff *skb = tx->skb; in hfi1_ipoib_build_ib_tx_headers()
389 struct ipoib_txreq *tx; in hfi1_ipoib_send_dma_common() local
392 tx = kmem_cache_alloc_node(priv->txreq_cache, in hfi1_ipoib_send_dma_common()
395 if (unlikely(!tx)) in hfi1_ipoib_send_dma_common()
399 tx->txreq.num_desc = 0; in hfi1_ipoib_send_dma_common()
400 tx->priv = priv; in hfi1_ipoib_send_dma_common()
401 tx->txq = txp->txq; in hfi1_ipoib_send_dma_common()
402 tx->skb = skb; in hfi1_ipoib_send_dma_common()
403 INIT_LIST_HEAD(&tx->txreq.list); in hfi1_ipoib_send_dma_common()
405 hfi1_ipoib_build_ib_tx_headers(tx, txp); in hfi1_ipoib_send_dma_common()
407 ret = hfi1_ipoib_build_tx_desc(tx, txp); in hfi1_ipoib_send_dma_common()
419 return tx; in hfi1_ipoib_send_dma_common()
422 sdma_txclean(priv->dd, &tx->txreq); in hfi1_ipoib_send_dma_common()
423 kmem_cache_free(priv->txreq_cache, tx); in hfi1_ipoib_send_dma_common()
464 struct ipoib_txreq *tx) in hfi1_ipoib_submit_tx() argument
470 &tx->txreq, in hfi1_ipoib_submit_tx()
486 struct ipoib_txreq *tx; in hfi1_ipoib_send_dma_single() local
489 tx = hfi1_ipoib_send_dma_common(dev, skb, txp); in hfi1_ipoib_send_dma_single()
490 if (IS_ERR(tx)) { in hfi1_ipoib_send_dma_single()
491 int ret = PTR_ERR(tx); in hfi1_ipoib_send_dma_single()
503 ret = hfi1_ipoib_submit_tx(txq, tx); in hfi1_ipoib_send_dma_single()
506 trace_sdma_output_ibhdr(tx->priv->dd, in hfi1_ipoib_send_dma_single()
507 &tx->sdma_hdr.hdr, in hfi1_ipoib_send_dma_single()
518 sdma_txclean(priv->dd, &tx->txreq); in hfi1_ipoib_send_dma_single()
520 kmem_cache_free(priv->txreq_cache, tx); in hfi1_ipoib_send_dma_single()
531 struct ipoib_txreq *tx; in hfi1_ipoib_send_dma_list() local
546 tx = hfi1_ipoib_send_dma_common(dev, skb, txp); in hfi1_ipoib_send_dma_list()
547 if (IS_ERR(tx)) { in hfi1_ipoib_send_dma_list()
548 int ret = PTR_ERR(tx); in hfi1_ipoib_send_dma_list()
560 list_add_tail(&tx->txreq.list, &txq->tx_list); in hfi1_ipoib_send_dma_list()
564 trace_sdma_output_ibhdr(tx->priv->dd, in hfi1_ipoib_send_dma_list()
565 &tx->sdma_hdr.hdr, in hfi1_ipoib_send_dma_list()
806 struct ipoib_txreq *tx = in hfi1_ipoib_drain_tx_list() local
810 sdma_txclean(txq->priv->dd, &tx->txreq); in hfi1_ipoib_drain_tx_list()
811 dev_kfree_skb_any(tx->skb); in hfi1_ipoib_drain_tx_list()
812 kmem_cache_free(txq->priv->txreq_cache, tx); in hfi1_ipoib_drain_tx_list()