Skip to content
Commit 03895e63 authored by Kevin Laatz's avatar Kevin Laatz Committed by Daniel Borkmann
Browse files

samples/bpf: add buffer recycling for unaligned chunks to xdpsock



This patch adds buffer recycling support for unaligned buffers. Since we
don't mask the addr to 2k at umem_reg in unaligned mode, we need to make
sure we give back the correct (original) addr to the fill queue. We achieve
this using the new descriptor format and associated masks. The new format
uses the upper 16-bits for the offset and the lower 48-bits for the addr.
Since we have a field for the offset, we no longer need to modify the
actual address. As such, all we have to do to get back the original address
is mask for the lower 48 bits (i.e. strip the offset and we get the address
on it's own).

Signed-off-by: default avatarKevin Laatz <kevin.laatz@intel.com>
Signed-off-by: default avatarBruce Richardson <bruce.richardson@intel.com>
Acked-by: default avatarJonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent c543f546
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment