netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xie He <xie.he.0141@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	Network Development <netdev@vger.kernel.org>,
	syzbot <syzbot+4a2c52677a8a1aa283cb@syzkaller.appspotmail.com>,
	William Tu <u9012063@gmail.com>
Subject: Re: [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly
Date: Thu, 15 Oct 2020 12:19:07 -0700	[thread overview]
Message-ID: <CAJht_EOP3_+R-6_SNZHM9scOO2aWhz1TjFs-0jZbjqBYBiHZ-Q@mail.gmail.com> (raw)
In-Reply-To: <CA+FuTSf+7fwJHBMog4wiGRmhD32qfdGVhnOarA9jpdeti822xw@mail.gmail.com>

On Thu, Oct 15, 2020 at 6:42 AM Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>
> On Wed, Oct 14, 2020 at 10:25 PM Xie He <xie.he.0141@gmail.com> wrote:
> >
> > Actually I think dev->type can be seen from user space. For example,
> > when you type "ip link", it will display the link type for you. So I
> > think it is useful to keep different dev->type labels without merging
> > them even if they appear to have no difference.
>
> Ah, indeed. These constants are matched in iproute2 in lib/ll_types.c
> to string representations.
>
> Good catch. Yes, then they have to stay as is.

So in this case it may be better to keep dev->type as ARHPHRD_IPGRE
for GRE devices with or without header_ops. This way we can avoid the
need to update iproute2.

We can still consider changing GRE devices in collect_md mode from
ARPHRD_NONE to ARHPHRD_IPGRE. The original author who changed it to
ARPHRD_NONE might assume ARHPHRD_IPGRE is for GRE devices with
header_ops, so he felt he needed to distinguish GRE devices without
header_ops by dev->type. However, ARHPHRD_IPGRE is actually already
used for GRE devices with header_ops AND without header_ops. So it
doesn't hurt to use ARHPHRD_IPGRE for GRE devices in collect_md mode,
too. This would also make iproute2 to correctly display GRE devices in
collect_md mode as GRE devices.

  reply	other threads:[~2020-10-15 19:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 19:11 [Patch net v2] ip_gre: set dev->hard_header_len and dev->needed_headroom properly Cong Wang
2020-10-11 20:32 ` Xie He
2020-10-11 21:06   ` Willem de Bruijn
2020-10-11 21:50     ` Xie He
2020-10-11 21:00 ` Willem de Bruijn
2020-10-11 21:25   ` Willem de Bruijn
2020-10-11 22:03   ` Xie He
2020-10-14  8:51   ` Xie He
2020-10-14 15:12     ` Willem de Bruijn
2020-10-14 19:47       ` Xie He
2020-10-14 20:19         ` Willem de Bruijn
2020-10-15  1:38           ` Xie He
2020-10-15  2:24             ` Xie He
2020-10-15 13:42               ` Willem de Bruijn
2020-10-15 19:19                 ` Xie He [this message]
2020-10-15 19:56                   ` Willem de Bruijn
2020-10-11 22:45 ` Xie He
2020-10-12 22:26   ` Cong Wang

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=CAJht_EOP3_+R-6_SNZHM9scOO2aWhz1TjFs-0jZbjqBYBiHZ-Q@mail.gmail.com \
    --to=xie.he.0141@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+4a2c52677a8a1aa283cb@syzkaller.appspotmail.com \
    --cc=u9012063@gmail.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=xiyou.wangcong@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 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).