diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2022-07-07 15:08:42 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-07-14 22:45:34 +0200 |
commit | ca2e1a627035002cd33d9667431e80bad90c25fa (patch) | |
tree | 22171aeca209537d0d58c7d85789e713e2565eef /arch/sparc/net | |
parent | 33f32e5072b6cc84d1b130a3ad485849bcec907a (diff) | |
download | linux-ca2e1a627035002cd33d9667431e80bad90c25fa.tar.bz2 |
xsk: Mark napi_id on sendmsg()
When application runs in busy poll mode and does not receive a single
packet but only sends them, it is currently impossible to get into
napi_busy_loop() as napi_id is only marked on Rx side in xsk_rcv_check().
In there, napi_id is being taken from xdp_rxq_info carried by xdp_buff.
From Tx perspective, we do not have access to it. What we have handy is
the xsk pool.
Xsk pool works on a pool of internal xdp_buff wrappers called xdp_buff_xsk.
AF_XDP ZC enabled drivers call xp_set_rxq_info() so each of xdp_buff_xsk
has a valid pointer to xdp_rxq_info of underlying queue. Therefore, on Tx
side, napi_id can be pulled from xs->pool->heads[0].xdp.rxq->napi_id. Hide
this pointer chase under helper function, xsk_pool_get_napi_id().
Do this only for sockets working in ZC mode as otherwise rxq pointers would
not be initialized.
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20220707130842.49408-1-maciej.fijalkowski@intel.com
Diffstat (limited to 'arch/sparc/net')
0 files changed, 0 insertions, 0 deletions