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

Function app_tx_thread

dpdk/examples/qos_sched/app_thread.c:107–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void
108app_tx_thread(struct thread_conf **confs)
109{
110 struct rte_mbuf *mbufs[burst_conf.qos_dequeue];
111 struct thread_conf *conf;
112 int conf_idx = 0;
113 int nb_pkts;
114
115 while ((conf = confs[conf_idx])) {
116 nb_pkts = rte_ring_sc_dequeue_burst(conf->tx_ring, (void **)mbufs,
117 burst_conf.qos_dequeue, NULL);
118 if (likely(nb_pkts != 0)) {
119 uint16_t nb_tx = rte_eth_tx_burst(conf->tx_port, 0, mbufs, nb_pkts);
120 if (nb_pkts != nb_tx)
121 rte_pktmbuf_free_bulk(&mbufs[nb_tx], nb_pkts - nb_tx);
122 }
123
124 conf_idx++;
125 if (confs[conf_idx] == NULL)
126 conf_idx = 0;
127 }
128}
129
130
131void

Callers 1

app_main_loopFunction · 0.85

Calls 3

rte_eth_tx_burstFunction · 0.85
rte_pktmbuf_free_bulkFunction · 0.85

Tested by

no test coverage detected