Skip to contentSkip to conversation

test: add sendmsg zerocopy tests

RFC PATCH New Willem de Bruijn 1 participant 1 message Aug 20, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 10/10 test: add sendmsg zerocopy tests

From: Willem de Bruijn <[email protected]>

Introduce the tests uses to verify MSG_ZEROCOPY behavior:

snd_zerocopy:
send zerocopy fragments out over the default route.

snd_zerocopy_lo:
send data between a pair of local sockets and report throughput.

These tests are not suitable for inclusion in /tools/testing/selftest as is, as they do not return a pass/fail verdict. Including them in this RFC for demonstration, only.

---
 tools/testing/selftests/net/Makefile          |   2 +-
 tools/testing/selftests/net/snd_zerocopy.c    | 354 +++++++++++++++++
 tools/testing/selftests/net/snd_zerocopy_lo.c | 543 ++++++++++++++++++++++++++
 3 files changed, 898 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/net/snd_zerocopy.c
 create mode 100644 tools/testing/selftests/net/snd_zerocopy_lo.c
tools/testing/selftests/net/Makefile +1 -1
index fac4782..401a534 100644
@@ -4,7 +4,7 @@ CFLAGS = -Wall -O2 -g
 
 CFLAGS += -I../../../../usr/include/
 
-NET_PROGS = socket psock_fanout psock_tpacket
+NET_PROGS = socket psock_fanout psock_tpacket snd_zerocopy snd_zerocopy_lo
 
 all: $(NET_PROGS)
 %: %.c
tools/testing/selftests/net/snd_zerocopy.c new file +354 -0

354 lines not on this page · raw message

tools/testing/selftests/net/snd_zerocopy_lo.c new file +543 -0

543 lines not on this page · raw message

Signature · 1 line
2.5.0.276.gf5e568e