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

Function nfp_check_mask_remove

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

Source from the content-addressed store, hash-verified

324}
325
326static bool
327nfp_check_mask_remove(struct nfp_flow_priv *priv,
328 char *mask_data,
329 uint32_t mask_len,
330 uint8_t *meta_flags)
331{
332 int ret;
333 struct nfp_mask_id_entry *mask_entry;
334
335 mask_entry = nfp_mask_table_search(priv, mask_data, mask_len);
336 if (mask_entry == NULL)
337 return false;
338
339 mask_entry->ref_cnt--;
340 if (mask_entry->ref_cnt == 0) {
341 ret = nfp_mask_table_del(priv, mask_data, mask_len,
342 mask_entry->mask_id);
343 if (ret != 0)
344 return false;
345
346 rte_free(mask_entry);
347 if (meta_flags)
348 *meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
349 }
350
351 return true;
352}
353
354static int
355nfp_flow_table_add(struct nfp_flow_priv *priv,

Callers 2

nfp_flow_processFunction · 0.85
nfp_flow_teardownFunction · 0.85

Calls 3

nfp_mask_table_searchFunction · 0.85
nfp_mask_table_delFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected