diff options
| author | Björn Töpel <[email protected]> | 2020-11-30 18:51:59 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-11-30 23:09:25 +0000 |
| commit | e392081837283fbe5df1837fd85012ae5bfae098 (patch) | |
| tree | f0c1d7ea91db4dfc7f03b59818246ac15d9ca2a7 /drivers/net/xen-netfront.c | |
| parent | xsk: Add support for recvmsg() (diff) | |
| download | kernel-e392081837283fbe5df1837fd85012ae5bfae098.tar.gz kernel-e392081837283fbe5df1837fd85012ae5bfae098.zip | |
xsk: Check need wakeup flag in sendmsg()
Add a check for need wake up in sendmsg(), so that if a user calls
sendmsg() when no wakeup is needed, do not trigger a wakeup.
To simplify the need wakeup check in the syscall, unconditionally
enable the need wakeup flag for Tx. This has a side-effect for poll();
If poll() is called for a socket without enabled need wakeup, a Tx
wakeup is unconditionally performed.
The wakeup matrix for AF_XDP now looks like:
need wakeup | poll() | sendmsg() | recvmsg()
------------+--------------+-------------+------------
disabled | wake Tx | wake Tx | nop
enabled | check flag; | check flag; | check flag;
| wake Tx/Rx | wake Tx | wake Rx
Signed-off-by: Björn Töpel <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Magnus Karlsson <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/net/xen-netfront.c')
0 files changed, 0 insertions, 0 deletions
