All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Xie He <xie.he.0141@gmail.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Network Development <netdev@vger.kernel.org>,
	syzbot <syzbot+4a2c52677a8a1aa283cb@syzkaller.appspotmail.com>,
	William Tu <u9012063@gmail.com>
Subject: Re: [Patch net] ip_gre: set dev->hard_header_len properly
Date: Fri, 9 Oct 2020 13:38:52 -0700	[thread overview]
Message-ID: <CAM_iQpU1hU0Wg9sdTwFAG17Gk4-85+=xvZdQeb3oswhBKtAsPA@mail.gmail.com> (raw)
In-Reply-To: <CAJht_EPVyc0uAZc914E3tdgqEc7tDabpAxnBsGrRRFecc+NMwg@mail.gmail.com>

On Fri, Oct 9, 2020 at 12:51 PM Xie He <xie.he.0141@gmail.com> wrote:
>
> On Fri, Oct 9, 2020 at 12:41 PM Xie He <xie.he.0141@gmail.com> wrote:
> >
> > Thanks. But there is still something that I don't understand. What is
> > needed_headroom used for? If we are requesting space for t->encap_hlen
> > and t->tun_hlen in hard_header_len. Do we still need to use
> > needed_headroom?
>
> It seems to me that the original code includes t->encap_hlen,
> t->tun_hlen, and the IP header length in needed_headroom. (Right?) If
> we are including these in hard_header_len, we need to move them out of
> needed_headroom.

Interesting point. I think needed_headroom is 0 until we call
ipgre_changelink(), but needed_headroom is already being used
in multiple places for skb_cow_head() in the same file, I guess
they should be replaced with hard_head_len because for GRE tunnel
those are its link-layer header. What makes it more complicated
is that header_ops is actually set conditionally, so should be
hard_header_len/needed_head_room accordingly.

Thanks.

  reply	other threads:[~2020-10-09 20:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  1:21 [Patch net] ip_gre: set dev->hard_header_len properly Cong Wang
2020-10-08 11:48 ` Willem de Bruijn
2020-10-08 17:33   ` Cong Wang
2020-10-08 19:04     ` Willem de Bruijn
2020-10-08 19:16       ` Xie He
2020-10-08 19:19         ` Willem de Bruijn
2020-10-08 20:10           ` Xie He
2020-10-08 20:31             ` Willem de Bruijn
2020-10-08 21:35               ` Xie He
2020-10-08 21:47                 ` Willem de Bruijn
2020-10-08 21:54                   ` Xie He
2020-10-08 23:40                     ` Xie He
2020-10-09 17:43                       ` Cong Wang
2020-10-09 19:41                         ` Xie He
2020-10-09 19:51                           ` Xie He
2020-10-09 20:38                             ` Cong Wang [this message]
2020-10-10  1:07                               ` Cong Wang
2020-10-10  3:10                                 ` Xie He
2020-10-10 18:58                                   ` Cong Wang
2020-10-10 21:49                                     ` Xie He
2020-10-11  3:55                                       ` Xie He
2020-10-11 14:35                                     ` Xie He
2020-10-08 19:18       ` Willem de Bruijn
2020-10-08 19:50         ` Cong Wang
2020-10-08 20:19 ` Willem de Bruijn

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='CAM_iQpU1hU0Wg9sdTwFAG17Gk4-85+=xvZdQeb3oswhBKtAsPA@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+4a2c52677a8a1aa283cb@syzkaller.appspotmail.com \
    --cc=u9012063@gmail.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=xie.he.0141@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.