selftests: xsk: Rename worker_* functions that are not thread entry points

Rename worker_* functions that are not thread entry points to
something else. This was confusing. Now only thread entry points are
worker_something.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-9-magnus.karlsson@gmail.com
This commit is contained in:
Magnus Karlsson 2021-08-25 11:37:14 +02:00 committed by Alexei Starovoitov
parent d40ba9d33a
commit 9da2ea4fe8

View File

@ -589,7 +589,7 @@ static void tx_only_all(struct ifobject *ifobject)
complete_tx_only_all(ifobject); complete_tx_only_all(ifobject);
} }
static void worker_pkt_dump(void) static void pkt_dump(void)
{ {
struct ethhdr *ethhdr; struct ethhdr *ethhdr;
struct iphdr *iphdr; struct iphdr *iphdr;
@ -631,7 +631,7 @@ static void worker_pkt_dump(void)
} }
} }
static void worker_stats_validate(struct ifobject *ifobject) static void stats_validate(struct ifobject *ifobject)
{ {
struct xdp_statistics stats; struct xdp_statistics stats;
socklen_t optlen; socklen_t optlen;
@ -673,7 +673,7 @@ static void worker_stats_validate(struct ifobject *ifobject)
} }
} }
static void worker_pkt_validate(void) static void pkt_validate(void)
{ {
u32 payloadseqnum = -2; u32 payloadseqnum = -2;
struct iphdr *iphdr; struct iphdr *iphdr;
@ -833,9 +833,9 @@ static void *worker_testapp_validate_rx(void *arg)
while (1) { while (1) {
if (test_type != TEST_TYPE_STATS) { if (test_type != TEST_TYPE_STATS) {
rx_pkt(ifobject->xsk, fds); rx_pkt(ifobject->xsk, fds);
worker_pkt_validate(); pkt_validate();
} else { } else {
worker_stats_validate(ifobject); stats_validate(ifobject);
} }
if (sigvar) if (sigvar)
break; break;
@ -873,7 +873,7 @@ static void testapp_validate(void)
pthread_join(t0, NULL); pthread_join(t0, NULL);
if (debug_pkt_dump && test_type != TEST_TYPE_STATS) { if (debug_pkt_dump && test_type != TEST_TYPE_STATS) {
worker_pkt_dump(); pkt_dump();
for (int iter = 0; iter < num_frames; iter++) { for (int iter = 0; iter < num_frames; iter++) {
free(pkt_buf[iter]->payload); free(pkt_buf[iter]->payload);
free(pkt_buf[iter]); free(pkt_buf[iter]);