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

Function send_timeout_burst

dpdk/examples/ipv4_multicast/main.c:376–392  ·  view source on GitHub ↗

Send burst of outgoing packet, if timeout expires. */

Source from the content-addressed store, hash-verified

374
375/* Send burst of outgoing packet, if timeout expires. */
376static inline void
377send_timeout_burst(struct lcore_queue_conf *qconf)
378{
379 uint64_t cur_tsc;
380 uint16_t portid;
381 const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US;
382
383 cur_tsc = rte_rdtsc();
384 if (likely (cur_tsc < qconf->tx_tsc + drain_tsc))
385 return;
386
387 for (portid = 0; portid < MAX_PORTS; portid++) {
388 if (qconf->tx_mbufs[portid].len != 0)
389 send_burst(qconf, portid);
390 }
391 qconf->tx_tsc = cur_tsc;
392}
393
394/* main processing loop */
395static int

Callers 1

main_loopFunction · 0.85

Calls 3

rte_get_tsc_hzFunction · 0.85
send_burstFunction · 0.70
rte_rdtscFunction · 0.50

Tested by

no test coverage detected