I am trying to use AF_XDP on Ubuntu 20.04 with Mellanox Technologies MT27800 Family [ConnectX-5] . The problem I am facing is that when I try to bind the AF_XDP socket in zerocopy mode it fails. There is no problem connecting it in copy mode. Since the zerocopy performance is much higher I wanted to know if this feature is supported by Mellanox drivers on Linux and how I can get it to work.
If any one else wonders why AF_XDP zerocopy is not working with Mellanox (for example why xdpsock in Linux BPF sample programs is not able to connect) then please have a look at here https://www.spinics.net/lists/xdp-newbies/msg01347.html . As said in this link Connect X4 and above will support AF_XDP zerocopy mode.