mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user