diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index b45a09555b4e..1aae6977066c 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.68 2001/07/26 21:47:04 thorpej Exp $ */ +/* $NetBSD: tcp_output.c,v 1.69 2001/07/31 00:57:45 thorpej Exp $ */ /* %%% portions-copyright-nrl-95 @@ -169,7 +169,11 @@ extern struct mbuf *m_copypack(); int tcp_cwm = 0; int tcp_cwm_burstsize = 4; -static __inline void +static +#ifndef GPROF +__inline +#endif +void tcp_segsize(struct tcpcb *tp, int *txsegsizep, int *rxsegsizep) { #ifdef INET @@ -1064,6 +1068,7 @@ send: if (error) { out: if (error == ENOBUFS) { + tcpstat.tcps_selfquench++; #ifdef INET if (tp->t_inpcb) tcp_quench(tp->t_inpcb, 0); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 96710ee037d9..464bc3ceb271 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_var.h,v 1.81 2001/05/30 12:04:54 mrg Exp $ */ +/* $NetBSD: tcp_var.h,v 1.82 2001/07/31 00:57:45 thorpej Exp $ */ /* %%% portions-copyright-nrl-98 @@ -518,6 +518,8 @@ struct tcpstat { u_quad_t tcps_sc_dropped; /* # of SYNs dropped (no route/mem) */ u_quad_t tcps_sc_collisions; /* # of hash collisions */ u_quad_t tcps_sc_retransmitted; /* # of retransmissions */ + + u_quad_t tcps_selfquench; /* # of ENOBUFS we get on output */ }; /*