| 324 | } |
| 325 | |
| 326 | static bool |
| 327 | nfp_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 | |
| 354 | static int |
| 355 | nfp_flow_table_add(struct nfp_flow_priv *priv, |
no test coverage detected