selftests/xsk: add packet iterator for tx to packet stream
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 16 May 2023 10:31:04 +0000 (12:31 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 May 2023 05:31:51 +0000 (22:31 -0700)
commit69fc03d220a318a4df2c6f0612b17225e71a6069
tree6cdc4875216e85bcbc2ee94304b929573ea8b0b2
parent7a8a6762822a1f5249eec356e7ea31f98161fba0
selftests/xsk: add packet iterator for tx to packet stream

Convert the current variable rx_pkt_nb to an iterator that can be used
for both Rx and Tx. This to simplify the code and making Tx more like
Rx that already has this feature.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230516103109.3066-6-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h