Find a rule */
| 458 | |
| 459 | /* Find a rule */ |
| 460 | static int |
| 461 | rule_find(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth, |
| 462 | uint32_t *next_hop) |
| 463 | { |
| 464 | struct rte_lpm6_rule_key rule_key; |
| 465 | |
| 466 | /* init a rule key */ |
| 467 | rule_key_init(&rule_key, ip, depth); |
| 468 | |
| 469 | return rule_find_with_key(lpm, &rule_key, next_hop); |
| 470 | } |
| 471 | |
| 472 | /* |
| 473 | * Checks if a rule already exists in the rules table and updates |
no test coverage detected