Message ID | 20201210153645.21286-1-magnus.karlsson@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bpf-next] samples/bpf: fix possible hang in xdpsock with multiple threads | expand |
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 568f9815bb1b..813f7eaabf82 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -1275,6 +1275,8 @@ static void tx_only(struct xsk_socket_info *xsk, u32 *frame_nb, int batch_size) while (xsk_ring_prod__reserve(&xsk->tx, batch_size, &idx) < batch_size) { complete_tx_only(xsk, batch_size); + if (benchmark_done) + break; } for (i = 0; i < batch_size; i++) {