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

Function rule_find_with_key

dpdk/lib/lpm/rte_lpm6.c:440–457  ·  view source on GitHub ↗

Find a rule */

Source from the content-addressed store, hash-verified

438
439/* Find a rule */
440static inline int
441rule_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 */
460static int

Callers 3

rule_findFunction · 0.70
rule_addFunction · 0.70
rule_find_less_specificFunction · 0.70

Calls 1

rte_hash_lookup_dataFunction · 0.85

Tested by

no test coverage detected