From: Artem Glazychev Date: Mon, 5 Jun 2023 08:02:46 +0000 (+0700) Subject: af_xdp: remove the previous program before loading a new one X-Git-Tag: v24.02-rc0~187 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=f50929d370aa0216417f51f457770acdc2324c6c;p=vpp.git 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 --- 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);