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

Function rebuild_lpm

dpdk/lib/lpm/rte_lpm6.c:223–234  ·  view source on GitHub ↗

* Rebuild the entire LPM tree by reinserting all rules */

Source from the content-addressed store, hash-verified

221 * Rebuild the entire LPM tree by reinserting all rules
222 */
223static void
224rebuild_lpm(struct rte_lpm6 *lpm)
225{
226 uint64_t next_hop;
227 struct rte_lpm6_rule_key *rule_key;
228 uint32_t iter = 0;
229
230 while (rte_hash_iterate(lpm->rules_tbl, (void *) &rule_key,
231 (void **) &next_hop, &iter) >= 0)
232 rte_lpm6_add(lpm, rule_key->ip, rule_key->depth,
233 (uint32_t) next_hop);
234}
235
236/*
237 * Allocates memory for LPM object

Callers 1

Calls 2

rte_hash_iterateFunction · 0.85
rte_lpm6_addFunction · 0.70

Tested by

no test coverage detected