Use counter(9) for PLPMTUD counters.
Remove unused PLPMTUD sysctl counters. Bump UPDATING and FreeBSD Version to indicate a rebuild is required. Submitted by: kevin.bowling@kev009.com Reviewed by: jtl Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12003
This commit is contained in:
parent
d86cddf0f0
commit
32a04bb81d
5
UPDATING
5
UPDATING
@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
||||
|
||||
****************************** SPECIAL WARNING: ******************************
|
||||
|
||||
20170825:
|
||||
Move PMTUD blackhole counters to TCPSTATS and remove them from bare
|
||||
sysctl values. Minor nit, but requires a rebuild of both world/kernel
|
||||
to complete.
|
||||
|
||||
20170814:
|
||||
"make check" behavior (made in ^/head@r295380) has been changed to
|
||||
execute from a limited sandbox, as opposed to executing from
|
||||
|
@ -148,29 +148,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_detection,
|
||||
&VNET_NAME(tcp_pmtud_blackhole_detect), 0,
|
||||
"Path MTU Discovery Black Hole Detection Enabled");
|
||||
|
||||
static VNET_DEFINE(int, tcp_pmtud_blackhole_activated);
|
||||
#define V_tcp_pmtud_blackhole_activated \
|
||||
VNET(tcp_pmtud_blackhole_activated)
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_activated,
|
||||
CTLFLAG_RD|CTLFLAG_VNET,
|
||||
&VNET_NAME(tcp_pmtud_blackhole_activated), 0,
|
||||
"Path MTU Discovery Black Hole Detection, Activation Count");
|
||||
|
||||
static VNET_DEFINE(int, tcp_pmtud_blackhole_activated_min_mss);
|
||||
#define V_tcp_pmtud_blackhole_activated_min_mss \
|
||||
VNET(tcp_pmtud_blackhole_activated_min_mss)
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_activated_min_mss,
|
||||
CTLFLAG_RD|CTLFLAG_VNET,
|
||||
&VNET_NAME(tcp_pmtud_blackhole_activated_min_mss), 0,
|
||||
"Path MTU Discovery Black Hole Detection, Activation Count at min MSS");
|
||||
|
||||
static VNET_DEFINE(int, tcp_pmtud_blackhole_failed);
|
||||
#define V_tcp_pmtud_blackhole_failed VNET(tcp_pmtud_blackhole_failed)
|
||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, pmtud_blackhole_failed,
|
||||
CTLFLAG_RD|CTLFLAG_VNET,
|
||||
&VNET_NAME(tcp_pmtud_blackhole_failed), 0,
|
||||
"Path MTU Discovery Black Hole Detection, Failure Count");
|
||||
|
||||
#ifdef INET
|
||||
static VNET_DEFINE(int, tcp_pmtud_blackhole_mss) = 1200;
|
||||
#define V_tcp_pmtud_blackhole_mss VNET(tcp_pmtud_blackhole_mss)
|
||||
@ -772,7 +749,7 @@ tcp_timer_rexmt(void * xtp)
|
||||
tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss) {
|
||||
/* Use the sysctl tuneable blackhole MSS. */
|
||||
tp->t_maxseg = V_tcp_v6pmtud_blackhole_mss;
|
||||
V_tcp_pmtud_blackhole_activated++;
|
||||
TCPSTAT_INC(tcps_pmtud_blackhole_activated);
|
||||
} else if (isipv6) {
|
||||
/* Use the default MSS. */
|
||||
tp->t_maxseg = V_tcp_v6mssdflt;
|
||||
@ -781,7 +758,7 @@ tcp_timer_rexmt(void * xtp)
|
||||
* minmss.
|
||||
*/
|
||||
tp->t_flags2 &= ~TF2_PLPMTU_PMTUD;
|
||||
V_tcp_pmtud_blackhole_activated_min_mss++;
|
||||
TCPSTAT_INC(tcps_pmtud_blackhole_activated_min_mss);
|
||||
}
|
||||
#endif
|
||||
#if defined(INET6) && defined(INET)
|
||||
@ -791,7 +768,7 @@ tcp_timer_rexmt(void * xtp)
|
||||
if (tp->t_maxseg > V_tcp_pmtud_blackhole_mss) {
|
||||
/* Use the sysctl tuneable blackhole MSS. */
|
||||
tp->t_maxseg = V_tcp_pmtud_blackhole_mss;
|
||||
V_tcp_pmtud_blackhole_activated++;
|
||||
TCPSTAT_INC(tcps_pmtud_blackhole_activated);
|
||||
} else {
|
||||
/* Use the default MSS. */
|
||||
tp->t_maxseg = V_tcp_mssdflt;
|
||||
@ -800,7 +777,7 @@ tcp_timer_rexmt(void * xtp)
|
||||
* minmss.
|
||||
*/
|
||||
tp->t_flags2 &= ~TF2_PLPMTU_PMTUD;
|
||||
V_tcp_pmtud_blackhole_activated_min_mss++;
|
||||
TCPSTAT_INC(tcps_pmtud_blackhole_activated_min_mss);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
@ -823,7 +800,7 @@ tcp_timer_rexmt(void * xtp)
|
||||
tp->t_flags2 |= TF2_PLPMTU_PMTUD;
|
||||
tp->t_flags2 &= ~TF2_PLPMTU_BLACKHOLE;
|
||||
tp->t_maxseg = tp->t_pmtud_saved_maxseg;
|
||||
V_tcp_pmtud_blackhole_failed++;
|
||||
TCPSTAT_INC(tcps_pmtud_blackhole_failed);
|
||||
/*
|
||||
* Reset the slow-start flight size as it
|
||||
* may depend on the new MSS.
|
||||
|
@ -580,6 +580,11 @@ struct tcpstat {
|
||||
uint64_t tcps_sig_err_sigopt; /* No signature expected by socket */
|
||||
uint64_t tcps_sig_err_nosigopt; /* No signature provided by segment */
|
||||
|
||||
/* Path MTU Discovery Black Hole Detection related stats */
|
||||
uint64_t tcps_pmtud_blackhole_activated; /* Black Hole Count */
|
||||
uint64_t tcps_pmtud_blackhole_activated_min_mss; /* BH at min MSS Count */
|
||||
uint64_t tcps_pmtud_blackhole_failed; /* Black Hole Failure Count */
|
||||
|
||||
uint64_t _pad[12]; /* 6 UTO, 6 TBD */
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
* in the range 5 to 9.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 1200041 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 1200042 /* Master, propagated to newvers */
|
||||
|
||||
/*
|
||||
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
|
||||
|
@ -752,12 +752,24 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
|
||||
"{N:/time%s unexpected signature received}\n");
|
||||
p(tcps_sig_err_nosigopt, "\t{:no-signature-provided/%ju} "
|
||||
"{N:/time%s no signature provided by segment}\n");
|
||||
|
||||
xo_close_container("tcp-signature");
|
||||
xo_open_container("pmtud");
|
||||
|
||||
p(tcps_pmtud_blackhole_activated, "\t{:pmtud-activated/%ju} "
|
||||
"{N:/Path MTU discovery black hole detection activation%s}\n");
|
||||
p(tcps_pmtud_blackhole_activated_min_mss,
|
||||
"\t{:pmtud-activated-min-mss/%ju} "
|
||||
"{N:/Path MTU discovery black hole detection min MSS activation%s}\n");
|
||||
p(tcps_pmtud_blackhole_failed, "\t{:pmtud-failed/%ju} "
|
||||
"{N:/Path MTU discovery black hole detection failure%s}\n");
|
||||
#undef p
|
||||
#undef p1a
|
||||
#undef p2
|
||||
#undef p2a
|
||||
#undef p3
|
||||
xo_close_container("tcp-signature");
|
||||
xo_close_container("pmtud");
|
||||
|
||||
|
||||
xo_open_container("TCP connection count by state");
|
||||
xo_emit("{T:/TCP connection count by state}:\n");
|
||||
|
Loading…
Reference in New Issue
Block a user