Skip to content

Commit 1c1bb16

Browse files
p-shah256facebook-github-bot
authored andcommitted
Rename new_server_opt to server_opt
Summary: Rename the `new_server_opt` statistics counter to `server_opt` across TPR codebase. The "new_server_opt" counter was introduced during the rollout of TPR server optimization features. Now that the rollout is complete and this is the standard behavior, the "new" prefix is misleading and adds unnecessary verbosity. Reviewed By: frankfeir Differential Revision: D80952473 fbshipit-source-id: 3d24c93dcc41e3273f385261996ef3c2ecd07ba5
1 parent b70e4ce commit 1c1bb16

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

katran/tpr/TPRStatsPoller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void TPRStatsPoller::setStatsCounters(const tcp_router_stats& stats) {
4040
setCounter("error_write_opt", stats.error_write_opt);
4141
setCounter("error_sys_calls", stats.error_sys_calls);
4242
setCounter("ignoring_due_to_kde", stats.ignoring_due_to_kde);
43-
setCounter("new_server_opt", stats.new_server_opt);
43+
setCounter("server_opt", stats.server_opt);
4444
}
4545

4646
TPRStatsPoller::TPRStatsPoller(
@@ -158,7 +158,7 @@ TPRStatsPoller::collectTPRStats(int numCpus) {
158158
aggregateStats.error_write_opt += stat.error_write_opt;
159159
aggregateStats.error_sys_calls += stat.error_sys_calls;
160160
aggregateStats.ignoring_due_to_kde += stat.ignoring_due_to_kde;
161-
aggregateStats.new_server_opt += stat.new_server_opt;
161+
aggregateStats.server_opt += stat.server_opt;
162162
}
163163
return aggregateStats;
164164
}

katran/tpr/TPRTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ 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 new_server_opt{0};
49+
uint64_t server_opt{0};
5050
};
5151

5252
// helper methods to constructs useful error message without boiler plate code.
@@ -95,7 +95,7 @@ inline std::ostream& operator<<(std::ostream& os, const tcp_router_stats& s) {
9595
<< " error_server_id_zero=" << s.error_server_id_zero
9696
<< " error_write_opt=" << s.error_write_opt
9797
<< " error_sys_calls=" << s.error_sys_calls
98-
<< " new_server_opt=" << s.new_server_opt;
98+
<< " server_opt=" << s.server_opt;
9999
return os;
100100
}
101101

katran/tpr/bpf/tcp_pkt_router_active_hdlr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static inline int load_tpr_opt(
2525
err = bpf_load_hdr_opt(skops, hdr_opt, sizeof(*hdr_opt), NO_FLAGS);
2626
if (err >= 0) {
2727
// err >= 0 means we succeeded at reading the header.
28-
stat->new_server_opt++;
28+
stat->server_opt++;
2929
return err;
3030
}
3131

katran/tpr/bpf/tcp_pkt_router_structs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +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 new_server_opt;
45+
__u64 server_opt;
4646
};

0 commit comments

Comments
 (0)