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>,
Roland Dreier <roland@kernel.org>
Subject: [PATCH net-next v2 08/12] infiniband/ipoib: implement ndo_get_iflink
Date: Thu, 2 Apr 2015 17:07:07 +0200 [thread overview]
Message-ID: <1427987231-3669-9-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: Roland Dreier <roland@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++++++++
drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 1 -
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 58b5aa3b6f2d..657b89b1d291 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -842,6 +842,13 @@ static void ipoib_set_mcast_list(struct net_device *dev)
queue_work(ipoib_workqueue, &priv->restart_task);
}
+static int ipoib_get_iflink(const struct net_device *dev)
+{
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+ return priv->parent->ifindex;
+}
+
static u32 ipoib_addr_hash(struct ipoib_neigh_hash *htbl, u8 *daddr)
{
/*
@@ -1341,6 +1348,7 @@ static const struct net_device_ops ipoib_netdev_ops = {
.ndo_start_xmit = ipoib_start_xmit,
.ndo_tx_timeout = ipoib_timeout,
.ndo_set_rx_mode = ipoib_set_mcast_list,
+ .ndo_get_iflink = ipoib_get_iflink,
};
void ipoib_setup(struct net_device *dev)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
index 9fad7b5ac8b9..4dd1313056a4 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
@@ -102,7 +102,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
}
priv->child_type = type;
- priv->dev->iflink = ppriv->dev->ifindex;
list_add_tail(&priv->list, &ppriv->child_intfs);
return 0;
--
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 ` [PATCH net-next v2 07/12] ipvlan: " Nicolas Dichtel
2015-04-02 15:07 ` Nicolas Dichtel [this message]
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-9-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 \
--cc=roland@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).