Find a rule */
| 438 | |
| 439 | /* Find a rule */ |
| 440 | static inline int |
| 441 | rule_find_with_key(struct rte_lpm6 *lpm, |
| 442 | const struct rte_lpm6_rule_key *rule_key, |
| 443 | uint32_t *next_hop) |
| 444 | { |
| 445 | uint64_t hash_val; |
| 446 | int ret; |
| 447 | |
| 448 | /* lookup for a rule */ |
| 449 | ret = rte_hash_lookup_data(lpm->rules_tbl, (const void *) rule_key, |
| 450 | (void **) &hash_val); |
| 451 | if (ret >= 0) { |
| 452 | *next_hop = (uint32_t) hash_val; |
| 453 | return 1; |
| 454 | } |
| 455 | |
| 456 | return 0; |
| 457 | } |
| 458 | |
| 459 | /* Find a rule */ |
| 460 | static int |
no test coverage detected