Count the number of times we "self-quench" (ip_output() returns

ENOBUFS), and don't inline tcp_segsize() if profiling.
This commit is contained in:
thorpej 2001-07-31 00:57:45 +00:00
parent 5226d11119
commit 938720eea4
2 changed files with 10 additions and 3 deletions

View File

@ -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);

View File

@ -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 */
};
/*