diff options
Diffstat (limited to 'net/ipv4/tcp_westwood.c')
| -rw-r--r-- | net/ipv4/tcp_westwood.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index b3c57cceb990..c10732e39837 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c | |||
| @@ -256,18 +256,19 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event) | |||
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | /* Extract info for Tcp socket info provided via netlink. */ | 258 | /* Extract info for Tcp socket info provided via netlink. */ |
| 259 | static int tcp_westwood_info(struct sock *sk, u32 ext, struct sk_buff *skb) | 259 | static size_t tcp_westwood_info(struct sock *sk, u32 ext, int *attr, |
| 260 | union tcp_cc_info *info) | ||
| 260 | { | 261 | { |
| 261 | const struct westwood *ca = inet_csk_ca(sk); | 262 | const struct westwood *ca = inet_csk_ca(sk); |
| 262 | 263 | ||
| 263 | if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { | 264 | if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { |
| 264 | struct tcpvegas_info info = { | 265 | info->vegas.tcpv_enabled = 1; |
| 265 | .tcpv_enabled = 1, | 266 | info->vegas.tcpv_rttcnt = 0; |
| 266 | .tcpv_rtt = jiffies_to_usecs(ca->rtt), | 267 | info->vegas.tcpv_rtt = jiffies_to_usecs(ca->rtt), |
| 267 | .tcpv_minrtt = jiffies_to_usecs(ca->rtt_min), | 268 | info->vegas.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min), |
| 268 | }; | ||
| 269 | 269 | ||
| 270 | return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info); | 270 | *attr = INET_DIAG_VEGASINFO; |
| 271 | return sizeof(struct tcpvegas_info); | ||
| 271 | } | 272 | } |
| 272 | return 0; | 273 | return 0; |
| 273 | } | 274 | } |
