Skip to content

Commit fcb818f

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 e1ef7b0 commit fcb818f

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
@@ -477,11 +477,13 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
477477
static __poll_t xsk_poll(struct file *file, struct socket *sock,
478478
struct poll_table_struct *wait)
479479
{
480-
__poll_t mask = datagram_poll(file, sock, wait);
480+
__poll_t mask = 0;
481481
struct sock *sk = sock->sk;
482482
struct xdp_sock *xs = xdp_sk(sk);
483483
struct xsk_buff_pool *pool;
484484

485+
sock_poll_wait(file, sock, wait);
486+
485487
if (unlikely(!xsk_is_bound(xs)))
486488
return mask;
487489

0 commit comments

Comments
 (0)