]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Reorder bpf_prog_test_run_skb initialization
authorPaul Chaignon <paul.chaignon@gmail.com>
Thu, 9 Oct 2025 20:11:22 +0000 (22:11 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 10 Oct 2025 17:43:03 +0000 (10:43 -0700)
commit57bb2f6717930a5e670da179c316159719b724a2
tree3662e031f9eac738d3b760a0c24898d60c69b468
parentd8accf661fcf3088ef4c349ab56ecd19a5071b19
bpf: Reorder bpf_prog_test_run_skb initialization

This patch reorders the initialization of bpf_prog_test_run_skb to
simplify the subsequent patch. Program types are checked first, followed
by the ctx init, and finally the data init. With the subsequent patch,
program types and the ctx init provide information that is used in the
data init. Thus, we need the data init to happen last.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/063475176f15828a882c07846017394baf72f682.1760037899.git.paul.chaignon@gmail.com
net/bpf/test_run.c