git: cf3fb40d55a5 - stable/14 - tcp rack: cleanup accounting conditional checks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Apr 2025 12:50:24 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=cf3fb40d55a5eafd16fc704d1d94d562b0a6c488
commit cf3fb40d55a5eafd16fc704d1d94d562b0a6c488
Author: Peter Lei <peterlei@netflix.com>
AuthorDate: 2025-02-25 20:45:40 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-04-07 12:45:37 +0000
tcp rack: cleanup accounting conditional checks
No functional change intended.
Reviewed by: tuexen
Sponsored by: Netflix, Inc.
(cherry picked from commit 6f27541d948fa0126f9262f8cc5326b1c4befcc7)
---
sys/netinet/tcp_stacks/rack.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index fd8054febb54..dca7e347d615 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -19218,11 +19218,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_DATA] += cnt_thru;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_DATA] += (crtsc - ts_val);
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[CNT_OF_MSS_OUT] += ((len + segsiz - 1) / segsiz);
}
sched_unpin();
@@ -19763,11 +19759,7 @@ again:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_DATA] += cnt_thru;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_DATA] += (crtsc - ts_val);
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[CNT_OF_MSS_OUT] += ((tot_len + segsiz - 1) / segsiz);
}
sched_unpin();
@@ -20098,8 +20090,6 @@ rack_output(struct tcpcb *tp)
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_BLOCKED] += (crtsc - ts_val);
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_BLOCKED]++;
}
sched_unpin();
@@ -21243,19 +21233,13 @@ just_return_nolock:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_DATA]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_DATA] += (crtsc - ts_val);
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[CNT_OF_MSS_OUT] += ((tot_len_this_send + segsiz - 1) / segsiz);
}
} else {
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_LIMITED]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_LIMITED] += (crtsc - ts_val);
}
}
@@ -21425,8 +21409,6 @@ send:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_FAIL]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_FAIL] += (crtsc - ts_val);
}
sched_unpin();
@@ -22395,8 +22377,6 @@ nomore:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_FAIL]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_FAIL] += (crtsc - ts_val);
}
sched_unpin();
@@ -22450,8 +22430,6 @@ nomore:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_FAIL]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_FAIL] += (crtsc - ts_val);
}
sched_unpin();
@@ -22475,8 +22453,6 @@ nomore:
crtsc = get_cyclecount();
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_FAIL]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_FAIL] += (crtsc - ts_val);
}
sched_unpin();
@@ -22650,18 +22626,12 @@ skip_all_send:
if (tot_len_this_send) {
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_DATA]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_DATA] += crtsc;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[CNT_OF_MSS_OUT] += ((tot_len_this_send + segsiz - 1) /segsiz);
}
} else {
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_cnt_counters[SND_OUT_ACK]++;
- }
- if (tp->t_flags2 & TF2_TCP_ACCOUNTING) {
tp->tcp_proc_time[SND_OUT_ACK] += crtsc;
}
}