| 64 | } |
| 65 | |
| 66 | static int |
| 67 | dummy_modify(struct rte_fib6 *fib, const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE], |
| 68 | uint8_t depth, uint64_t next_hop, int op) |
| 69 | { |
| 70 | struct rte_rib6_node *node; |
| 71 | if ((fib == NULL) || (depth > RTE_FIB6_MAXDEPTH)) |
| 72 | return -EINVAL; |
| 73 | |
| 74 | node = rte_rib6_lookup_exact(fib->rib, ip, depth); |
| 75 | |
| 76 | switch (op) { |
| 77 | case RTE_FIB6_ADD: |
| 78 | if (node == NULL) |
| 79 | node = rte_rib6_insert(fib->rib, ip, depth); |
| 80 | if (node == NULL) |
| 81 | return -rte_errno; |
| 82 | return rte_rib6_set_nh(node, next_hop); |
| 83 | case RTE_FIB6_DEL: |
| 84 | if (node == NULL) |
| 85 | return -ENOENT; |
| 86 | rte_rib6_remove(fib->rib, ip, depth); |
| 87 | return 0; |
| 88 | } |
| 89 | return -EINVAL; |
| 90 | } |
| 91 | |
| 92 | static int |
| 93 | init_dataplane(struct rte_fib6 *fib, __rte_unused int socket_id, |
nothing calls this directly
no test coverage detected