/** * nfp_net_tx_full() - check if the TX ring is full * @tx_ring: TX ring to check * @dcnt: Number of descriptors that need to be enqueued (must be >= 1) * * This function checks, based on the *host copy* of read/write * pointer if a given TX ring is full. The real TX queue may have * some newly made available slots. * * Return: True if the ring is full.
*/ staticinlineint nfp_net_tx_full(struct nfp_net_tx_ring *tx_ring, int dcnt)
{ return (tx_ring->wr_p - tx_ring->rd_p) >= (tx_ring->cnt - dcnt);
}
/** * struct nfp_dp_ops - Hooks to wrap different implementation of different dp * @version: Indicate dp type * @tx_min_desc_per_pkt: Minimal TX descs needed for each packet * @cap_mask: Mask of supported features * @dma_mask: DMA addressing capability * @poll: Napi poll for normal rx/tx * @xsk_poll: Napi poll when xsk is enabled * @ctrl_poll: Tasklet poll for ctrl rx/tx * @xmit: Xmit for normal path * @ctrl_tx_one: Xmit for ctrl path * @rx_ring_fill_freelist: Give buffers from the ring to FW * @tx_ring_alloc: Allocate resource for a TX ring * @tx_ring_reset: Free any untransmitted buffers and reset pointers * @tx_ring_free: Free resources allocated to a TX ring * @tx_ring_bufs_alloc: Allocate resource for each TX buffer * @tx_ring_bufs_free: Free resources allocated to each TX buffer * @print_tx_descs: Show TX ring's info for debug purpose
*/ struct nfp_dp_ops { enum nfp_nfd_version version; unsignedint tx_min_desc_per_pkt;
u32 cap_mask;
u64 dma_mask;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.