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

Function kernel_tx_node_process

dpdk/lib/node/kernel_tx.c:43–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static uint16_t
44kernel_tx_node_process(struct rte_graph *graph __rte_unused, struct rte_node *node, void **objs,
45 uint16_t nb_objs)
46{
47 struct rte_mbuf **pkts = (struct rte_mbuf **)objs;
48 uint16_t obj_left = nb_objs;
49
50#define PREFETCH_CNT 4
51
52 while (obj_left >= 12) {
53 /* Prefetch next-next mbufs */
54 rte_prefetch0(pkts[8]);
55 rte_prefetch0(pkts[9]);
56 rte_prefetch0(pkts[10]);
57 rte_prefetch0(pkts[11]);
58
59 /* Prefetch next mbuf data */
60 rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[4], void *, pkts[4]->l2_len));
61 rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[5], void *, pkts[5]->l2_len));
62 rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[6], void *, pkts[6]->l2_len));
63 rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[7], void *, pkts[7]->l2_len));
64
65 kernel_tx_process_mbuf(node, pkts, PREFETCH_CNT);
66
67 obj_left -= PREFETCH_CNT;
68 pkts += PREFETCH_CNT;
69 }
70
71 while (obj_left > 0) {
72 kernel_tx_process_mbuf(node, pkts, 1);
73
74 obj_left--;
75 pkts++;
76 }
77
78 rte_pktmbuf_free_bulk((struct rte_mbuf **)objs, nb_objs);
79
80 return nb_objs;
81}
82
83static int
84kernel_tx_node_init(const struct rte_graph *graph __rte_unused, struct rte_node *node)

Callers

nothing calls this directly

Calls 3

kernel_tx_process_mbufFunction · 0.85
rte_pktmbuf_free_bulkFunction · 0.85
rte_prefetch0Function · 0.50

Tested by

no test coverage detected