On Wed, 24 Jul 2024 at 01:37, Ben LaGreca <benlagreca02@xxxxxxxxx> wrote: > > Is it possible to use recvmsg/read on an AF_XDP socket? I've been able > to set up a socket, write an XDP program, and properly receive frames > in UMEM with the RX and Fill rings, but am more interested in using > standard linux C functions. Some libxdp documentation mentions the use > of poll and sendto/recvmsg, and I have successfully polled the socket > (as one would a normal AF_INET socket), but can't find documentation > on clearing the revents status after a poll. Any help or redirection > to documentation would be appreciated. sendto() and recvmsg() are only used to "wake up" the driver when you are using an AF_XDP socket. poll() can be used for this too and also to wait for an Rx or Tx event. But most of the standard Linux C functions cannot be used with an AF_XDP socket. You have to use the rings and the umem. Less convenient, but faster. > -- Ben LaGreca >