aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests
diff options
context:
space:
mode:
authorAlexander Lobakin <[email protected]>2022-03-21 11:59:52 +0100
committerTony Nguyen <[email protected]>2022-04-07 08:20:10 -0700
commit1b699f81dba78c724f6f94b02f01e216b64bf88b (patch)
tree341b963df41a2c6e8052acb0b7f7d98a12d69359 /tools/testing/selftests/bpf/prog_tests
parent27ffa273a0405b546b4562b1c65e616d41a1f30e (diff)
ice: switch: use a struct to pass packet template params
ice_find_dummy_packet() contains a lot of boilerplate code and a nice room for copy-paste mistakes. Instead of passing 3 separate pointers back and forth to get packet template (dummy) params, directly return a structure containing them. Then, use a macro to compose compound literals and avoid code duplication on return path. Now, dummy packet type/name is needed only once to return a full correct triple pkt-pkt_len-offsets, and those are all one-liners. dummy_ipv4_gtpu_ipv4_packet_offsets is just moved around and renamed (as well as dummy_ipv6_gtp_packet_offsets) with no function changes. Signed-off-by: Alexander Lobakin <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Tested-by: Marcin Szycik <[email protected]> Tested-by: Sandeep Penigalapati <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions