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

Function rte_rib_lookup

dpdk/lib/rib/rte_rib.c:100–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100struct rte_rib_node *
101rte_rib_lookup(struct rte_rib *rib, uint32_t ip)
102{
103 struct rte_rib_node *cur, *prev = NULL;
104
105 if (unlikely(rib == NULL)) {
106 rte_errno = EINVAL;
107 return NULL;
108 }
109
110 cur = rib->tree;
111 while ((cur != NULL) && is_covered(ip, cur->ip, cur->depth)) {
112 if (is_valid_node(cur))
113 prev = cur;
114 cur = get_nxt_node(cur, ip);
115 }
116 return prev;
117}
118
119struct rte_rib_node *
120rte_rib_lookup_parent(struct rte_rib_node *ent)

Callers 2

dummy_lookupFunction · 0.85
test_basicFunction · 0.85

Calls 3

is_coveredFunction · 0.70
is_valid_nodeFunction · 0.70
get_nxt_nodeFunction · 0.70

Tested by 1

test_basicFunction · 0.68