Skip to content

Commit f585daa

Browse files
fengidrikernel-patches-bot
authored andcommitted
xsk: replace datagram_poll by sock_poll_wait
datagram_poll will judge the current socket status (EPOLLIN, EPOLLOUT) based on the traditional socket information (eg: sk_wmem_alloc), but this does not apply to xsk. So this patch uses sock_poll_wait instead of datagram_poll, and the mask is calculated by xsk_poll. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
1 parent 2c23d79 commit f585daa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/xdp/xsk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,13 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
471471
static __poll_t xsk_poll(struct file *file, struct socket *sock,
472472
struct poll_table_struct *wait)
473473
{
474-
__poll_t mask = datagram_poll(file, sock, wait);
474+
__poll_t mask = 0;
475475
struct sock *sk = sock->sk;
476476
struct xdp_sock *xs = xdp_sk(sk);
477477
struct xsk_buff_pool *pool;
478478

479+
sock_poll_wait(file, sock, wait);
480+
479481
if (unlikely(!xsk_is_bound(xs)))
480482
return mask;
481483

0 commit comments

Comments
 (0)