Skip to content

Commit

Permalink
gk: add rib_free()
Browse files Browse the repository at this point in the history
  • Loading branch information
AltraMayor committed Aug 15, 2022
1 parent a6ce68a commit 64f9355
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gk/rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,13 @@ rib_create(struct rib_head *rib, const char *name, int socket_id,
void
rib_free(struct rib_head *rib)
{
/* TODO */
RTE_SET_USED(rib);
rib->root_node.has_nh = false;
rib->root_node.branch[false] = NULL;
rib->root_node.branch[true] = NULL;
rib->version++;

rte_mempool_free(rib->mp_nodes);
rib->mp_nodes = NULL;
}

int
Expand Down

0 comments on commit 64f9355

Please sign in to comment.