This patch introduces a new setsockopt that enables busy-poll for XDP sockets. It is called XDP_BUSY_POLL_BATCH_SIZE and takes batch size as an argument. A value between 1 and NAPI_WEIGHT (64) will turn it on, 0 will turn it off and any other value will return an error. There is also a corresponding getsockopt implementation. Signed-off-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx> --- include/uapi/linux/if_xdp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h index caed8b1..be28a78 100644 --- a/include/uapi/linux/if_xdp.h +++ b/include/uapi/linux/if_xdp.h @@ -46,6 +46,7 @@ struct xdp_mmap_offsets { #define XDP_UMEM_FILL_RING 5 #define XDP_UMEM_COMPLETION_RING 6 #define XDP_STATISTICS 7 +#define XDP_BUSY_POLL_BATCH_SIZE 8 struct xdp_umem_reg { __u64 addr; /* Start of packet data area */ -- 2.7.4