• Home
  • Raw
  • Download

Lines Matching refs:key

167 				   const struct bpf_lpm_trie_key *key)  in longest_prefix_match()  argument
169 u32 limit = min(node->prefixlen, key->prefixlen); in longest_prefix_match()
182 *(__be64 *)key->data); in longest_prefix_match()
195 *(__be32 *)&key->data[i]); in longest_prefix_match()
207 *(__be16 *)&key->data[i]); in longest_prefix_match()
218 prefixlen += 8 - fls(node->data[i] ^ key->data[i]); in longest_prefix_match()
232 struct bpf_lpm_trie_key *key = _key; in trie_lookup_elem() local
234 if (key->prefixlen > trie->max_prefixlen) in trie_lookup_elem()
248 matchlen = longest_prefix_match(trie, node, key); in trie_lookup_elem()
271 next_bit = extract_bit(key->data, node->prefixlen); in trie_lookup_elem()
312 struct bpf_lpm_trie_key *key = _key; in trie_update_elem() local
321 if (key->prefixlen > trie->max_prefixlen) in trie_update_elem()
341 new_node->prefixlen = key->prefixlen; in trie_update_elem()
344 memcpy(new_node->data, key->data, trie->data_size); in trie_update_elem()
355 matchlen = longest_prefix_match(trie, node, key); in trie_update_elem()
358 node->prefixlen == key->prefixlen || in trie_update_elem()
362 next_bit = extract_bit(key->data, node->prefixlen); in trie_update_elem()
393 if (matchlen == key->prefixlen) { in trie_update_elem()
411 if (extract_bit(key->data, matchlen)) { in trie_update_elem()
440 struct bpf_lpm_trie_key *key = _key; in trie_delete_elem() local
448 if (key->prefixlen > trie->max_prefixlen) in trie_delete_elem()
464 matchlen = longest_prefix_match(trie, node, key); in trie_delete_elem()
467 node->prefixlen == key->prefixlen) in trie_delete_elem()
472 next_bit = extract_bit(key->data, node->prefixlen); in trie_delete_elem()
476 if (!node || node->prefixlen != key->prefixlen || in trie_delete_elem()
622 struct bpf_lpm_trie_key *key = _key, *next_key = _next_key; in trie_get_next_key() local
645 if (!key || key->prefixlen > trie->max_prefixlen) in trie_get_next_key()
657 matchlen = longest_prefix_match(trie, node, key); in trie_get_next_key()
659 node->prefixlen == key->prefixlen) in trie_get_next_key()
662 next_bit = extract_bit(key->data, node->prefixlen); in trie_get_next_key()
665 if (!node || node->prefixlen != key->prefixlen || in trie_get_next_key()