| 40 | (((struct ip6_lookup_node_ctx *)ctx)->mbuf_priv1_off) |
| 41 | |
| 42 | static uint16_t |
| 43 | ip6_lookup_node_process_scalar(struct rte_graph *graph, struct rte_node *node, |
| 44 | void **objs, uint16_t nb_objs) |
| 45 | { |
| 46 | struct rte_mbuf *mbuf0, *mbuf1, *mbuf2, *mbuf3, **pkts; |
| 47 | struct rte_lpm6 *lpm6 = IP6_LOOKUP_NODE_LPM(node->ctx); |
| 48 | const int dyn = IP6_LOOKUP_NODE_PRIV1_OFF(node->ctx); |
| 49 | struct rte_ipv6_hdr *ipv6_hdr; |
| 50 | void **to_next, **from; |
| 51 | uint16_t last_spec = 0; |
| 52 | rte_edge_t next_index; |
| 53 | uint16_t n_left_from; |
| 54 | uint16_t held = 0; |
| 55 | uint32_t drop_nh; |
| 56 | int i, rc; |
| 57 | |
| 58 | /* Speculative next */ |
| 59 | next_index = RTE_NODE_IP6_LOOKUP_NEXT_REWRITE; |
| 60 | /* Drop node */ |
| 61 | drop_nh = ((uint32_t)RTE_NODE_IP6_LOOKUP_NEXT_PKT_DROP) << 16; |
| 62 | |
| 63 | pkts = (struct rte_mbuf **)objs; |
| 64 | from = objs; |
| 65 | n_left_from = nb_objs; |
| 66 | |
| 67 | for (i = OBJS_PER_CLINE; i < RTE_GRAPH_BURST_SIZE; i += OBJS_PER_CLINE) |
| 68 | rte_prefetch0(&objs[i]); |
| 69 | |
| 70 | for (i = 0; i < 4 && i < n_left_from; i++) |
| 71 | rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], void *, |
| 72 | sizeof(struct rte_ether_hdr))); |
| 73 | |
| 74 | /* Get stream for the speculated next node */ |
| 75 | to_next = rte_node_next_stream_get(graph, node, next_index, nb_objs); |
| 76 | while (n_left_from >= 4) { |
| 77 | uint8_t ip_batch[4][16]; |
| 78 | int32_t next_hop[4]; |
| 79 | uint16_t next[4]; |
| 80 | |
| 81 | #if RTE_GRAPH_BURST_SIZE > 64 |
| 82 | /* Prefetch next-next mbufs */ |
| 83 | if (likely(n_left_from > 11)) { |
| 84 | rte_prefetch0(pkts[8]); |
| 85 | rte_prefetch0(pkts[9]); |
| 86 | rte_prefetch0(pkts[10]); |
| 87 | rte_prefetch0(pkts[11]); |
| 88 | } |
| 89 | #endif |
| 90 | /* Prefetch next mbuf data */ |
| 91 | if (likely(n_left_from > 7)) { |
| 92 | rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[4], void *, |
| 93 | sizeof(struct rte_ether_hdr))); |
| 94 | rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[5], void *, |
| 95 | sizeof(struct rte_ether_hdr))); |
| 96 | rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[6], void *, |
| 97 | sizeof(struct rte_ether_hdr))); |
| 98 | rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[7], void *, |
| 99 | sizeof(struct rte_ether_hdr))); |
nothing calls this directly
no test coverage detected