All four RTT attributes tell the reader to left-shift, which inflates the value by 16 to 64 times, and the two usec ones say the result is in msecs. The attributes carry srtt_us and mdev_us, which hold 3 and 2 fractional bits. The shift to get the integer part would be a right shift. Drop the instructions instead of turning them around. The number of fractional bits is the part worth documenting, whether to shift, divide or convert to a double is up to the caller. While at it fix the acronym on the two variance attributes. Signed-off-by: Jakub Kicinski --- Documentation/netlink/specs/tcp_metrics.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Documentation/netlink/specs/tcp_metrics.yaml b/Documentation/netlink/specs/tcp_metrics.yaml index 1d365908084d..779e8a22b765 100644 --- a/Documentation/netlink/specs/tcp_metrics.yaml +++ b/Documentation/netlink/specs/tcp_metrics.yaml @@ -93,14 +93,12 @@ kernel-policy: global name: rtt type: u32 doc: | - Round Trip Time (RTT), in msecs with 3 bits fractional - (left-shift by 3 to get the msec value). + Round Trip Time (RTT), in msecs with 3 bits fractional. - name: rttvar type: u32 doc: | - Round Trip Time VARiance (RTT), in msecs with 2 bits fractional - (left-shift by 2 to get the msec value). + Round Trip Time VARiance (RTTVAR), in msecs with 2 bits fractional. - name: ssthresh type: u32 @@ -117,14 +115,12 @@ kernel-policy: global name: rtt-us type: u32 doc: | - Round Trip Time (RTT), in usecs, with 3 bits fractional - (left-shift by 3 to get the msec value). + Round Trip Time (RTT), in usecs, with 3 bits fractional. - name: rttvar-us type: u32 doc: | - Round Trip Time (RTT), in usecs, with 2 bits fractional - (left-shift by 3 to get the msec value). + Round Trip Time VARiance (RTTVAR), in usecs, with 2 bits fractional. operations: list: -- 2.55.0