提交 26728105 编写于 作者: T Thomas Graf 提交者: David S. Miller

[TCP] westwood: Use type safe netlink interface

Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e9195d67
......@@ -260,16 +260,13 @@ static void tcp_westwood_info(struct sock *sk, u32 ext,
{
const struct westwood *ca = inet_csk_ca(sk);
if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
struct rtattr *rta;
struct tcpvegas_info *info;
rta = __RTA_PUT(skb, INET_DIAG_VEGASINFO, sizeof(*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: ;
struct tcpvegas_info info = {
.tcpv_enabled = 1,
.tcpv_rtt = jiffies_to_usecs(ca->rtt),
.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
};
nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册