From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com
Subject: [PATCH net-next v2 0/12] Remove iflink field from the net_device structure
Date: Thu, 2 Apr 2015 17:06:59 +0200 [thread overview]
Message-ID: <1427987231-3669-1-git-send-email-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <1422979929.907.19.camel@edumazet-glaptop2.roam.corp.google.com>
The first goal of this series was to advertise the veth peer via the IFLA_LINK
attribute, but iflink was not ready for network namespaces.
The iflink of an interface should be set to its ifindex for a physical interface
and to another value (0 if not relevant) for a virtual interface.
This was not the case for some interfaces, like vxlan, bond, or bridge for
example.
There is also a risk, if the targeted interface moves to another netns, that the
ifindex changes without updating corresponding iflink fields (eg. vlan).
Moving the management of this property into virtual interface drivers allows to
better handle this last case because most of virtual interface drivers have a
pointer to the link netdevice.
Anyway, dev->iflink value was always a copy of some internal data of the virtual
interface driver, thus let's use these internal data directly.
So, this series removes the iflink field and let the drivers manage it.
Only the last patch was present in the v1, but I fully rework it.
drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++++++++
drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 1 -
drivers/net/ipvlan/ipvlan_core.c | 2 +-
drivers/net/ipvlan/ipvlan_main.c | 9 ++++++++-
drivers/net/macvlan.c | 9 ++++++++-
drivers/net/veth.c | 15 +++++++++++++++
include/linux/netdevice.h | 7 +++++--
include/net/ip6_tunnel.h | 1 +
include/net/ip_tunnels.h | 1 +
net/8021q/vlan_dev.c | 9 ++++++++-
net/batman-adv/hard-interface.c | 5 +++--
net/bridge/br_netlink.c | 4 ++--
net/core/dev.c | 32 +++++++++++++++++++++----------
net/core/link_watch.c | 4 ++--
net/core/net-sysfs.c | 10 +++++++++-
net/core/rtnetlink.c | 8 ++++----
net/dsa/slave.c | 8 +++-----
net/ipv4/ip_gre.c | 2 ++
net/ipv4/ip_tunnel.c | 9 ++++++++-
net/ipv4/ip_vti.c | 2 +-
net/ipv4/ipip.c | 2 +-
net/ipv4/ipmr.c | 9 +++++++--
net/ipv6/addrconf.c | 4 ++--
net/ipv6/ip6_gre.c | 8 ++------
net/ipv6/ip6_tunnel.c | 10 ++++++++--
net/ipv6/ip6_vti.c | 3 +--
net/ipv6/ip6mr.c | 9 +++++++--
net/ipv6/sit.c | 3 +--
28 files changed, 140 insertions(+), 54 deletions(-)
Comments are welcome.
Regards,
Nicolas
next prev parent reply other threads:[~2015-04-02 15:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 15:41 [PATCH net-next] veth: set iflink to the peer veth Nicolas Dichtel
2015-02-03 16:12 ` Eric Dumazet
2015-02-03 16:21 ` Nicolas Dichtel
2015-04-02 15:06 ` Nicolas Dichtel [this message]
2015-04-02 15:07 ` [PATCH net-next v2 01/12] dev: introduce dev_get_iflink() Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 02/12] ip6tnl,gre6,vti6: implement ndo_get_iflink Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 03/12] ipip,gre,vti,sit: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 04/12] ipmr,ip6mr: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 05/12] vlan: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 06/12] macvlan: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 07/12] ipvlan: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 08/12] infiniband/ipoib: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 09/12] dsa: " Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 10/12] net: remove iflink field from struct net_device Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 11/12] dev: set iflink to 0 for virtual interfaces Nicolas Dichtel
2015-04-02 15:07 ` [PATCH net-next v2 12/12] veth: set iflink to the peer veth Nicolas Dichtel
2015-04-02 18:05 ` [PATCH net-next v2 0/12] Remove iflink field from the net_device structure David Miller
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=1427987231-3669-1-git-send-email-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.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).