Skip to content

Commit bbd9644

Browse files
wdebruijdavem330
authored andcommitted
selftests: correct define in msg_zerocopy.c
The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that. Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions. Reported-by: Dan Melnic <dmm@fb.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cc8889a commit bbd9644

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/net/msg_zerocopy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#endif
6060

6161
#ifndef SO_ZEROCOPY
62-
#define SO_ZEROCOPY 59
62+
#define SO_ZEROCOPY 60
6363
#endif
6464

6565
#ifndef SO_EE_CODE_ZEROCOPY_COPIED
@@ -382,8 +382,8 @@ static void do_recv_remaining_completions(int fd)
382382
}
383383

384384
if (completions < expected_completions)
385-
error(1, 0, "missing notifications: %lu < %lu\n",
386-
completions, expected_completions);
385+
fprintf(stderr, "missing notifications: %lu < %lu\n",
386+
completions, expected_completions);
387387
}
388388

389389
static void do_tx(int domain, int type, int protocol)

0 commit comments

Comments
 (0)