Sockperf for FreeBSD not working while running as server
Date: Thu, 25 Sep 2025 06:58:01 UTC
Hi, I want to use sockperf (https://github.com/Mellanox/sockperf.git) to test latency for a network interface. I can build it after some changes in C++ source to suit it for the latest C++ compiler on FreeBSD 15. Running Sockperf client on FreeBSD (with command like ' sockperf ping-pong -i x.x.x.x -p 8201 -t 20 --tcp --pps=max --full-rtt) was successful. It can send and receive packets to sockperf server running on Linux and print out the latency stats. However, running it as sockperf server ( with command 'sockperf server -i x.x.x.x --tcp -p 8201') failed with tons of following errors which receiving packets from the Linux client: ... [debug] raw: receive_pending_data IP: (unknown):(unk) [fd=4 ret=14] Bad file descriptor <src/input_handlers.h: receive_pending_data #91> size 74 sockperf: src/common.cpp:73:ERROR: getnameinfo returned 5: Address family not recognized, addr family: 88 (errno=9 Bad file descriptor) [debug] raw: receive_pending_data IP: (unknown):(unk) [fd=4 ret=-1] Bad file descriptor <src/input_handlers.h: receive_pending_data #91> size 74 sockperf: src/common.cpp:41:ERROR: recvfrom() Failed receiving on fd[4] (errno=9 Bad file descriptor) sockperf: src/common.cpp:112:ERROR: program exits because of an error. (errno=9 Bad file descriptor) It seems recefrom() call did receive the packets but failed to process it and reply to the client. Has anyone successfully run Sockperf or, anyone knows the cause of this problem? Thanks, Wei