netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: correct define in msg_zerocopy.c
@ 2017-09-01 16:31 Willem de Bruijn
  2017-09-01 16:33 ` Alexei Starovoitov
  2017-09-01 17:41 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Willem de Bruijn @ 2017-09-01 16:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, ast, dmm, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

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>
---
 tools/testing/selftests/net/msg_zerocopy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
index 448c69a8af74..40232af5b023 100644
--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -59,7 +59,7 @@
 #endif
 
 #ifndef SO_ZEROCOPY
-#define SO_ZEROCOPY	59
+#define SO_ZEROCOPY	60
 #endif
 
 #ifndef SO_EE_CODE_ZEROCOPY_COPIED
@@ -382,8 +382,8 @@ static void do_recv_remaining_completions(int fd)
 	}
 
 	if (completions < expected_completions)
-		error(1, 0, "missing notifications: %lu < %lu\n",
-		      completions, expected_completions);
+		fprintf(stderr, "missing notifications: %lu < %lu\n",
+			completions, expected_completions);
 }
 
 static void do_tx(int domain, int type, int protocol)
-- 
2.14.1.581.gf28d330327-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: correct define in msg_zerocopy.c
  2017-09-01 16:31 [PATCH net-next] selftests: correct define in msg_zerocopy.c Willem de Bruijn
@ 2017-09-01 16:33 ` Alexei Starovoitov
  2017-09-01 17:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2017-09-01 16:33 UTC (permalink / raw)
  To: Willem de Bruijn, netdev; +Cc: davem, dmm, Willem de Bruijn

On 9/1/17 9:31 AM, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> 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>

Thanks for quick fixes!
Acked-by: Alexei Starovoitov <ast@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] selftests: correct define in msg_zerocopy.c
  2017-09-01 16:31 [PATCH net-next] selftests: correct define in msg_zerocopy.c Willem de Bruijn
  2017-09-01 16:33 ` Alexei Starovoitov
@ 2017-09-01 17:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-09-01 17:41 UTC (permalink / raw)
  To: willemdebruijn.kernel; +Cc: netdev, ast, dmm, willemb

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Fri,  1 Sep 2017 12:31:51 -0400

> From: Willem de Bruijn <willemb@google.com>
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-01 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-01 16:31 [PATCH net-next] selftests: correct define in msg_zerocopy.c Willem de Bruijn
2017-09-01 16:33 ` Alexei Starovoitov
2017-09-01 17:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).