Skip to content

Commit b70e4ce

Browse files
p-shah256facebook-github-bot
authored andcommitted
Remove legacy_server_opt stats counter
Summary: Remove the `legacy_server_opt` statistics counter from TPR structs and all related logging/tracking code. The legacy stats counter was used during the rollout of the new TPR server optimization. Since the rollout is complete and only `new_server_opt` is needed for monitoring, the legacy counter creates unnecessary overhead and code complexity. This is the first step in a cleanup - the next commit will rename `new_server_opt` to `server_opt` for clarity purposes. Simplifies TPR codebase by removing deprecated metrics. Reduces memory footprint of TPR stats structures and eliminates confusion between legacy vs new server optimization metrics. Reviewed By: nikhildl12 Differential Revision: D80843067 fbshipit-source-id: 9746f24cde34b278e7da1071fb86ec26c8d7ba33
1 parent e3b5100 commit b70e4ce

3 files changed

Lines changed: 0 additions & 5 deletions

File tree

katran/tpr/TPRStatsPoller.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ void TPRStatsPoller::setStatsCounters(const tcp_router_stats& stats) {
4141
setCounter("error_sys_calls", stats.error_sys_calls);
4242
setCounter("ignoring_due_to_kde", stats.ignoring_due_to_kde);
4343
setCounter("new_server_opt", stats.new_server_opt);
44-
setCounter("legacy_server_opt", stats.legacy_server_opt);
4544
}
4645

4746
TPRStatsPoller::TPRStatsPoller(
@@ -159,7 +158,6 @@ TPRStatsPoller::collectTPRStats(int numCpus) {
159158
aggregateStats.error_write_opt += stat.error_write_opt;
160159
aggregateStats.error_sys_calls += stat.error_sys_calls;
161160
aggregateStats.ignoring_due_to_kde += stat.ignoring_due_to_kde;
162-
aggregateStats.legacy_server_opt += stat.legacy_server_opt;
163161
aggregateStats.new_server_opt += stat.new_server_opt;
164162
}
165163
return aggregateStats;

katran/tpr/TPRTypes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct tcp_router_stats {
4646
uint64_t error_write_opt{0};
4747
uint64_t error_sys_calls{0};
4848
uint64_t ignoring_due_to_kde{0};
49-
uint64_t legacy_server_opt{0};
5049
uint64_t new_server_opt{0};
5150
};
5251

@@ -96,7 +95,6 @@ inline std::ostream& operator<<(std::ostream& os, const tcp_router_stats& s) {
9695
<< " error_server_id_zero=" << s.error_server_id_zero
9796
<< " error_write_opt=" << s.error_write_opt
9897
<< " error_sys_calls=" << s.error_sys_calls
99-
<< " legacy_server_opt=" << s.legacy_server_opt
10098
<< " new_server_opt=" << s.new_server_opt;
10199
return os;
102100
}

katran/tpr/bpf/tcp_pkt_router_structs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,5 @@ struct stats {
4242
__u64 error_sys_calls;
4343
__u64 ignoring_due_to_kde;
4444
// stats for the rollout of the new TPR server OPT
45-
__u64 legacy_server_opt;
4645
__u64 new_server_opt;
4746
};

0 commit comments

Comments
 (0)