taking first steps with XDP

David Gohberg <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CAE2Pf893-Y7svSxm68LPE3MbLrzxPqRDOuRuhJraYi564YWm6g@mail.gmail.com>
Hello everyone,

My goal is to build a simple program that schedules sending an
heartbeat packet (sort of like an ICMP reply-response) to a list of IP
addresses (a few million of them) on regular intervals, and update
alive/dead software state for each address. I have a pcap
implementation but performance is subpar.

I understand that for the rx part, a simple xdp program that
intercepts the heartbeat reply and writes to some bpf map will be
sufficient. However, from what I read, in order to send packets in the
same path, I will need to use AF_XDP sockets and write a user-space
application that will have to deal with cpu cores, rings, queues,
umems and everything related. Since I don't really need to redirect
the heartbeat reply packet to user-space, just acknowledge that a
reply was received (that can happen in the XDP program) is there a
layer or library over AF_XDP that allows for a simpler tx API which
abstracts the underlying mechanisms I mentioned?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.