While calling perror() on send() failure was useful for debugging the
if_em "wedging" problem, large numbers of perror() calls impacts send performance. As such, just count the error, don't print it.
This commit is contained in:
parent
af519fd928
commit
724b02db8c
@ -2,6 +2,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
CFLAGS+= -Wall
|
||||
PROG= netsend
|
||||
NOMAN= yes
|
||||
|
||||
|
@ -170,10 +170,8 @@ timing_loop(int s, struct timespec interval, long duration, u_char *packet,
|
||||
*((u_int32_t *)packet) = htonl(counter);
|
||||
counter++;
|
||||
}
|
||||
if (send(s, packet, packet_len, 0) < 0) {
|
||||
perror("send");
|
||||
if (send(s, packet, packet_len, 0) < 0)
|
||||
send_errors++;
|
||||
}
|
||||
send_calls++;
|
||||
if (duration != 0 && tmptime.tv_sec >= finishtime)
|
||||
goto done;
|
||||
|
Loading…
x
Reference in New Issue
Block a user