H_ERTT(4)
π H_ERTT π β the Enhanced Round Trip Time Khelp module, bestie edition
okay so this is the manual page for h_ertt(4), from the Kernel Interfaces Manual, and honestly? she's serving low noise, per-connection RTT estimates and we're gonna talk about her. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
h_ertt β the Enhanced Round Trip Time Khelp module π
π¦ SYNOPSIS π¦
#include <netinet/khelp/h_ertt.h>
that's it. that's the include. iconic. no cap. β¨
π DESCRIPTION π
so the h_ertt Khelp module lives inside the khelp(9) framework, and its whole job is giving TCP a per-connection, low noise estimate of the instantaneous RTT. like, an RTT reading that isn't screaming and crying all the time. π
and the way she does it is robust, fr fr. she stays unbothered by:
- delayed acknowledgements
- TCP Segmentation Offload (TSO)
- receivers out here manipulating TCP timestamps π
- the TCP timestamp option just... not being there at all π
delayed acks, the whole situation
okay so TCP receivers using delayed acknowledgements do one of two things:
- they acknowledge every second packet β and that ack reflects the time stamp of the first packet
- or they use a timeout to trigger the acknowledgement if no second packet ever shows up
so if the heuristic inside h_ertt figures out the receiver is doing delayed acks, she measures the RTT using the second packet β the one that actually triggers the acknowledgement. β¨
but if the acknowledgement is for the first packet, she does not measure the RTT. not because she's lazy, but because it literally cannot be accurately determined. respect the boundary bestie.
TSO girlies, this one's for you
when TSO is in use, h_ertt will momentarily disable TSO whilst marking a packet to use for a new measurement. and before you panic β the process has negligible impact on the connection. it's a quick little moment, in and out, no drama. π¦
the struct, and she IS the moment
h_ertt associates the following struct with each connection's TCP control block:
struct ertt {
TAILQ_HEAD(txseginfo_head, txseginfo) txsegi_q; /* Private. */
long bytes_tx_in_rtt; /* Private. */
long bytes_tx_in_marked_rtt;
unsigned long marked_snd_cwnd;
int rtt;
int maxrtt;
int minrtt;
int dlyack_rx; /* Private. */
int timestamp_errors; /* Private. */
int markedpkt_rtt; /* Private. */
uint32_t flags;
};
π¨ the fields marked as private should NOT be manipulated by any code outside of the h_ertt implementation. hands off, bestie. those are hers. π
ββοΈ
the non-private fields are giving the following data, and they are all very main character:
bytes_tx_in_marked_rttβ the number of bytes transmitted in themarkedpkt_rtt. πmarked_snd_cwndβ the value ofcwndfor the marked rtt measurement.rttβ the most recent RTT measurement. β¨ fresh off the press.maxrttβ the longest RTT measurement that has been taken. the overachiever of the group.minrttβ the shortest RTT measurement that has been taken. tiny. precious. πflagsβ theERTT_NEW_MEASUREMENTflag will be set by the implementation when a new measurement is available. and listen β it is the responsibility ofh_erttconsumers to unset the flag if they wish to use it as a notification method for new measurements. so like, if you want that notification lifestyle, you clear it yourself. that's the deal. π
π SEE ALSO π
the whole friend group, fr fr π«Ά
π ACKNOWLEDGEMENTS π
development and testing of this software were made possible in part by grants from the FreeBSD Foundation and the Cisco University Research Program Fund at Community Foundation Silicon Valley. funding besties, we love to see it. π
β HISTORY β
the h_ertt module first appeared in FreeBSD 9.0. π
and the module was first released in 2010 by David Hayes, whilst working on the NewTCP research project at Swinburne University of Technology's Centre for Advanced Internet Architectures, Melbourne, Australia. π¦πΊβ¨
more details are available at:
http://caia.swin.edu.au/urp/newtcp/
(that's a real URL from the original, keep it exactly as-is, no touchy π«Ά)
π§ AUTHORS π§
the h_ertt Khelp module and this manual page were written by David Hayes <david.hayes@ieee.org>. king behavior honestly. π
π BUGS π
okay so, the tea: the module maintains enhanced RTT estimates for all new TCP connections created after the time at which the module was loaded.
so yeah, even the connections that literally do not care about ERTT estimates are getting them. it might be beneficial to see if it is possible to have the module only affect connections which actually care about ERTT estimates. like girl, read the room. π
and that's the whole page bestie!! this was H_ERTT(4) from the Debian build of the manual, dated January 18, 2012 β yeah she's a 2012 girlie but she still eats π
β¨ stay low noise, stay instantaneous, mwah ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2010-2011 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms