From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net] ipv6: introduce tcp_v6_iif()
Date: Fri, 17 Oct 2014 09:52:38 -0700 [thread overview]
Message-ID: <1413564758.24709.5.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1C9D8C89@AcuExch.aculab.com>
On Fri, 2014-10-17 at 16:26 +0000, David Laight wrote:
> From: Eric Dumazet
> > Commit 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line
> > misses") added a regression for SO_BINDTODEVICE on IPv6.
> >
> > This is because we still use inet6_iif() which expects that IP6 control
> > block is still at the beginning of skb->cb[]
> >
> > This patch adds tcp_v6_iif() helper and uses it where necessary.
> >
> > Because __inet6_lookup_skb() is used by TCP and DCCP, we add an iif
> > parameter to it.
> ...
> > diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> > index cf2e45ab2fa4..831495529b82 100644
> > --- a/net/ipv6/tcp_ipv6.c
> > +++ b/net/ipv6/tcp_ipv6.c
> > @@ -424,6 +424,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> > if (sock_owned_by_user(sk))
> > goto out;
> >
> > + /* Note : We use inet6_iif() here, not tcp_v6_iif() */
> > req = inet6_csk_search_req(sk, &prev, th->dest, &hdr->daddr,
> > &hdr->saddr, inet6_iif(skb));
> > if (!req)
>
> That comment isn't particularly informative....
It is showing I considered this spot, and the right thing here is to use
inet6_iif()
The commit changelog will give to curious people the reasons.
Adding fat comments is superseded with good changelog.
next prev parent reply other threads:[~2014-10-17 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 16:17 [PATCH net] ipv6: introduce tcp_v6_iif() Eric Dumazet
2014-10-17 16:26 ` David Laight
2014-10-17 16:52 ` Eric Dumazet [this message]
2014-10-17 16:58 ` Cong Wang
2014-10-17 18:19 ` Eric Dumazet
2014-10-18 0:00 ` Cong Wang
2014-10-18 0:02 ` Cong Wang
2014-10-18 3:48 ` David Miller
2014-10-18 15:30 ` Eric Dumazet
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=1413564758.24709.5.camel@edumazet-glaptop2.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=David.Laight@ACULAB.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;
as well as URLs for NNTP newsgroup(s).