Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: fix TCP early demux
Date: Fri, 27 Jul 2012 23:34:33 +0200	[thread overview]
Message-ID: <1343424873.2626.13112.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120727.134713.1437322148321890583.davem@davemloft.net>

On Fri, 2012-07-27 at 13:47 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 27 Jul 2012 18:23:40 +0200
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > commit 92101b3b2e317 (ipv4: Prepare for change of rt->rt_iif encoding.)
> > invalidated TCP early demux, because rx_dst_ifindex is not properly
> > initialized and checked.
> > 
> > Also remove the use of inet_iif(skb) in favor or skb->skb_iif
> > 
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied.

Thanks David

IPv6 part is screwed because of the bogus dst_check(dst, 0)

(and missing code that was moved out from tcp_rcv_established() to
tcp_v4_do_rcv() : I was wondering if we could make it generic to move it
back to tcp_rcv_established()) :

                if (sk->sk_rx_dst) {
                        struct dst_entry *dst = sk->sk_rx_dst;
                        if (dst->ops->check(dst, 0) == NULL) {
                                dst_release(dst);
                                sk->sk_rx_dst = NULL;
                        }
                }
                if (unlikely(sk->sk_rx_dst == NULL)) {
                        sk->sk_rx_dst = dst_clone(skb_dst(skb));
                        inet_sk(sk)->rx_dst_ifindex = inet_iif(skb);
                }


IPv6 wants a cookie here, not 0

I wonder why cookie is not stored in dst, and must be stored outside of
it ?

We could then use :
                if (sk->sk_rx_dst) {
                        struct dst_entry *dst = sk->sk_rx_dst;
                        if (dst->ops->check(dst) == NULL) {
                                dst_release(dst);
                                sk->sk_rx_dst = NULL;
                        }
                }

  reply	other threads:[~2012-07-27 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 16:23 [PATCH] ipv4: fix TCP early demux Eric Dumazet
2012-07-27 20:47 ` David Miller
2012-07-27 21:34   ` Eric Dumazet [this message]
2012-07-27 23:00     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343424873.2626.13112.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox