diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2020-11-30 19:51:59 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-12-01 00:09:25 +0100 |
commit | e392081837283fbe5df1837fd85012ae5bfae098 (patch) | |
tree | f0c1d7ea91db4dfc7f03b59818246ac15d9ca2a7 /drivers/net/ethernet | |
parent | 45a86681844e375bef6f6add272ccc309bb6a08d (diff) |
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 <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20201130185205.196029-5-bjorn.topel@gmail.com
Diffstat (limited to 'drivers/net/ethernet')
0 files changed, 0 insertions, 0 deletions