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

Function send_single_packet

lib/ff_dpdk_if.c:2014–2033  ·  view source on GitHub ↗

Enqueue a single packet, and send burst if queue is filled */

Source from the content-addressed store, hash-verified

2012
2013/* Enqueue a single packet, and send burst if queue is filled */
2014static inline int
2015send_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
2035int
2036ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,

Callers 3

ff_dpdk_if.cFile · 0.70
ff_dpdk_if_sendFunction · 0.70
ff_dpdk_raw_packet_sendFunction · 0.70

Calls 1

send_burstFunction · 0.70

Tested by

no test coverage detected