From: David Miller <davem@davemloft.net>
To: kafai@fb.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
hannes@stressinduktion.org, kernel-team@fb.com
Subject: Re: [PATCH v3 net 1/5] ipv6: Refactor common ip6gre_tunnel_init codes
Date: Fri, 11 Sep 2015 15:30:59 -0700 (PDT) [thread overview]
Message-ID: <20150911.153059.459077104316140368.davem@davemloft.net> (raw)
In-Reply-To: <1441994781-2718585-2-git-send-email-kafai@fb.com>
From: Martin KaFai Lau <kafai@fb.com>
Date: Fri, 11 Sep 2015 11:06:17 -0700
> @@ -1460,19 +1474,16 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
> static int ip6gre_tap_init(struct net_device *dev)
> {
> struct ip6_tnl *tunnel;
> + int ret;
>
> - tunnel = netdev_priv(dev);
> + ret = ip6gre_tunnel_init_common(dev);
> + if (ret)
> + return ret;
>
> - tunnel->dev = dev;
> - tunnel->net = dev_net(dev);
> - strcpy(tunnel->parms.name, dev->name);
> + tunnel = netdev_priv(dev);
>
> ip6gre_tnl_link_config(tunnel, 1);
>
> - dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
> - if (!dev->tstats)
> - return -ENOMEM;
> -
> return 0;
> }
Is this really equivalent?
The existing code for GRE tap device initialization would use whatever
ether_setup() left in the broadcast address, it would leave
dev->dev_addr alone, and unconditionally use eth_header_ops.
You are changing behavior here, and it's been like this has been this
way long enough that I can't see clearly whether this is a valid
change or not. It probably is not.
Either way, even if it is valid, you have to document what is happening
here and why it's ok.
next prev parent reply other threads:[~2015-09-11 22:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 18:06 [PATCH v3 net 0/5] ipv6: Fix dst_entry refcnt bugs in ip6_tunnel Martin KaFai Lau
2015-09-11 18:06 ` [PATCH v3 net 1/5] ipv6: Refactor common ip6gre_tunnel_init codes Martin KaFai Lau
2015-09-11 22:30 ` David Miller [this message]
2015-09-11 23:20 ` Martin KaFai Lau
2015-09-11 23:32 ` David Miller
2015-09-11 18:06 ` [PATCH v3 net 2/5] ipv6: Rename the dst_cache helper functions in ip6_tunnel Martin KaFai Lau
2015-09-11 18:06 ` [PATCH v3 net 3/5] ipv6: Fix dst_entry refcnt bugs " Martin KaFai Lau
2015-09-11 18:06 ` [PATCH v3 net 4/5] ipv6: Avoid double dst_free Martin KaFai Lau
2015-09-11 18:06 ` [PATCH v3 net 5/5] ipv6: Replace spinlock with seqlock and rcu in ip6_tunnel Martin KaFai Lau
2015-09-15 2:49 ` [PATCH v3 net 0/5] ipv6: Fix dst_entry refcnt bugs " David Miller
2015-09-15 2:56 ` David Miller
2015-09-15 18:16 ` Martin KaFai Lau
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=20150911.153059.459077104316140368.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hannes@stressinduktion.org \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--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).