aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Yahui <goodluckwillcomesoon@gmail.com>2022-09-16 18:31:43 +0800
committerBeno�t Ganne <bganne@cisco.com>2022-09-27 14:30:43 +0000
commit1834b04d20552e92da11719afddd5497f522273a (patch)
tree7ac9436398717a98eb0e67c690010a06d46fcd63
parentd9252468792d52373b7cab1b66eda5fe279f7cb5 (diff)
af_xdp: compile error undeclared identifier 'SOL_XDP'
Type: fix Signed-off-by: Chen Yahui <goodluckwillcomesoon@gmail.com> Change-Id: Ia447420f692f1487d343886845d648d766e43c27 Signed-off-by: Chen Yahui <goodluckwillcomesoon@gmail.com>
-rw-r--r--src/plugins/af_xdp/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/af_xdp/device.c b/src/plugins/af_xdp/device.c
index 5a16ede1323..a571155a707 100644
--- a/src/plugins/af_xdp/device.c
+++ b/src/plugins/af_xdp/device.c
@@ -319,6 +319,9 @@ af_xdp_create_queue (vlib_main_t *vm, af_xdp_create_if_args_t *args,
fd = xsk_socket__fd (*xsk);
optlen = sizeof (opt);
+#ifndef SOL_XDP
+#define SOL_XDP 283
+#endif
if (getsockopt (fd, SOL_XDP, XDP_OPTIONS, &opt, &optlen))
{
args->rv = VNET_API_ERROR_SYSCALL_ERROR_3;