]> err.no Git - linux-2.6/blobdiff - net/ipv6/tcp_ipv6.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6] / net / ipv6 / tcp_ipv6.c
index 301eee726b0ff64eb8e3dc24b4432550e28de876..b36d5b2e7c30e8a4217b1d3945fe5983dc6bc42d 100644 (file)
@@ -1218,8 +1218,16 @@ process:
        bh_lock_sock(sk);
        ret = 0;
        if (!sock_owned_by_user(sk)) {
-               if (!tcp_prequeue(sk, skb))
-                       ret = tcp_v6_do_rcv(sk, skb);
+#ifdef CONFIG_NET_DMA
+                struct tcp_sock *tp = tcp_sk(sk);
+                if (tp->ucopy.dma_chan)
+                        ret = tcp_v6_do_rcv(sk, skb);
+                else
+#endif
+               {
+                       if (!tcp_prequeue(sk, skb))
+                               ret = tcp_v6_do_rcv(sk, skb);
+               }
        } else
                sk_add_backlog(sk, skb);
        bh_unlock_sock(sk);
@@ -1461,7 +1469,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
                   dest->s6_addr32[0], dest->s6_addr32[1],
                   dest->s6_addr32[2], dest->s6_addr32[3], destp,
                   sp->sk_state, 
-                  tp->write_seq-tp->snd_una, tp->rcv_nxt-tp->copied_seq,
+                  tp->write_seq-tp->snd_una,
+                  (sp->sk_state == TCP_LISTEN) ? sp->sk_ack_backlog : (tp->rcv_nxt - tp->copied_seq),
                   timer_active,
                   jiffies_to_clock_t(timer_expires - jiffies),
                   icsk->icsk_retransmits,