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

Function prepare_traffic

dpdk/examples/ipsec-secgw/ipsec_worker.h:232–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static __rte_always_inline void
233prepare_traffic(void *ctx, struct rte_mbuf **pkts,
234 struct ipsec_traffic *t, uint16_t nb_pkts)
235{
236 int32_t i;
237
238 t->ipsec.num = 0;
239 t->ip4.num = 0;
240 t->ip6.num = 0;
241
242 for (i = 0; i < (nb_pkts - PREFETCH_OFFSET); i++) {
243 rte_prefetch0(rte_pktmbuf_mtod(pkts[i + PREFETCH_OFFSET],
244 void *));
245 prepare_one_packet(ctx, pkts[i], t);
246 }
247 /* Process left packets */
248 for (; i < nb_pkts; i++)
249 prepare_one_packet(ctx, pkts[i], t);
250}
251
252/* Send burst of packets on an output interface */
253static __rte_always_inline int32_t

Callers 2

process_pktsFunction · 0.85

Calls 1

prepare_one_packetFunction · 0.85

Tested by

no test coverage detected