aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_illinois.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_illinois.c')
-rw-r--r--net/ipv4/tcp_illinois.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index 1d5a30a90adf..f71002e4db0b 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -300,26 +300,27 @@ static u32 tcp_illinois_ssthresh(struct sock *sk)
300} 300}
301 301
302/* Extract info for Tcp socket info provided via netlink. */ 302/* Extract info for Tcp socket info provided via netlink. */
303static void tcp_illinois_info(struct sock *sk, u32 ext, 303static size_t tcp_illinois_info(struct sock *sk, u32 ext, int *attr,
304 struct sk_buff *skb) 304 union tcp_cc_info *info)
305{ 305{
306 const struct illinois *ca = inet_csk_ca(sk); 306 const struct illinois *ca = inet_csk_ca(sk);
307 307
308 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { 308 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
309 struct tcpvegas_info info = { 309 info->vegas.tcpv_enabled = 1;
310 .tcpv_enabled = 1, 310 info->vegas.tcpv_rttcnt = ca->cnt_rtt;
311 .tcpv_rttcnt = ca->cnt_rtt, 311 info->vegas.tcpv_minrtt = ca->base_rtt;
312 .tcpv_minrtt = ca->base_rtt, 312 info->vegas.tcpv_rtt = 0;
313 };
314 313
315 if (info.tcpv_rttcnt > 0) { 314 if (info->vegas.tcpv_rttcnt > 0) {
316 u64 t = ca->sum_rtt; 315 u64 t = ca->sum_rtt;
317 316
318 do_div(t, info.tcpv_rttcnt); 317 do_div(t, info->vegas.tcpv_rttcnt);
319 info.tcpv_rtt = t; 318 info->vegas.tcpv_rtt = t;
320 } 319 }
321 nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info); 320 *attr = INET_DIAG_VEGASINFO;
321 return sizeof(struct tcpvegas_info);
322 } 322 }
323 return 0;
323} 324}
324 325
325static struct tcp_congestion_ops tcp_illinois __read_mostly = { 326static struct tcp_congestion_ops tcp_illinois __read_mostly = {