Enqueue a single packet, and send burst if queue is filled */
| 2012 | |
| 2013 | /* Enqueue a single packet, and send burst if queue is filled */ |
| 2014 | static inline int |
| 2015 | send_single_packet(struct rte_mbuf *m, uint8_t port) |
| 2016 | { |
| 2017 | uint16_t len; |
| 2018 | struct lcore_conf *qconf; |
| 2019 | |
| 2020 | qconf = &lcore_conf; |
| 2021 | len = qconf->tx_mbufs[port].len; |
| 2022 | qconf->tx_mbufs[port].m_table[len] = m; |
| 2023 | len++; |
| 2024 | |
| 2025 | /* enough pkts to be sent */ |
| 2026 | if (unlikely(len == MAX_PKT_BURST)) { |
| 2027 | send_burst(qconf, MAX_PKT_BURST, port); |
| 2028 | len = 0; |
| 2029 | } |
| 2030 | |
| 2031 | qconf->tx_mbufs[port].len = len; |
| 2032 | return 0; |
| 2033 | } |
| 2034 | |
| 2035 | int |
| 2036 | ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m, |
no test coverage detected