Re: [PATCH net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-01-28 Thread Sowmini Varadhan
On (01/28/18 19:39), Willem de Bruijn wrote: > > But the whole test program is rather simplistic, since it doesnt > > actually verify the value of the cookies (hopefully me pending : > It might be nice to at least increment the variable on each > successful send. The test is single threaded any

Re: [PATCH net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-01-28 Thread Willem de Bruijn
On Sun, Jan 28, 2018 at 5:18 PM, Sowmini Varadhan wrote: > > Re-ordering review comments for selftests a bit.. > >> > + cm->cmsg_level = SOL_RDS; >> > + cm->cmsg_type = RDS_CMSG_ZCOPY_COOKIE; >> > + ++cookie; >> > + memcpy(CMSG_DATA(cm), &cookie, sizeof(cookie)); >> cookie

Re: [PATCH net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-01-28 Thread Sowmini Varadhan
Re-ordering review comments for selftests a bit.. > > + cm->cmsg_level = SOL_RDS; > > + cm->cmsg_type = RDS_CMSG_ZCOPY_COOKIE; > > + ++cookie; > > + memcpy(CMSG_DATA(cm), &cookie, sizeof(cookie)); > cookie is not initialized it's a static uint32_t in the function. It will

Re: [PATCH net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-01-28 Thread Willem de Bruijn
On Wed, Jan 24, 2018 at 12:46 PM, Sowmini Varadhan wrote: > Send a cookie with sendmsg() on PF_RDS sockets, and process the > returned batched cookies in do_recv_completion() > > Signed-off-by: Sowmini Varadhan > --- > tools/testing/selftests/net/msg_zerocopy.c | 119 ---

[PATCH net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-01-24 Thread Sowmini Varadhan
Send a cookie with sendmsg() on PF_RDS sockets, and process the returned batched cookies in do_recv_completion() Signed-off-by: Sowmini Varadhan --- tools/testing/selftests/net/msg_zerocopy.c | 119 --- 1 files changed, 88 insertions(+), 31 deletions(-) diff --git a/too