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

Function nfp_mask_table_search

dpdk/drivers/net/nfp/nfp_flow.c:280–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280static struct nfp_mask_id_entry *
281nfp_mask_table_search(struct nfp_flow_priv *priv,
282 char *mask_data,
283 uint32_t mask_len)
284{
285 int index;
286 uint32_t hash_key;
287 struct nfp_mask_id_entry *entry;
288
289 hash_key = rte_jhash(mask_data, mask_len, priv->hash_seed);
290 index = rte_hash_lookup_data(priv->mask_table, &hash_key, (void **)&entry);
291 if (index < 0) {
292 PMD_DRV_LOG(DEBUG, "Data NOT found in the mask table.");
293 return NULL;
294 }
295
296 return entry;
297}
298
299static bool
300nfp_check_mask_add(struct nfp_flow_priv *priv,

Callers 2

nfp_check_mask_addFunction · 0.85
nfp_check_mask_removeFunction · 0.85

Calls 2

rte_hash_lookup_dataFunction · 0.85
rte_jhashFunction · 0.50

Tested by

no test coverage detected