* Rebuild the entire LPM tree by reinserting all rules */
| 221 | * Rebuild the entire LPM tree by reinserting all rules |
| 222 | */ |
| 223 | static void |
| 224 | rebuild_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 |
no test coverage detected