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>
This commit is contained in:
Chen Yahui
2022-09-16 18:31:43 +08:00
committed by Beno�t Ganne
parent d925246879
commit 1834b04d20

View File

@ -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;