* 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
| 6588 | * callback is called for any packets which could not be sent. |
| 6589 | */ |
| 6590 | static inline uint16_t |
| 6591 | rte_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 |
no test coverage detected