| 346 | } |
| 347 | |
| 348 | int |
| 349 | roc_npc_fini(struct roc_npc *roc_npc) |
| 350 | { |
| 351 | struct npc *npc = roc_npc_to_npc_priv(roc_npc); |
| 352 | int rc; |
| 353 | |
| 354 | if (!roc_npc->flow_age.aged_flows_get_thread_exit) |
| 355 | npc_aging_ctrl_thread_destroy(roc_npc); |
| 356 | |
| 357 | rc = npc_flow_free_all_resources(npc); |
| 358 | if (rc) { |
| 359 | plt_err("Error when deleting NPC MCAM entries, counters"); |
| 360 | return rc; |
| 361 | } |
| 362 | |
| 363 | if (npc->flow_list) { |
| 364 | plt_free(npc->flow_list); |
| 365 | npc->flow_list = NULL; |
| 366 | } |
| 367 | |
| 368 | if (npc->prio_flow_list) { |
| 369 | plt_free(npc->prio_flow_list); |
| 370 | npc->prio_flow_list = NULL; |
| 371 | } |
| 372 | |
| 373 | return 0; |
| 374 | } |
| 375 | |
| 376 | int |
| 377 | roc_npc_validate_portid_action(struct roc_npc *roc_npc_src, |
no test coverage detected