lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 14 Dec 2021 11:26:47 +0100 From: Magnus Karlsson <magnus.karlsson@...il.com> To: magnus.karlsson@...el.com, bjorn@...nel.org, ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org, maciej.fijalkowski@...el.com Cc: jonathan.lemon@...il.com, bpf@...r.kernel.org Subject: [PATCH bpf-next] xsk: add test for tx_writeable to batched path From: Magnus Karlsson <magnus.karlsson@...el.com> Add a test for the tx_writeable condition to the batched Tx processing path. This test is in the skb and non-batched code paths but not in the batched code path. So add it there. This test makes sure that a process is not woken up until there are a sufficiently large number of free entries in the Tx ring. Currently, any driver using the batched interface will be woken up even if there is only one free entry, impacting performance negatively. Fixes: 3413f04141aa ("xsk: Change the tx writeable condition") Signed-off-by: Magnus Karlsson <magnus.karlsson@...el.com> --- net/xdp/xsk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 28ef3f4465ae..3772fcaa76ed 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -392,7 +392,8 @@ u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, struct xdp_desc * xskq_cons_release_n(xs->tx, nb_pkts); __xskq_cons_release(xs->tx); - xs->sk.sk_write_space(&xs->sk); + if (xsk_tx_writeable(xs)) + xs->sk.sk_write_space(&xs->sk); out: rcu_read_unlock(); base-commit: d27a662290963a1cde26cdfdbac71a546c06e94a -- 2.29.0
Powered by blists - more mailing lists