Only report RTT for flows exceeding 4kbps - to eliminate noise from basically idle connections.

This commit is contained in:
Herbert Wolverson committed 2024-03-11 15:03:47 -05:00
1 parent 71fd1d558f
commit d93726e538
1 file changed
+7 -4
+7 -4
View File
@@ -280,13 +280,16 @@ static __always_inline void process_tcp(
detect_retries(dissector, rate_index, data);
// Timestamps to calculate RTT
u_int32_t tsval = dissector->tsval;
u_int32_t tsecr = dissector->tsecr;
if (tsval != 0) {
u_int32_t tsval = dissector->tsval;
u_int32_t tsecr = dissector->tsecr;
if (tsval != 0) {
//bpf_debug("[FLOWS][%d] TSVAL: %u, TSECR: %u", direction, tsval, tsecr);
if (tsval != data->tsval[rate_index] && tsecr != data->tsecr[rate_index]) {
if (tsecr == data->tsval[other_rate_index]) {
if (
tsecr == data->tsval[other_rate_index] &&
data->rate_estimate_bps[rate_index] > 4096
) {
__u64 elapsed = dissector->now - data->ts_change_time[other_rate_index];
data->last_rtt[rate_index] = elapsed;
//bpf_debug("[FLOWS][%d] RTT: %llu", direction, elapsed);