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

Function rte_eth_tx_burst

dpdk/lib/ethdev/rte_ethdev.h:6395–6448  ·  view source on GitHub ↗

* Send a burst of output packets on a transmit queue of an Ethernet device. * * The rte_eth_tx_burst() function is invoked to transmit output packets * on the output queue *queue_id* of the Ethernet device designated by its * *port_id*. * The *nb_pkts* parameter is the number of packets to send which are * supplied in the *tx_pkts* array of *rte_mbuf* structures, each of them * allocated fr

Source from the content-addressed store, hash-verified

6393 * *tx_pkts* parameter when the transmit ring is full or has been filled up.
6394 */
6395static inline uint16_t
6396rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
6397 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6398{
6399 struct rte_eth_fp_ops *p;
6400 void *qd;
6401
6402#ifdef RTE_ETHDEV_DEBUG_TX
6403 if (port_id >= RTE_MAX_ETHPORTS ||
6404 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6405 RTE_ETHDEV_LOG(ERR,
6406 "Invalid port_id=%u or queue_id=%u\n",
6407 port_id, queue_id);
6408 return 0;
6409 }
6410#endif
6411
6412 /* fetch pointer to queue data */
6413 p = &rte_eth_fp_ops[port_id];
6414 qd = p->txq.data[queue_id];
6415
6416#ifdef RTE_ETHDEV_DEBUG_TX
6417 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6418
6419 if (qd == NULL) {
6420 RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u for port_id=%u\n",
6421 queue_id, port_id);
6422 return 0;
6423 }
6424#endif
6425
6426#ifdef RTE_ETHDEV_RXTX_CALLBACKS
6427 {
6428 void *cb;
6429
6430 /* rte_memory_order_release memory order was used when the
6431 * call back was inserted into the list.
6432 * Since there is a clear dependency between loading
6433 * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6434 * not required.
6435 */
6436 cb = rte_atomic_load_explicit(&p->txq.clbk[queue_id],
6437 rte_memory_order_relaxed);
6438 if (unlikely(cb != NULL))
6439 nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
6440 tx_pkts, nb_pkts, cb);
6441 }
6442#endif
6443
6444 nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
6445
6446 rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts);
6447 return nb_pkts;
6448}
6449
6450/**
6451 * Process a burst of output packets on a transmit queue of an Ethernet device.

Callers 15

send_burstFunction · 0.85
kni_process_txFunction · 0.85
kni_process_rxFunction · 0.85
send_burstFunction · 0.85
send_burst_nodropFunction · 0.85
__writer_flushFunction · 0.85
rte_eth_tx_buffer_flushFunction · 0.85
txa_service_buffer_retryFunction · 0.85
ethdev_tx_node_processFunction · 0.85

Calls 1

Tested by 15

test_macsecFunction · 0.68
measure_rxtxFunction · 0.68
measure_rxonlyFunction · 0.68
measure_txonlyFunction · 0.68
main_loopFunction · 0.68
exec_burstFunction · 0.68
test_send_basic_packetsFunction · 0.68