mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
Commit f620af11c2 ("xsk: avoid double checking against rx queue being
full") addressed a case in copy mode, when working with multi-buffer
xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
there is a space to produce descriptors.
Adjust ZC path to follow the same principle.
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://lore.kernel.org/r/20260316140557.461288-1-maciej.fijalkowski@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
2364959abe
commit
77378dabb5
|
|
@ -196,13 +196,13 @@ static int xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len)
|
|||
goto err;
|
||||
}
|
||||
|
||||
__xsk_rcv_zc(xs, xskb, len, contd);
|
||||
__xsk_rcv_zc_safe(xs, xskb, len, contd);
|
||||
xskb_list = &xskb->pool->xskb_list;
|
||||
list_for_each_entry_safe(pos, tmp, xskb_list, list_node) {
|
||||
if (list_is_singular(xskb_list))
|
||||
contd = 0;
|
||||
len = pos->xdp.data_end - pos->xdp.data;
|
||||
__xsk_rcv_zc(xs, pos, len, contd);
|
||||
__xsk_rcv_zc_safe(xs, pos, len, contd);
|
||||
list_del_init(&pos->list_node);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user