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 <[email protected]>
This commit is contained in:
Toke Høiland-Jørgensen
2022-11-29 21:42:27 +01:00
parent e715364854
commit 112cf3e93b
+8
View File
@@ -53,6 +53,14 @@
#define PF_XDP AF_XDP
#endif
#ifndef SO_PREFER_BUSY_POLL
#define SO_PREFER_BUSY_POLL 69
#endif
#ifndef SO_BUSY_POLL_BUDGET
#define SO_BUSY_POLL_BUDGET 70
#endif
#define NUM_FRAMES (4 * 1024)
#define MIN_PKT_SIZE 64