netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Oliver Herms <oliver.peter.herms@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH] IPv6: Set SIT tunnel hard_header_len to zero
Date: Wed, 4 Nov 2020 14:52:50 -0500	[thread overview]
Message-ID: <CA+FuTSeqv=SJ=5sXCrWWiA=nUnLvCgX4wjcoqZm93VSyJQO1jg@mail.gmail.com> (raw)
In-Reply-To: <dc8f00ff-d484-f5cf-97a3-9f6d8984160e@gmail.com>

On Wed, Nov 4, 2020 at 2:30 PM Oliver Herms
<oliver.peter.herms@gmail.com> wrote:
>
> On 03.11.20 19:42, Willem de Bruijn wrote:
> > Thanks. Yes, this is long overdue.
> >
> > The hard_header_len issue was also recently discussed in the context
> > of GRE in commit fdafed459998 ("ip_gre: set dev->hard_header_len and
> > dev->needed_headroom properly").
> >
> > Question is whether we should reserve room in needed_headroom instead.
> > AFAIK this existing update logic in ip6_tnl_xmit is sufficient
> >
> > "
> >         /* Calculate max headroom for all the headers and adjust
> >          * needed_headroom if necessary.
> >          */
> >         max_headroom = LL_RESERVED_SPACE(dst->dev) + sizeof(struct ipv6hdr)
> >                         + dst->header_len + t->hlen;
> >         if (max_headroom > dev->needed_headroom)
> >                 dev->needed_headroom = max_headroom;
> > "I think that's enough. At least it definitely works in my test and prod environment.
> Would be good to get another opinion on this though.

Sit should behave the same as other tunnels. At least in ip6_tunnel.c
and ip6_gre.c I do not see explicit initialization of needed_headroom.

> >> Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
> >
> > How did you arrive at this SHA1?
> I think the legacy usage of hard_header_len in ipv6/sit.c was overseen in c54419321455.
> Please correct me if I'm wrong.

I don't see anything in that patch assign or modify hard_header_len.

  reply	other threads:[~2020-11-04 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 10:41 [PATCH] IPv6: Set SIT tunnel hard_header_len to zero Oliver Herms
2020-11-03 18:42 ` Willem de Bruijn
2020-11-04 19:30   ` Oliver Herms
2020-11-04 19:52     ` Willem de Bruijn [this message]
2020-11-09  9:05       ` Oliver Herms
2020-11-09 15:10         ` Willem de Bruijn
2020-11-09 23:16 ` Jakub Kicinski

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='CA+FuTSeqv=SJ=5sXCrWWiA=nUnLvCgX4wjcoqZm93VSyJQO1jg@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.peter.herms@gmail.com \
    --cc=yoshfuji@linux-ipv6.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).