Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update _tcp_info data structure according to linux 4.14 kernel #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion gtests/net/packetdrill/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ static void write_tcp_info(struct code_state *code,
emit_var(code, "tcpi_options", info->tcpi_options);
emit_var(code, "tcpi_snd_wscale", info->tcpi_snd_wscale);
emit_var(code, "tcpi_rcv_wscale", info->tcpi_rcv_wscale);
emit_var(code, "tcpi_delivery_rate_app_limited",
info->tcpi_delivery_rate_app_limited);
emit_var(code, "tcpi_rto", info->tcpi_rto);
emit_var(code, "tcpi_ato", info->tcpi_ato);
emit_var(code, "tcpi_snd_mss", info->tcpi_snd_mss);
Expand All @@ -162,11 +164,30 @@ static void write_tcp_info(struct code_state *code,
emit_var(code, "tcpi_snd_cwnd", info->tcpi_snd_cwnd);
emit_var(code, "tcpi_advmss", info->tcpi_advmss);
emit_var(code, "tcpi_reordering", info->tcpi_reordering);
emit_var(code, "tcpi_total_retrans", info->tcpi_total_retrans);

emit_var(code, "tcpi_rcv_rtt", info->tcpi_rcv_rtt);
emit_var(code, "tcpi_rcv_space", info->tcpi_rcv_space);

emit_var(code, "tcpi_total_retrans", info->tcpi_total_retrans);

emit_var(code, "tcpi_pacing_rate", info->tcpi_pacing_rate);
emit_var(code, "tcpi_max_pacing_rate", info->tcpi_max_pacing_rate);
emit_var(code, "tcpi_bytes_acked", info->tcpi_bytes_acked);
emit_var(code, "tcpi_bytes_received", info->tcpi_bytes_received);
emit_var(code, "tcpi_segs_out", info->tcpi_segs_out);
emit_var(code, "tcpi_segs_in", info->tcpi_segs_in);

emit_var(code, "tcpi_notsent_bytes", info->tcpi_notsent_bytes);
emit_var(code, "tcpi_min_rtt", info->tcpi_min_rtt);
emit_var(code, "tcpi_data_segs_in", info->tcpi_data_segs_in);
emit_var(code, "tcpi_data_segs_out", info->tcpi_data_segs_out);

emit_var(code, "tcpi_delivery_rate", info->tcpi_delivery_rate);

emit_var(code, "tcpi_busy_time", info->tcpi_busy_time);
emit_var(code, "tcpi_rwnd_limited", info->tcpi_rwnd_limited);
emit_var(code, "tcpi_sndbuf_limited", info->tcpi_sndbuf_limited);

emit_var_end(code);
}

Expand Down
19 changes: 19 additions & 0 deletions gtests/net/packetdrill/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ struct _tcp_info {
__u8 tcpi_backoff;
__u8 tcpi_options;
__u8 tcpi_snd_wscale:4, tcpi_rcv_wscale:4;
__u8 tcpi_delivery_rate_app_limited:1;

__u32 tcpi_rto;
__u32 tcpi_ato;
Expand Down Expand Up @@ -165,6 +166,24 @@ struct _tcp_info {
__u32 tcpi_rcv_space;

__u32 tcpi_total_retrans;

__u64 tcpi_pacing_rate;
__u64 tcpi_max_pacing_rate;
__u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */
__u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
__u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
__u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */

__u32 tcpi_notsent_bytes;
__u32 tcpi_min_rtt;
__u32 tcpi_data_segs_in; /* RFC4898 tcpEStatsDataSegsIn */
__u32 tcpi_data_segs_out; /* RFC4898 tcpEStatsDataSegsOut */

__u64 tcpi_delivery_rate;

__u64 tcpi_busy_time; /* Time (usec) busy sending data */
__u64 tcpi_rwnd_limited; /* Time (usec) limited by receive window */
__u64 tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */
};

#endif /* linux */
Expand Down