Commit Graph

3 Commits

Author SHA1 Message Date
Tirthendu Sarkar
f27b9881bf AF_XDP-example: fix XDP prog attach for xdp-skb mode
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>
2023-02-03 17:04:46 +01:00
Toke Høiland-Jørgensen
112cf3e93b AF_XDP-example: Conditionally define socket options
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>
2022-11-29 21:42:27 +01:00
Magnus Karlsson
c425a168a1 AF_XDP-example: move xdpsock example to bpf-examples repo
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>
2022-09-23 06:06:57 +00:00