Lines Matching refs:tx_buf

90 	if (!txq->tx_buf)
95 libeth_tx_complete(&txq->tx_buf[i], &cp);
97 kfree(txq->tx_buf);
98 txq->tx_buf = NULL;
206 tx_q->tx_buf = kzalloc(buf_size, GFP_KERNEL);
207 if (!tx_q->tx_buf)
1744 * @tx_buf: buffer to store
1747 struct idpf_tx_buf *tx_buf)
1751 if (unlikely(tx_buf->type <= LIBETH_SQE_CTX))
1763 stash->buf.skb = tx_buf->skb;
1764 stash->buf.bytes = tx_buf->bytes;
1765 stash->buf.packets = tx_buf->packets;
1766 stash->buf.type = tx_buf->type;
1767 stash->buf.nr_frags = tx_buf->nr_frags;
1768 dma_unmap_addr_set(&stash->buf, dma, dma_unmap_addr(tx_buf, dma));
1769 dma_unmap_len_set(&stash->buf, len, dma_unmap_len(tx_buf, len));
1770 idpf_tx_buf_compl_tag(&stash->buf) = idpf_tx_buf_compl_tag(tx_buf);
1776 tx_buf->type = LIBETH_SQE_EMPTY;
1785 buf = (txq)->tx_buf; \
1828 struct idpf_tx_buf *tx_buf;
1833 tx_buf = &tx_q->tx_buf[ntc];
1842 if (tx_buf->type <= LIBETH_SQE_CTX)
1845 if (unlikely(tx_buf->type != LIBETH_SQE_SKB))
1848 eop_idx = tx_buf->rs_idx;
1851 if (IDPF_TX_BUF_RSV_UNUSED(tx_q) < tx_buf->nr_frags) {
1856 idpf_stash_flow_sch_buffers(tx_q, tx_buf);
1860 tx_desc, tx_buf);
1861 idpf_stash_flow_sch_buffers(tx_q, tx_buf);
1864 libeth_tx_complete(tx_buf, &cp);
1869 tx_desc, tx_buf);
1872 libeth_tx_complete(tx_buf, &cp);
1877 idpf_tx_splitq_clean_bump_ntc(tx_q, ntc, tx_desc, tx_buf);
1891 buf = (txq)->tx_buf; \
1913 struct idpf_tx_buf *tx_buf = NULL;
1921 tx_buf = &txq->tx_buf[idx];
1923 if (unlikely(tx_buf->type <= LIBETH_SQE_CTX ||
1924 idpf_tx_buf_compl_tag(tx_buf) != compl_tag))
1927 if (tx_buf->type == LIBETH_SQE_SKB) {
1928 if (skb_shinfo(tx_buf->skb)->tx_flags & SKBTX_IN_PROGRESS)
1929 idpf_tx_read_tstamp(txq, tx_buf->skb);
1931 libeth_tx_complete(tx_buf, &cp);
1934 idpf_tx_clean_buf_ring_bump_ntc(txq, idx, tx_buf);
1936 while (idpf_tx_buf_compl_tag(tx_buf) == compl_tag) {
1937 libeth_tx_complete(tx_buf, &cp);
1938 idpf_tx_clean_buf_ring_bump_ntc(txq, idx, tx_buf);
1955 tx_buf = &txq->tx_buf[ntc];
1957 if (tx_buf->type == LIBETH_SQE_CTX)
1958 idpf_tx_clean_buf_ring_bump_ntc(txq, ntc, tx_buf);
1967 if (unlikely(tx_buf != &txq->tx_buf[orig_idx] &&
2319 /* clear dma mappings for failed tx_buf map */
2321 struct idpf_tx_buf *tx_buf;
2323 tx_buf = &txq->tx_buf[idx];
2324 libeth_tx_complete(tx_buf, &cp);
2325 if (tx_buf == first)
2383 struct idpf_tx_buf *tx_buf;
2402 tx_buf = first;
2415 idpf_tx_buf_compl_tag(tx_buf) = params->compl_tag;
2416 tx_buf->type = LIBETH_SQE_FRAG;
2419 dma_unmap_len_set(tx_buf, len, size);
2420 dma_unmap_addr_set(tx_buf, dma, dma);
2471 tx_buf = tx_q->tx_buf;
2477 tx_buf++;
2491 tx_buf->type = LIBETH_SQE_EMPTY;
2492 idpf_tx_buf_compl_tag(tx_buf) = params->compl_tag;
2518 tx_buf = tx_q->tx_buf;
2523 tx_buf++;
2749 txq->tx_buf[i].type = LIBETH_SQE_CTX;
2902 first = &tx_q->tx_buf[tx_q->next_to_use];