Skip to content

Copy packet size from __sk_buff.len#310

Merged
qdeslandes merged 1 commit into
facebook:mainfrom
qdeslandes:fix_update_chain_pin
Aug 8, 2025
Merged

Copy packet size from __sk_buff.len#310
qdeslandes merged 1 commit into
facebook:mainfrom
qdeslandes:fix_update_chain_pin

Conversation

@qdeslandes

Copy link
Copy Markdown
Contributor

Instead of calculating the packet size by substracting data from data_end, use __sk_buff.len. This reduces the number of instructions for TC and CGROUP_SKB programs by 2.

Additionally, it prevents erroneous size calculation if data_end is unset (can occur with BPF_PROG_RUN).

Instead of calculating the packet size by substracting data from
data_end, use __sk_buff.len. This reduce the number of instructions for
TC and CGROUP_SKB programs by 2.

Additionally, it prevents erroneous size calculation if data_end is
unset (can occurs with BPF_PROG_RUN).
@meta-cla meta-cla Bot added the cla signed label Aug 8, 2025
@qdeslandes qdeslandes merged commit 89b04f7 into facebook:main Aug 8, 2025
27 checks passed
@qdeslandes qdeslandes deleted the fix_update_chain_pin branch August 8, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant