aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/af_xdp/device.c
diff options
context:
space:
mode:
authorArtem Glazychev <artem.glazychev@xored.com>2023-06-05 15:02:46 +0700
committerBeno�t Ganne <bganne@cisco.com>2023-06-08 09:15:09 +0000
commitf50929d370aa0216417f51f457770acdc2324c6c (patch)
tree03d87a9110f71719a715906b9802044c60b33ace /src/plugins/af_xdp/device.c
parent470d72f54abbd3e34053cc4f4e281593faf0fb77 (diff)
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 <artem.glazychev@xored.com> Change-Id: I68e4072bd3b327592013804d67ccab7eb0ed3a0e
Diffstat (limited to 'src/plugins/af_xdp/device.c')
-rw-r--r--src/plugins/af_xdp/device.c3
1 files changed, 2 insertions, 1 deletions
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);