Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Mar 2003 14:36:34 -0800
From:      Rick Jones <rick_jones2@hp.com>
To:        ia64@FreeBSD.ORG
Subject:   Re: initial netperf tests on rx2600
Message-ID:  <3E652A72.98A4B99B@hp.com>
References:  <3E6401FD.E2B384E3@hp.com> <20030304201227.GA523@athlon.pn.xcllnt.net> <3E65180A.8B39FA19@hp.com> <15973.7537.476710.330402@grasshopper.cs.duke.edu> <3E65224B.1DE56ADF@hp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Rick Jones wrote:
> (btw, what predefine by the comiler should I be useing for FreeBSD?
> while I am at it I _may_ try to add BSD sendfile support for the
> TCP_SENDFILE test)

I came across (after guesses :) __FreeBSD__ and now have sendfile()
support that appears to work.

# ./netperf -c 617730 -t TCP_STREAM -H 192.168.1.67 -l 20 -- -s 128K -S
128K -m 32K
TCP STREAM TEST to 192.168.1.67
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send   
Recv
Size   Size    Size     Time     Throughput  local    remote   local  
remote
bytes  bytes   bytes    secs.    10^6bits/s  % L      % U      us/KB  
us/KB

131072 131072  32768    20.02       931.09   88.94    -1.00    7.825  
-1.000

and then sendfile:

# ./netperf -F ./netperf -c 617730 -t TCP_SENDFILE -H 192.168.1.67 -l 20
-- -s 128K -S 128K -m 32K
TCP SENDFILE TEST to 192.168.1.67
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send   
Recv
Size   Size    Size     Time     Throughput  local    remote   local  
remote
bytes  bytes   bytes    secs.    10^6bits/s  % L      % U      us/KB  
us/KB

131072 131072  32768    20.02       948.42   53.19    -1.00    4.594  
-1.000

this will be part of 2.2pl4.  for those anxious to have it now, here are
the diffs:

$ diff -c netperf-2.2pl3/nettest_bsd.c nettest_bsd.c
*** netperf-2.2pl3/nettest_bsd.c        Fri Feb 14 15:32:44 2003
--- nettest_bsd.c       Tue Mar  4 14:34:18 2003
***************
*** 3,9 ****
  #endif /* NEED_MAKEFILE_EDIT */
  #ifndef lint
  char  nettest_id[]="\
! @(#)nettest_bsd.c (c) Copyright 1993-2003 Hewlett-Packard Co. Version
2.2pl3";
  #else
  #define DIRTY
  #define HISTOGRAM
--- 3,9 ----
  #endif /* NEED_MAKEFILE_EDIT */
  #ifndef lint
  char  nettest_id[]="\
! @(#)nettest_bsd.c (c) Copyright 1993-2003 Hewlett-Packard Co. Version
2.2pl3+";
  #else
  #define DIRTY
  #define HISTOGRAM
***************
*** 145,152 ****
      -m bytes          Set the send size (TCP_STREAM, UDP_STREAM)\n\
      -M bytes          Set the recv size (TCP_STREAM, UDP_STREAM)\n\
      -p min[,max]      Set the min/max port numbers for TCP_CRR,
TCP_TRR\n\
!     -r bytes          Set request size (TCP_RR, UDP_RR)\n\
!     -R bytes          Set response size (TCP_RR, UDP_RR)\n\
      -s send[,recv]    Set local socket send/recv buffer sizes\n\
      -S send[,recv]    Set remote socket send/recv buffer sizes\n\
  \n\
--- 145,151 ----
      -m bytes          Set the send size (TCP_STREAM, UDP_STREAM)\n\
      -M bytes          Set the recv size (TCP_STREAM, UDP_STREAM)\n\
      -p min[,max]      Set the min/max port numbers for TCP_CRR,
TCP_TRR\n\
!     -r req,[rsp]      Set request/response sizes (TCP_RR, UDP_RR)\n\
      -s send[,recv]    Set local socket send/recv buffer sizes\n\
      -S send[,recv]    Set remote socket send/recv buffer sizes\n\
  \n\
***************
*** 2579,2585 ****
                          send_ring->fildes, 
                          &scratch_offset,   /* modified after the call!
*/
                          send_ring->length)) != send_size) {
! #else /* original sendile HP-UX and then BSD */
        if ((len=sendfile(send_socket, 
                        send_ring->fildes, 
                        send_ring->offset,
--- 2578,2594 ----
                          send_ring->fildes, 
                          &scratch_offset,   /* modified after the call!
*/
                          send_ring->length)) != send_size) {
! #elif defined(__FreeBSD__)
!       /* so close to HP-UX and yet so far away... :) */
!       if ((sendfile(send_ring->fildes, 
!                   send_socket, 
!                   send_ring->offset,
!                   send_ring->length,
!                   NULL,
!                   (off_t *)&len,
!                   send_ring->flags) != 0) ||
!         (len != send_size)) {
! #else /* original sendile HP-UX */
        if ((len=sendfile(send_socket, 
                        send_ring->fildes, 
                        send_ring->offset,
$ 
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E652A72.98A4B99B>