From f50929d370aa0216417f51f457770acdc2324c6c Mon Sep 17 00:00:00 2001 From: Artem Glazychev Date: Mon, 5 Jun 2023 15:02:46 +0700 Subject: af_xdp: remove the previous program before loading a new one Otherwise, we will get an error. The program could remain from the previous run. Type: fix Signed-off-by: Artem Glazychev Change-Id: I68e4072bd3b327592013804d67ccab7eb0ed3a0e --- src/plugins/af_xdp/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/af_xdp/device.c') diff --git a/src/plugins/af_xdp/device.c b/src/plugins/af_xdp/device.c index 570f34cdc7e..da8b58c37e4 100644 --- a/src/plugins/af_xdp/device.c +++ b/src/plugins/af_xdp/device.c @@ -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); -- cgit 1.2.3-korg