mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
tcp_westwood: fix tcp_westwood_info()
I forgot to update tcp_westwood when changing get_info() behavior,
this patch should fix this.
Fixes: 64f40ff5bb ("tcp: prepare CC get_info() access from getsockopt()")
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
53ee1033ac
commit
31ccd0e66d
1 changed files with 8 additions and 7 deletions
|
|
@ -256,18 +256,19 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event)
|
|||
}
|
||||
|
||||
/* Extract info for Tcp socket info provided via netlink. */
|
||||
static int tcp_westwood_info(struct sock *sk, u32 ext, struct sk_buff *skb)
|
||||
static size_t tcp_westwood_info(struct sock *sk, u32 ext, int *attr,
|
||||
union tcp_cc_info *info)
|
||||
{
|
||||
const struct westwood *ca = inet_csk_ca(sk);
|
||||
|
||||
if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
|
||||
struct tcpvegas_info info = {
|
||||
.tcpv_enabled = 1,
|
||||
.tcpv_rtt = jiffies_to_usecs(ca->rtt),
|
||||
.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
|
||||
};
|
||||
info->vegas.tcpv_enabled = 1;
|
||||
info->vegas.tcpv_rttcnt = 0;
|
||||
info->vegas.tcpv_rtt = jiffies_to_usecs(ca->rtt),
|
||||
info->vegas.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
|
||||
|
||||
return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
|
||||
*attr = INET_DIAG_VEGASINFO;
|
||||
return sizeof(struct tcpvegas_info);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue