From bd49ff6ca8faeebd9a3d20759f612acfd57d6324 Mon Sep 17 00:00:00 2001 From: Jesper Dangaard Brouer Date: Tue, 7 Dec 2021 15:35:51 +0100 Subject: [PATCH] AF_XDP-interaction: Issue with XDP link down/up Signed-off-by: Jesper Dangaard Brouer --- AF_XDP-interaction/af_xdp_user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AF_XDP-interaction/af_xdp_user.c b/AF_XDP-interaction/af_xdp_user.c index cb97812..4b7ef33 100644 --- a/AF_XDP-interaction/af_xdp_user.c +++ b/AF_XDP-interaction/af_xdp_user.c @@ -1288,6 +1288,11 @@ int main(int argc, char **argv) cfg.sched_prio, cfg.sched_policy); } + /* Issue: At this point AF_XDP socket might not be ready e.g. for TX. + * It seems related with XDP attachment causing link down/up event for + * some drivers. Q: What is the right method/API that waits for link to + * be initilized correctly? + */ //sleep(3); // tx_pkt(&cfg, xsks.sockets[0]);