mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
[TCP] westwood: Use type safe netlink interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e9195d677d
commit
267281058c
1 changed files with 6 additions and 9 deletions
|
@ -260,16 +260,13 @@ static void tcp_westwood_info(struct sock *sk, u32 ext,
|
||||||
{
|
{
|
||||||
const struct westwood *ca = inet_csk_ca(sk);
|
const struct westwood *ca = inet_csk_ca(sk);
|
||||||
if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
|
if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
|
||||||
struct rtattr *rta;
|
struct tcpvegas_info info = {
|
||||||
struct tcpvegas_info *info;
|
.tcpv_enabled = 1,
|
||||||
|
.tcpv_rtt = jiffies_to_usecs(ca->rtt),
|
||||||
|
.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
|
||||||
|
};
|
||||||
|
|
||||||
rta = __RTA_PUT(skb, INET_DIAG_VEGASINFO, sizeof(*info));
|
nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
|
||||||
info = RTA_DATA(rta);
|
|
||||||
info->tcpv_enabled = 1;
|
|
||||||
info->tcpv_rttcnt = 0;
|
|
||||||
info->tcpv_rtt = jiffies_to_usecs(ca->rtt);
|
|
||||||
info->tcpv_minrtt = jiffies_to_usecs(ca->rtt_min);
|
|
||||||
rtattr_failure: ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue