From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Mahesh Bandewar <maheshb@google.com>
Subject: [PATCH net-next v2 07/12] ipvlan: implement ndo_get_iflink
Date: Thu, 2 Apr 2015 17:07:06 +0200 [thread overview]
Message-ID: <1427987231-3669-8-git-send-email-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <1427987231-3669-1-git-send-email-nicolas.dichtel@6wind.com>
Don't use dev->iflink anymore.
CC: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
drivers/net/ipvlan/ipvlan_main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 2950c3780230..1701ede2df89 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -114,7 +114,6 @@ static int ipvlan_init(struct net_device *dev)
dev->features = phy_dev->features & IPVLAN_FEATURES;
dev->features |= NETIF_F_LLTX;
dev->gso_max_size = phy_dev->gso_max_size;
- dev->iflink = phy_dev->ifindex;
dev->hard_header_len = phy_dev->hard_header_len;
ipvlan_set_lockdep_class(dev);
@@ -305,6 +304,13 @@ static int ipvlan_vlan_rx_kill_vid(struct net_device *dev, __be16 proto,
return 0;
}
+static int ipvlan_get_iflink(const struct net_device *dev)
+{
+ struct ipvl_dev *ipvlan = netdev_priv(dev);
+
+ return ipvlan->phy_dev->ifindex;
+}
+
static const struct net_device_ops ipvlan_netdev_ops = {
.ndo_init = ipvlan_init,
.ndo_uninit = ipvlan_uninit,
@@ -317,6 +323,7 @@ static const struct net_device_ops ipvlan_netdev_ops = {
.ndo_get_stats64 = ipvlan_get_stats64,
.ndo_vlan_rx_add_vid = ipvlan_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = ipvlan_vlan_rx_kill_vid,
+ .ndo_get_iflink = ipvlan_get_iflink,
};
static int ipvlan_hard_header(struct sk_buff *skb, struct net_device *dev,
--
2.2.2
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 ` [PATCH net-next v2 0/12] Remove iflink field from the net_device structure Nicolas Dichtel
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 ` Nicolas Dichtel [this message]
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-8-git-send-email-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=maheshb@google.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).