Home | History | Annotate | Download | only in netperf
      1 /*
      2         Copyright (C) 1993-2004 Hewlett-Packard Company
      3 */
      4 
      5  /* This file contains the test-specific definitions for netperf's */
      6  /* DLPI tests */
      7 
      8 struct	stream_stream_request_struct {
      9   int	recv_buf_size;
     10   int	send_buf_size;
     11   int	receive_size;   /* how many bytes do we want to */
     12                         /* receive at one time? */
     13   int	recv_alignment; /* what is the alignment of the */
     14                         /* receive buffer? */
     15   int	recv_offset;    /* and at what offset from that */
     16                         /* alignment? */
     17   int	so_rcvavoid;    /* do we want the remote to avoid receive copies? */
     18   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
     19   int	measure_cpu;	/* does the client want server cpu */
     20                         /* utilization measured? */
     21   float	cpu_rate;	/* do we know how fast the cpu is */
     22                         /* already? */
     23   int	test_length;	/* how long is the test?		*/
     24   int   dirty_count;    /* how many integers in the receive buffer */
     25 			/* should be made dirty before calling recv? */
     26   int   clean_count;    /* how many integers should be read from the */
     27 			/* recv buffer before calling recv? */
     28   int   path_name_len;   /* the length of the device name string. this */
     29 			/* is used to put it into the proper order on */
     30 			/* @#$% byte-swapped boxes... */
     31   char  unix_path[32]; /* the path */
     32 };
     33 
     34 struct	stream_stream_response_struct {
     35   int	recv_buf_size;	/* how big does the client want it	*/
     36   int	send_buf_size;
     37   int	receive_size;
     38   int	so_rcvavoid;    /* do we want the remote to avoid receive copies? */
     39   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
     40   int	measure_cpu;	/* does the client want server cpu	*/
     41   int	test_length;	/* how long is the test?		*/
     42   int	data_port_number;	/* connect to me here	*/
     43   float	cpu_rate;		/* could we measure	*/
     44   int   path_name_len;   /* the length of the device name string. this */
     45 			/* is used to put it into the proper order on */
     46 			/* @#$% byte-swapped boxes... */
     47   char  unix_path[32]; /* the path */
     48 };
     49 
     50 struct stream_stream_results_struct {
     51   int	bytes_received;	/* ignored initially */
     52   int	recv_calls;	/* ignored initially */
     53   float	elapsed_time;	/* how long the test ran */
     54   float	cpu_util;	/* -1 if not measured */
     55   float	serv_dem;	/* -1 if not measured */
     56   int   num_cpus;
     57 };
     58 
     59 struct	stream_rr_request_struct {
     60   int	recv_buf_size;	/* how big does the client want it	*/
     61   int	send_buf_size;
     62   int	recv_alignment;
     63   int	recv_offset;
     64   int	send_alignment;
     65   int	send_offset;
     66   int	request_size;
     67   int	response_size;
     68   int	so_rcvavoid;    /* do we want the remote to avoid receive copies? */
     69   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
     70   int	measure_cpu;	/* does the client want server cpu	*/
     71   float	cpu_rate;	/* do we know how fast the cpu is?	*/
     72   int	test_length;	/* how long is the test?		*/
     73   int   path_name_len;   /* the length of the device name string. this */
     74 			/* is used to put it into the proper order on */
     75 			/* @#$% byte-swapped boxes... */
     76   char  unix_path[32]; /* the path */
     77 };
     78 
     79 struct	stream_rr_response_struct {
     80   int	recv_buf_size;	/* how big does the client want it	*/
     81   int	send_buf_size;
     82   int	so_rcvavoid;    /* do we want the remote to avoid receive copies? */
     83   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
     84   int	measure_cpu;	/* does the client want server cpu	*/
     85   int	test_length;	/* how long is the test?		*/
     86   float	cpu_rate;		/* could we measure	*/
     87   int   path_name_len;   /* the length of the device name string. this */
     88 			/* is used to put it into the proper order on */
     89 			/* @#$% byte-swapped boxes... */
     90   char  unix_path[32]; /* the path to the dlpi device */
     91 };
     92 
     93 struct stream_rr_results_struct {
     94   int	bytes_received;	/* ignored initially */
     95   int	recv_calls;	/* ignored initially */
     96   int	trans_received;	/* not ignored  */
     97   float	elapsed_time;	/* how long the test ran */
     98   float	cpu_util;	/* -1 if not measured */
     99   float	serv_dem;	/* -1 if not measured */
    100   int   num_cpus;
    101 };
    102 
    103 struct	dg_stream_request_struct {
    104   int	recv_buf_size;
    105   int	message_size;
    106   int	recv_alignment;
    107   int	recv_offset;
    108   int	measure_cpu;
    109   float	cpu_rate;
    110   int	test_length;
    111   int	so_rcvavoid;    /* do we want the remote to avoid receive copies? */
    112   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
    113   int   path_name_len;   /* the length of the device name string. this */
    114 			/* is used to put it into the proper order on */
    115 			/* @#$% byte-swapped boxes... */
    116   char  unix_path[32]; /* the path */
    117 };
    118 
    119 struct	dg_stream_response_struct {
    120   int	recv_buf_size;
    121   int	send_buf_size;
    122   int	measure_cpu;
    123   int	test_length;
    124   float	cpu_rate;
    125   int	so_rcvavoid;	/* could the remote avoid receive copies? */
    126   int	so_sndavoid;	/* could the remote avoid send copies? */
    127   int   path_name_len;   /* the length of the device name string. this */
    128 			/* is used to put it into the proper order on */
    129 			/* @#$% byte-swapped boxes... */
    130   char  unix_path[32]; /* the path */
    131 };
    132 
    133 struct	dg_stream_results_struct {
    134   int	messages_recvd;
    135   int	bytes_received;
    136   float	elapsed_time;
    137   float	cpu_util;
    138   int   num_cpus;
    139 };
    140 
    141 
    142 struct	dg_rr_request_struct {
    143   int	recv_buf_size;	/* how big does the client want it	*/
    144   int	send_buf_size;
    145   int	recv_alignment;
    146   int	recv_offset;
    147   int	send_alignment;
    148   int	send_offset;
    149   int	request_size;
    150   int	response_size;
    151   int	measure_cpu;	/* does the client want server cpu	*/
    152   float	cpu_rate;	/* do we know how fast the cpu is?	*/
    153   int	test_length;	/* how long is the test?		*/
    154   int	so_rcvavoid;    /* do we want the remote to avoid receive */
    155 			/* copies? */
    156   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
    157   int   path_name_len;   /* the length of the device name string. this */
    158 			/* is used to put it into the proper order on */
    159 			/* @#$% byte-swapped boxes... */
    160   char  unix_path[32]; /* the path */
    161 };
    162 
    163 struct	dg_rr_response_struct {
    164   int	recv_buf_size;	/* how big does the client want it	*/
    165   int	send_buf_size;
    166   int	no_delay;
    167   int	measure_cpu;	/* does the client want server cpu	*/
    168   int	test_length;	/* how long is the test?		*/
    169   float	cpu_rate;		/* could we measure	*/
    170   int	so_rcvavoid;	/* could the remote avoid receive copies? */
    171   int	so_sndavoid;	/* could the remote avoid send copies? */
    172   int   path_name_len;   /* the length of the device name string. this */
    173 			/* is used to put it into the proper order on */
    174 			/* @#$% byte-swapped boxes... */
    175   char  unix_path[32]; /* the path */
    176 };
    177 
    178 struct dg_rr_results_struct {
    179   int	bytes_received;	/* ignored initially */
    180   int	recv_calls;	/* ignored initially */
    181   int	trans_received;	/* not ignored  */
    182   float	elapsed_time;	/* how long the test ran */
    183   float	cpu_util;	/* -1 if not measured */
    184   float	serv_dem;	/* -1 if not measured */
    185   int   num_cpus;
    186 };
    187 
    188 extern void scan_unix_args(int argc, char *argv[]);
    189 
    190 extern void send_stream_stream(char remote_host[]);
    191 extern void send_stream_rr(char remote_host[]);
    192 extern void send_dg_stream(char remote_host[]);
    193 extern void send_dg_rr(char remote_host[]);
    194 
    195 extern void recv_stream_stream();
    196 extern void recv_stream_rr();
    197 extern void recv_dg_stream();
    198 extern void recv_dg_rr();
    199