[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <84bc21ebf2a9f5898cd81d68e00b72fd6f43ba6b.1600770261.git.sd@queasysnail.net>
Date: Thu, 1 Oct 2020 09:59:26 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: netdev@...r.kernel.org
Cc: Sabrina Dubroca <sd@...asysnail.net>
Subject: [PATCH net 02/12] geneve: add get_link_net
Currently, geneve devices don't advertise a link netns. Similarly to
VXLAN, we can get it from geneve_dev->net.
Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels")
Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>
---
drivers/net/geneve.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 974a244f45ba..cd47940bfcbe 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1791,6 +1791,13 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
return -EMSGSIZE;
}
+static struct net *geneve_get_link_net(const struct net_device *dev)
+{
+ struct geneve_dev *geneve = netdev_priv(dev);
+
+ return geneve->net;
+}
+
static struct rtnl_link_ops geneve_link_ops __read_mostly = {
.kind = "geneve",
.maxtype = IFLA_GENEVE_MAX,
@@ -1803,6 +1810,7 @@ static struct rtnl_link_ops geneve_link_ops __read_mostly = {
.dellink = geneve_dellink,
.get_size = geneve_get_size,
.fill_info = geneve_fill_info,
+ .get_link_net = geneve_get_link_net,
};
struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
--
2.28.0
Powered by blists - more mailing lists