The attach mode is by default set to XDP_MODE_NATIVE and needs to be
overwritten to XDP_MODE_SKB when '-S' option is used. Instead of
overwriting the attach mode was ORed and so was always running in NATIVE
mode. This patch fixes that.
Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
Old system include headers don't have they SO_PREFER_BUSY_POLL and
SO_BUSY_POLL_BUDGET socket option defines. Add conditional defines to the
AF_XDP-example userspace code so we can still compile if they are missing.
Fixes#76.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Move the xdpsock sample application from the Linux repo to the
bpf-examples repo. This example demonstrates a number of capabilities
of AF_XDP sockets.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>