Message ID | 20201116110416.10719-11-bjorn.topel@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [bpf-next,v2,01/10] net: introduce preferred busy-polling | expand |
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 09a9fc76f072..e4a1e82fcb22 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -1479,6 +1479,11 @@ static void apply_setsockopt(struct xsk_socket_info *xsk) if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL, (void *)&sock_opt, sizeof(sock_opt)) < 0) exit_with_error(errno); + + sock_opt = opt_batch_size; + if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL_BUDGET, + (void *)&sock_opt, sizeof(sock_opt)) < 0) + exit_with_error(errno); } int main(int argc, char **argv)