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

Function rte_eth_tx_buffer_flush

dpdk/lib/ethdev/rte_ethdev.h:6590–6611  ·  view source on GitHub ↗

* Send any packets queued up for transmission on a port and HW queue * * This causes an explicit flush of packets previously buffered via the * rte_eth_tx_buffer() function. It returns the number of packets successfully * sent to the NIC, and calls the error callback for any unsent packets. Unless * explicitly set up otherwise, the default callback simply frees the unsent * packets back to t

Source from the content-addressed store, hash-verified

6588 * callback is called for any packets which could not be sent.
6589 */
6590static inline uint16_t
6591rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
6592 struct rte_eth_dev_tx_buffer *buffer)
6593{
6594 uint16_t sent;
6595 uint16_t to_send = buffer->length;
6596
6597 if (to_send == 0)
6598 return 0;
6599
6600 sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send);
6601
6602 buffer->length = 0;
6603
6604 /* All packets sent, or to be dealt with by callback below */
6605 if (unlikely(sent != to_send))
6606 buffer->error_callback(&buffer->pkts[sent],
6607 (uint16_t)(to_send - sent),
6608 buffer->error_userdata);
6609
6610 return sent;
6611}
6612
6613/**
6614 * Buffer a single packet for future transmission on a port and queue

Callers 14

rte_eth_tx_bufferFunction · 0.85
txa_service_funcFunction · 0.85
main_loopFunction · 0.85
l2fwd_flush_jobFunction · 0.85
mainFunction · 0.85
l2fwd_main_loopFunction · 0.85
lsi_main_loopFunction · 0.85
main_intr_loopFunction · 0.85
main_telemetry_loopFunction · 0.85
main_legacy_loopFunction · 0.85
l2fwd_main_loopFunction · 0.85
l2fwd_poll_main_loopFunction · 0.85

Calls 1

rte_eth_tx_burstFunction · 0.85

Tested by

no test coverage detected