diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-09-30 06:17:26 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-09-30 06:17:26 +0000 |
commit | 724b02db8cba4729b0976ab24aa5243e38bb56bc (patch) | |
tree | 0e58f3195ef3cb185dbcba8a4a2e36967763e444 /tools | |
parent | af519fd928ba2cf920308f8e8c000beeeb35f6e9 (diff) | |
download | FreeBSD-src-724b02db8cba4729b0976ab24aa5243e38bb56bc.zip FreeBSD-src-724b02db8cba4729b0976ab24aa5243e38bb56bc.tar.gz |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/netrate/netsend/Makefile | 1 | ||||
-rw-r--r-- | tools/tools/netrate/netsend/netsend.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/tools/tools/netrate/netsend/Makefile b/tools/tools/netrate/netsend/Makefile index 230cef7..a26b629 100644 --- a/tools/tools/netrate/netsend/Makefile +++ b/tools/tools/netrate/netsend/Makefile @@ -2,6 +2,7 @@ # $FreeBSD$ # +CFLAGS+= -Wall PROG= netsend NOMAN= yes diff --git a/tools/tools/netrate/netsend/netsend.c b/tools/tools/netrate/netsend/netsend.c index 14a8e66..956cbdf 100644 --- a/tools/tools/netrate/netsend/netsend.c +++ b/tools/tools/netrate/netsend/netsend.c @@ -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; |