* Copyright (c) 1991 The Regents of the University of California.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* from: @(#)tp_stat.h 7.5 (Berkeley) 6/27/91
* $Id: tp_stat.h,v 1.3 1993/11/07 17:49:59 wollman Exp $
/***********************************************************
Copyright IBM Corporation 1987
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of IBM not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
******************************************************************/
* ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
* Here are the data structures in which the global
* statistics(counters) are gathered.
u_long ts_xpd_intheway
;/* xpd mark caused data flow to stop */
u_long ts_xpdmark_del
; /* xpd markers thrown away */
u_long ts_dt_ooo
; /* dt tpdus received out of order */
u_long ts_dt_niw
; /* dt tpdus received & not in window */
u_long ts_xpd_niw
; /* xpd tpdus received & not in window */
u_long ts_dt_dup
; /* dt tpdus received & are duplicates */
u_long ts_zfcdt
; /* # times f credit went down to 0 */
u_long ts_lcdt_reduced
; /*
# times local cdt reduced on an acknowledgement.
u_long ts_pkt_rcvd
; /* from ip */
u_long ts_tpdu_rcvd
; /* accepted as a TPDU in tp_input */
u_long ts_zdebug
; /* zero dref to test timeout on conn estab tp_input.c */
u_long ts_ydebug
; /* throw away pseudo-random pkts tp_input.c */
u_long ts_unused
; /* kludged concat to test separation tp_emit.c */
u_long ts_vdebug
; /* kludge to test input size checking tp_emit.c */
u_long ts_ldebug
; /* faked a renegging of credit */
u_long ts_mb_len_distr
[17];
#define NRTT_CATEGORIES 4
* 0 --> tp_flags: ~TPF_PEER_ON_SAMENET | TPF_NL_PDN
* 1 --> tp_flags: ~TPF_PEER_ON_SAMENET | ~TPF_NL_PDN
* 2 --> tp_flags: TPF_PEER_ON_SAMENET | ~TPF_NL_PDN
* 3 --> tp_flags: TPF_PEER_ON_SAMENET | TPF_NL_PDN
struct timeval ts_rtt
[NRTT_CATEGORIES
];
struct timeval ts_rtv
[NRTT_CATEGORIES
];
u_long ts_ackreason
[_ACK_NUM_REASONS_
];
/* ACK_DONT 0 / ACK_STRAT_EACH 0x1 / ACK_STRAT_FULLWIN 0x4
* ACK_DUP 0x8 / ACK_EOT 0x10 / ACK_REORDER 0x20
#define TP_PM_MAX 0xa /* 10 decimal */
#define IncStat(x) tp_stat./**/x/**/++
#define PStat(Tpcb, X) (Tpcb)->tp_p_meas->/**/X/**/
#define IncPStat(Tpcb, X) if((Tpcb)->tp_perf_on) (Tpcb)->tp_p_meas->/**/X/**/++
/* BEWARE OF MACROS like this ^^^ must be sure it's surrounded by {} if
* it's used in an if-else statement.
/* for perf measurement stuff: maximum window size it can handle */
/* the first few are distributions as a fn of window size
* only keep enough space for normal format plus 1 slot for
* extended format, in case any windows larger than 15 are used
* tps_npdusent: for each call to tp_sbsend, we inc the
* element representing the number of pdus sent in this call
int tps_win_lim_by_cdt
[TP_PM_MAX
+1];
int tps_win_lim_by_data
[TP_PM_MAX
+1];
* tps_sendtime: Each call to tp_sbsend() is timed. For
* Each window size, we keep the running average of the time
* taken by tp_sbsend() for each window size.
struct timeval tps_sendtime
[TP_PM_MAX
+1];
* n_TMsendack: # times ack sent because timer went off
* n_ack_cuz_eot: # times ack sent due to EOTSDU on incoming packet
* n_ack_cuz_dup: # times ack sent for receiving a duplicate pkt.
* n_ack_cuz_fullwin: # times ack sent for receiving the full window.
* n_ack_cuz_doack: # times ack sent for having just reordered data.
int tps_n_ack_cuz_fullwin
;
int tps_n_ack_cuz_reorder
;
* when we send an ack: how much less than the "expected" window
* did we actually ack. For example: if we last sent a credit
* of 10, and we're acking now for whatever reason, and have
* only received 6 since our last credit advertisement, we'll
* keep the difference, 4, in this variable.
int tps_ack_early
[TP_PM_MAX
+1];
* when we ack, for the # pkts we actually acked w/ this ack,
* how much cdt are we advertising?
* [ size of window acknowledged ] [ cdt we're giving ]
int tps_cdt_acked
[TP_PM_MAX
+1][TP_PM_MAX
+1];
#define IFPERF(tpcb) if (tpcb->tp_perf_on && tpcb->tp_p_meas) {
#else /* not TP_PERF_MEAS */
#define PStat(tpcb, x) PStat_Junk
#define IncPStat(tpcb, x) /* no-op */
#define tpmeas(a,b,c,d,e,f)
#define IFPERF(x) if (0) {
#endif /* TP_PERF_MEAS */