diff options
| author | Amery Hung <ameryhung@gmail.com> | 2025-09-22 16:33:50 -0700 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-09-23 13:35:12 -0700 |
| commit | dea1526fbafb55099a788cde0b659530ee5b1c66 (patch) | |
| tree | a72ea9808528d036ee8fde223e14c184289b4004 /scripts/patch-kernel | |
| parent | 8f12d1137c2382c80aada8e05d7cc650cd4e403c (diff) | |
bpf: Allow bpf_xdp_shrink_data to shrink a frag from head and tail
Move skb_frag_t adjustment into bpf_xdp_shrink_data() and extend its
functionality to be able to shrink an xdp fragment from both head and
tail. In a later patch, bpf_xdp_pull_data() will reuse it to shrink an
xdp fragment from head.
Additionally, in bpf_xdp_frags_shrink_tail(), breaking the loop when
bpf_xdp_shrink_data() returns false (i.e., not releasing the current
fragment) is not necessary as the loop condition, offset > 0, has the
same effect. Remove the else branch to simplify the code.
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://patch.msgid.link/20250922233356.3356453-3-ameryhung@gmail.com
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
