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

Function app_main_loop_rx

dpdk/app/test-pipeline/runtime.c:44–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42#include "main.h"
43
44void
45app_main_loop_rx(void) {
46 uint32_t i;
47 int ret;
48
49 RTE_LOG(INFO, USER1, "Core %u is doing RX\n", rte_lcore_id());
50
51 while (!force_quit) {
52 for (i = 0; i < app.n_ports; i++) {
53 uint16_t n_mbufs;
54
55 n_mbufs = rte_eth_rx_burst(
56 app.ports[i],
57 0,
58 app.mbuf_rx.array,
59 app.burst_size_rx_read);
60
61 if (n_mbufs == 0)
62 continue;
63
64 do {
65 ret = rte_ring_sp_enqueue_bulk(
66 app.rings_rx[i],
67 (void **) app.mbuf_rx.array,
68 n_mbufs, NULL);
69 } while (ret == 0 && !force_quit);
70 }
71 }
72}
73
74void
75app_main_loop_worker(void) {

Callers 1

app_lcore_main_loopFunction · 0.85

Calls 3

rte_lcore_idFunction · 0.85
rte_eth_rx_burstFunction · 0.85
rte_ring_sp_enqueue_bulkFunction · 0.85

Tested by

no test coverage detected