]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_vegas.c
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_vegas.c
index ddc4bcc5785eed2737c2ddca93422026f86c3e0f..87e72bef6d0819cd906a20a215029b35b18e3f2c 100644 (file)
@@ -330,9 +330,9 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack,
                vegas->minRTT = 0x7fffffff;
        }
        /* Use normal slow start */
-       else if (tp->snd_cwnd <= tp->snd_ssthresh) 
+       else if (tp->snd_cwnd <= tp->snd_ssthresh)
                tcp_slow_start(tp);
-       
+
 }
 
 /* Extract info for Tcp socket info provided via netlink. */
@@ -341,16 +341,14 @@ static void tcp_vegas_get_info(struct sock *sk, u32 ext,
 {
        const struct vegas *ca = inet_csk_ca(sk);
        if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-               struct tcpvegas_info *info;
-
-               info = RTA_DATA(__RTA_PUT(skb, INET_DIAG_VEGASINFO,
-                                         sizeof(*info)));
-
-               info->tcpv_enabled = ca->doing_vegas_now;
-               info->tcpv_rttcnt = ca->cntRTT;
-               info->tcpv_rtt = ca->baseRTT;
-               info->tcpv_minrtt = ca->minRTT;
-       rtattr_failure: ;
+               struct tcpvegas_info info = {
+                       .tcpv_enabled = ca->doing_vegas_now,
+                       .tcpv_rttcnt = ca->cntRTT,
+                       .tcpv_rtt = ca->baseRTT,
+                       .tcpv_minrtt = ca->minRTT,
+               };
+
+               nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
        }
 }