MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ngbe_set_tx_function

Function ngbe_set_tx_function

dpdk/drivers/net/ngbe/ngbe_rxtx.c:1855–1876  ·  view source on GitHub ↗

Takes an ethdev and a queue and sets up the tx function to be used based on * the queue parameters. Used in tx_queue_setup by primary process and then * in dev_init by secondary process when attaching to an existing ethdev. */

Source from the content-addressed store, hash-verified

1853 * in dev_init by secondary process when attaching to an existing ethdev.
1854 */
1855void
1856ngbe_set_tx_function(struct rte_eth_dev *dev, struct ngbe_tx_queue *txq)
1857{
1858 /* Use a simple Tx queue (no offloads, no multi segs) if possible */
1859 if (txq->offloads == 0 &&
1860 txq->tx_free_thresh >= RTE_PMD_NGBE_TX_MAX_BURST) {
1861 PMD_INIT_LOG(DEBUG, "Using simple tx code path");
1862 dev->tx_pkt_burst = ngbe_xmit_pkts_simple;
1863 dev->tx_pkt_prepare = NULL;
1864 } else {
1865 PMD_INIT_LOG(DEBUG, "Using full-featured tx code path");
1866 PMD_INIT_LOG(DEBUG,
1867 " - offloads = 0x%" PRIx64,
1868 txq->offloads);
1869 PMD_INIT_LOG(DEBUG,
1870 " - tx_free_thresh = %lu [RTE_PMD_NGBE_TX_MAX_BURST=%lu]",
1871 (unsigned long)txq->tx_free_thresh,
1872 (unsigned long)RTE_PMD_NGBE_TX_MAX_BURST);
1873 dev->tx_pkt_burst = ngbe_xmit_pkts;
1874 dev->tx_pkt_prepare = ngbe_prep_pkts;
1875 }
1876}
1877
1878static const struct {
1879 eth_tx_burst_t pkt_burst;

Callers 2

eth_ngbe_dev_initFunction · 0.85
ngbe_dev_tx_queue_setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected