Skip to content

Commit

Permalink
af_xdp: remove the previous program before loading a new one
Browse files Browse the repository at this point in the history
Otherwise, we will get an error. The program could remain from the previous run.

Type: fix

Signed-off-by: Artem Glazychev <[email protected]>
Change-Id: I68e4072bd3b327592013804d67ccab7eb0ed3a0e
  • Loading branch information
glazychev-art authored and bganne committed Jun 8, 2023
1 parent 470d72f commit f50929d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/af_xdp/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ af_xdp_create_if (vlib_main_t * vm, af_xdp_create_if_args_t * args)
goto err1;
}

if (args->prog && af_xdp_load_program (args, ad))
if (args->prog &&
(af_xdp_remove_program (ad) || af_xdp_load_program (args, ad)))
goto err2;

q_num = clib_max (rxq_num, txq_num);
Expand Down

0 comments on commit f50929d

Please sign in to comment.