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

Function l2fwd_send_burst

dpdk/examples/l2fwd-crypto/main.c:563–582  ·  view source on GitHub ↗

Send the burst of packets on an output interface */

Source from the content-addressed store, hash-verified

561
562/* Send the burst of packets on an output interface */
563static int
564l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n,
565 uint16_t port)
566{
567 struct rte_mbuf **pkt_buffer;
568 unsigned ret;
569
570 pkt_buffer = (struct rte_mbuf **)qconf->pkt_buf[port].buffer;
571
572 ret = rte_eth_tx_burst(port, 0, pkt_buffer, (uint16_t)n);
573 port_statistics[port].tx += ret;
574 if (unlikely(ret < n)) {
575 port_statistics[port].dropped += (n - ret);
576 do {
577 rte_pktmbuf_free(pkt_buffer[ret]);
578 } while (++ret < n);
579 }
580
581 return 0;
582}
583
584/* Enqueue packets for TX and prepare them to be sent. 8< */
585static int

Callers 2

l2fwd_send_packetFunction · 0.85
l2fwd_main_loopFunction · 0.85

Calls 2

rte_eth_tx_burstFunction · 0.85
rte_pktmbuf_freeFunction · 0.85

Tested by

no test coverage detected