HewlettPackard / netperf

Netperf is a benchmark that can be used to measure the performance of many different types of networking. It provides tests for both unidirectional throughput, and end-to-end latency.
MIT License
859 stars 187 forks source link

src/nettest_bsd.c: Assign the return value of netperf_sendfile to len #43

Closed yangx-jy closed 4 years ago

yangx-jy commented 4 years ago

len is declared but not assigned in sendfile_tcp_stream() so that running netperf -t TCP_SENDFILE in loops may get random and unexpected len, for example: netperf: data send error: sendfile: No space left on device len was -1334480592 send_size was 10240

Add the missing assignment to fix the issue.

Signed-off-by: Xiao Yang ice_yangxiao@163.com