Re: [patch] Set TCP send buffer size only when tcpbench client works in TCP mode

2018-05-10 Thread Alexander Bluhm
On Thu, May 10, 2018 at 09:13:14PM +0800, Nan Xiao wrote: > int Sflag;/* Socket buffer size (tcp mode) */ > So I think maybe this should work on TCP only. BTW, if it works on both > TCP/UDP, I think differentiate error message will be better: I have changed all comments and

Re: [patch] Set TCP send buffer size only when tcpbench client works in TCP mode

2018-05-10 Thread Nan Xiao
Very sorry for forgetting to cc reply into tech@. Forwarded Message Subject: Re: [patch] Set TCP send buffer size only when tcpbench client works in TCP mode Date: Thu, 10 May 2018 17:56:25 +0800 From: Nan Xiao <n...@chinadtrace.org> To: Alexander Bluhm <alexander.bl..

Re: [patch] Set TCP send buffer size only when tcpbench client works in TCP mode

2018-05-10 Thread Alexander Bluhm
On Thu, May 10, 2018 at 03:10:53PM +0800, Nan Xiao wrote: > Per my understanding, the tcpbench.Sflag (Socket buffer size) should > only take effect when working in TCP mode. Why? The kernel provides socket buffers for all protocols. Userland can set them and the kernel does the appropriate

[patch] Set TCP send buffer size only when tcpbench client works in TCP mode

2018-05-10 Thread Nan Xiao
Hi tech@, Per my understanding, the tcpbench.Sflag (Socket buffer size) should only take effect when working in TCP mode. But according to my testing, it also works when tcpbench client is in UDP mode: (1) Set buffer size less than DEFAULT_UDP_PKT (1500 - 28): # tcpbench -u -S 1471 127.0.0.1