netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] Advertise tunnel parameters via netlink
@ 2012-11-09  9:51 Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09  9:51 UTC (permalink / raw)
  To: netdev; +Cc: davem

The goal of this serie is to advertise tunnel parameters via netlink.

The patch against iproute2 will be sent once the patches are included and
net-next merged. I can send it on demand.

The last patch is a fix after a code review.

Comments are welcome.

Regards,
Nicolas

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl
  2012-11-09  9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
@ 2012-11-09  9:51 ` Nicolas Dichtel
  2012-11-09 13:20   ` Eric Dumazet
  2012-11-09  9:51 ` [PATCH net-next 2/4] sit: advertise tunnel param via rtnl Nicolas Dichtel
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09  9:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nicolas Dichtel

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/if_tunnel.h | 11 ++++++++
 net/ipv4/ipip.c                | 57 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index 5db5942..ccb21d5 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -37,6 +37,17 @@ struct ip_tunnel_parm {
 	struct iphdr		iph;
 };
 
+enum {
+	IFLA_IPTUN_UNSPEC,
+	IFLA_IPTUN_LINK,
+	IFLA_IPTUN_LOCAL,
+	IFLA_IPTUN_REMOTE,
+	IFLA_IPTUN_TTL,
+	IFLA_IPTUN_TOS,
+	__IFLA_IPTUN_MAX,
+};
+#define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
+
 /* SIT-mode i_flags */
 #define	SIT_ISATAP	0x0001
 
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index e15b452..37e1ca2 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -138,6 +138,7 @@ struct ipip_net {
 static int ipip_tunnel_init(struct net_device *dev);
 static void ipip_tunnel_setup(struct net_device *dev);
 static void ipip_dev_free(struct net_device *dev);
+static struct rtnl_link_ops ipip_link_ops __read_mostly;
 
 /*
  * Locking : hash tables are protected by RCU and RTNL
@@ -305,6 +306,7 @@ static struct ip_tunnel *ipip_tunnel_locate(struct net *net,
 		goto failed_free;
 
 	strcpy(nt->parms.name, dev->name);
+	dev->rtnl_link_ops = &ipip_link_ops;
 
 	dev_hold(dev);
 	ipip_tunnel_link(ipn, nt);
@@ -829,6 +831,47 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t ipip_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_TOS */
+		nla_total_size(1) +
+		0;
+}
+
+static int ipip_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip_tunnel *tunnel = netdev_priv(dev);
+	struct ip_tunnel_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put_be32(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) ||
+	    nla_put_be32(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops ipip_link_ops __read_mostly = {
+	.kind		= "ipip",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip_tunnel),
+	.get_size	= ipip_get_size,
+	.fill_info	= ipip_fill_info,
+};
+
 static struct xfrm_tunnel ipip_handler __read_mostly = {
 	.handler	=	ipip_rcv,
 	.err_handler	=	ipip_err,
@@ -925,14 +968,26 @@ static int __init ipip_init(void)
 		return err;
 	err = xfrm4_tunnel_register(&ipip_handler, AF_INET);
 	if (err < 0) {
-		unregister_pernet_device(&ipip_net_ops);
 		pr_info("%s: can't register tunnel\n", __func__);
+		goto xfrm_tunnel_failed;
 	}
+	err = rtnl_link_register(&ipip_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
+
+out:
 	return err;
+
+rtnl_link_failed:
+	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
+xfrm_tunnel_failed:
+	unregister_pernet_device(&ipip_net_ops);
+	goto out;
 }
 
 static void __exit ipip_fini(void)
 {
+	rtnl_link_unregister(&ipip_link_ops);
 	if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
 		pr_info("%s: can't deregister tunnel\n", __func__);
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 2/4] sit: advertise tunnel param via rtnl
  2012-11-09  9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
@ 2012-11-09  9:51 ` Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 3/4] ip6tnl: " Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 4/4] gre6: fix rtnl dump messages Nicolas Dichtel
  3 siblings, 0 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09  9:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nicolas Dichtel

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/sit.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 3ed54ff..b543c56 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -68,6 +68,7 @@
 static int ipip6_tunnel_init(struct net_device *dev);
 static void ipip6_tunnel_setup(struct net_device *dev);
 static void ipip6_dev_free(struct net_device *dev);
+static struct rtnl_link_ops sit_link_ops __read_mostly;
 
 static int sit_net_id __read_mostly;
 struct sit_net {
@@ -282,6 +283,7 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
 		goto failed_free;
 
 	strcpy(nt->parms.name, dev->name);
+	dev->rtnl_link_ops = &sit_link_ops;
 
 	dev_hold(dev);
 
@@ -1216,6 +1218,47 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t sit_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_TOS */
+		nla_total_size(1) +
+		0;
+}
+
+static int sit_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip_tunnel *tunnel = netdev_priv(dev);
+	struct ip_tunnel_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put_be32(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) ||
+	    nla_put_be32(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops sit_link_ops __read_mostly = {
+	.kind		= "sit",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip_tunnel),
+	.get_size	= sit_get_size,
+	.fill_info	= sit_fill_info,
+};
+
 static struct xfrm_tunnel sit_handler __read_mostly = {
 	.handler	=	ipip6_rcv,
 	.err_handler	=	ipip6_err,
@@ -1302,6 +1345,7 @@ static struct pernet_operations sit_net_ops = {
 
 static void __exit sit_cleanup(void)
 {
+	rtnl_link_unregister(&sit_link_ops);
 	xfrm4_tunnel_deregister(&sit_handler, AF_INET6);
 
 	unregister_pernet_device(&sit_net_ops);
@@ -1319,10 +1363,21 @@ static int __init sit_init(void)
 		return err;
 	err = xfrm4_tunnel_register(&sit_handler, AF_INET6);
 	if (err < 0) {
-		unregister_pernet_device(&sit_net_ops);
 		pr_info("%s: can't add protocol\n", __func__);
+		goto xfrm_tunnel_failed;
 	}
+	err = rtnl_link_register(&sit_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
+
+out:
 	return err;
+
+rtnl_link_failed:
+	xfrm4_tunnel_deregister(&sit_handler, AF_INET6);
+xfrm_tunnel_failed:
+	unregister_pernet_device(&sit_net_ops);
+	goto out;
 }
 
 module_init(sit_init);
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 3/4] ip6tnl: advertise tunnel param via rtnl
  2012-11-09  9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 2/4] sit: advertise tunnel param via rtnl Nicolas Dichtel
@ 2012-11-09  9:51 ` Nicolas Dichtel
  2012-11-09  9:51 ` [PATCH net-next 4/4] gre6: fix rtnl dump messages Nicolas Dichtel
  3 siblings, 0 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09  9:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nicolas Dichtel

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/if_tunnel.h |  3 +++
 net/ipv6/ip6_tunnel.c          | 57 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index ccb21d5..c1bf0b5 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -44,6 +44,9 @@ enum {
 	IFLA_IPTUN_REMOTE,
 	IFLA_IPTUN_TTL,
 	IFLA_IPTUN_TOS,
+	IFLA_IPTUN_ENCAP_LIMIT,
+	IFLA_IPTUN_FLOWINFO,
+	IFLA_IPTUN_FLAGS,
 	__IFLA_IPTUN_MAX,
 };
 #define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 09482f7..424ed45 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -83,6 +83,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2)
 
 static int ip6_tnl_dev_init(struct net_device *dev);
 static void ip6_tnl_dev_setup(struct net_device *dev);
+static struct rtnl_link_ops ip6_link_ops __read_mostly;
 
 static int ip6_tnl_net_id __read_mostly;
 struct ip6_tnl_net {
@@ -299,6 +300,7 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct __ip6_tnl_parm *p)
 		goto failed_free;
 
 	strcpy(t->parms.name, dev->name);
+	dev->rtnl_link_ops = &ip6_link_ops;
 
 	dev_hold(dev);
 	ip6_tnl_link(ip6n, t);
@@ -1504,6 +1506,55 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t ip6_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(sizeof(struct in6_addr)) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(sizeof(struct in6_addr)) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_ENCAP_LIMIT */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_FLOWINFO */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_FLAGS */
+		nla_total_size(4) +
+		0;
+}
+
+static int ip6_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip6_tnl *tunnel = netdev_priv(dev);
+	struct __ip6_tnl_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put(skb, IFLA_IPTUN_LOCAL, sizeof(struct in6_addr),
+		    &parm->raddr) ||
+	    nla_put(skb, IFLA_IPTUN_REMOTE, sizeof(struct in6_addr),
+		    &parm->laddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->hop_limit) ||
+	    nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
+	    nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
+	    nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops ip6_link_ops __read_mostly = {
+	.kind		= "ip6tnl",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip6_tnl),
+	.get_size	= ip6_get_size,
+	.fill_info	= ip6_fill_info,
+};
+
 static struct xfrm6_tunnel ip4ip6_handler __read_mostly = {
 	.handler	= ip4ip6_rcv,
 	.err_handler	= ip4ip6_err,
@@ -1612,9 +1663,14 @@ static int __init ip6_tunnel_init(void)
 		pr_err("%s: can't register ip6ip6\n", __func__);
 		goto out_ip6ip6;
 	}
+	err = rtnl_link_register(&ip6_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
 
 	return 0;
 
+rtnl_link_failed:
+	xfrm6_tunnel_deregister(&ip6ip6_handler, AF_INET6);
 out_ip6ip6:
 	xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET);
 out_ip4ip6:
@@ -1629,6 +1685,7 @@ out_pernet:
 
 static void __exit ip6_tunnel_cleanup(void)
 {
+	rtnl_link_unregister(&ip6_link_ops);
 	if (xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET))
 		pr_info("%s: can't deregister ip4ip6\n", __func__);
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 4/4] gre6: fix rtnl dump messages
  2012-11-09  9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
                   ` (2 preceding siblings ...)
  2012-11-09  9:51 ` [PATCH net-next 3/4] ip6tnl: " Nicolas Dichtel
@ 2012-11-09  9:51 ` Nicolas Dichtel
  2012-11-09 13:22   ` Eric Dumazet
  3 siblings, 1 reply; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09  9:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nicolas Dichtel

Spotted after a code review.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/ip6_gre.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index bbe2e7b..12aa473 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1633,9 +1633,9 @@ static size_t ip6gre_get_size(const struct net_device *dev)
 		/* IFLA_GRE_OKEY */
 		nla_total_size(4) +
 		/* IFLA_GRE_LOCAL */
-		nla_total_size(4) +
+		nla_total_size(sizeof(struct in6_addr)) +
 		/* IFLA_GRE_REMOTE */
-		nla_total_size(4) +
+		nla_total_size(sizeof(struct in6_addr)) +
 		/* IFLA_GRE_TTL */
 		nla_total_size(1) +
 		/* IFLA_GRE_TOS */
@@ -1659,8 +1659,8 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)
 	    nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) ||
 	    nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) ||
 	    nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) ||
-	    nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->raddr) ||
-	    nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->laddr) ||
+	    nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->laddr) ||
+	    nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->raddr) ||
 	    nla_put_u8(skb, IFLA_GRE_TTL, p->hop_limit) ||
 	    /*nla_put_u8(skb, IFLA_GRE_TOS, t->priority) ||*/
 	    nla_put_u8(skb, IFLA_GRE_ENCAP_LIMIT, p->encap_limit) ||
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl
  2012-11-09  9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
@ 2012-11-09 13:20   ` Eric Dumazet
  2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Dumazet @ 2012-11-09 13:20 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: netdev, davem

On Fri, 2012-11-09 at 10:51 +0100, Nicolas Dichtel wrote:
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---

It would be nice you add in the changelog an explicit
use for this feature ?

Its not that obvious...

Thanks

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 4/4] gre6: fix rtnl dump messages
  2012-11-09  9:51 ` [PATCH net-next 4/4] gre6: fix rtnl dump messages Nicolas Dichtel
@ 2012-11-09 13:22   ` Eric Dumazet
  2012-11-09 15:34     ` [PATCH] " Nicolas Dichtel
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Dumazet @ 2012-11-09 13:22 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: netdev, davem

On Fri, 2012-11-09 at 10:51 +0100, Nicolas Dichtel wrote:
> Spotted after a code review.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  net/ipv6/ip6_gre.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Hi Nicolas

Could you please write real changelogs ?

This is a bug fix.

So we need for proper tracking of this bug, a reference
of the original commit that introduced this bug.

This will help stable teams work tremendously

Thanks !

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH] gre6: fix rtnl dump messages
  2012-11-09 13:22   ` Eric Dumazet
@ 2012-11-09 15:34     ` Nicolas Dichtel
  2012-11-09 16:09       ` Eric Dumazet
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 15:34 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, davem, Nicolas Dichtel

Spotted after a code review.
Introduced by c12b395a46646bab69089ce7016ac78177f6001f (gre: Support GRE over
IPv6).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: rebase the patch against net
    add the commit that introduces the bug

 net/ipv6/ip6_gre.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 0185679..d5cb3c4 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1633,9 +1633,9 @@ static size_t ip6gre_get_size(const struct net_device *dev)
 		/* IFLA_GRE_OKEY */
 		nla_total_size(4) +
 		/* IFLA_GRE_LOCAL */
-		nla_total_size(4) +
+		nla_total_size(sizeof(struct in6_addr)) +
 		/* IFLA_GRE_REMOTE */
-		nla_total_size(4) +
+		nla_total_size(sizeof(struct in6_addr)) +
 		/* IFLA_GRE_TTL */
 		nla_total_size(1) +
 		/* IFLA_GRE_TOS */
@@ -1659,8 +1659,8 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)
 	    nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) ||
 	    nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) ||
 	    nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) ||
-	    nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->raddr) ||
-	    nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->laddr) ||
+	    nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->laddr) ||
+	    nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->raddr) ||
 	    nla_put_u8(skb, IFLA_GRE_TTL, p->hop_limit) ||
 	    /*nla_put_u8(skb, IFLA_GRE_TOS, t->priority) ||*/
 	    nla_put_u8(skb, IFLA_GRE_ENCAP_LIMIT, p->encap_limit) ||
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] gre6: fix rtnl dump messages
  2012-11-09 15:34     ` [PATCH] " Nicolas Dichtel
@ 2012-11-09 16:09       ` Eric Dumazet
  2012-11-09 22:11         ` David Miller
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Dumazet @ 2012-11-09 16:09 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: netdev, davem

On Fri, 2012-11-09 at 16:34 +0100, Nicolas Dichtel wrote:
> Spotted after a code review.
> Introduced by c12b395a46646bab69089ce7016ac78177f6001f (gre: Support GRE over
> IPv6).
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> v2: rebase the patch against net
>     add the commit that introduces the bug

Thanks !

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next 0/3] Advertise tunnel parameters via netlink
  2012-11-09 13:20   ` Eric Dumazet
@ 2012-11-09 16:09     ` Nicolas Dichtel
  2012-11-09 16:09       ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
                         ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 16:09 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, davem

The goal of this serie is to advertise tunnel parameters via netlink.

It is usefull for daemons that monitor link event to have the full parameters
of these interfaces.

The patch against iproute2 will be sent once the patches are included and
net-next merged. I can send it on demand.

v2: remove last patch of the serie, which was a bug fix.
    enhance commit log.

Comments are welcome.

Regards,
Nicolas

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl
  2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
@ 2012-11-09 16:09       ` Nicolas Dichtel
  2012-11-09 16:37         ` Eric Dumazet
  2012-11-09 16:10       ` [PATCH net-next 2/3] sit: " Nicolas Dichtel
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 16:09 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, davem, Nicolas Dichtel

It is usefull for daemons that monitor link event to have the full parameters of
these interfaces when a rtnl message is sent.
It allows also to dump them via rtnetlink.

It is based on what is done for GRE tunnels.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/if_tunnel.h | 11 ++++++++
 net/ipv4/ipip.c                | 57 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index 5db5942..ccb21d5 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -37,6 +37,17 @@ struct ip_tunnel_parm {
 	struct iphdr		iph;
 };
 
+enum {
+	IFLA_IPTUN_UNSPEC,
+	IFLA_IPTUN_LINK,
+	IFLA_IPTUN_LOCAL,
+	IFLA_IPTUN_REMOTE,
+	IFLA_IPTUN_TTL,
+	IFLA_IPTUN_TOS,
+	__IFLA_IPTUN_MAX,
+};
+#define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
+
 /* SIT-mode i_flags */
 #define	SIT_ISATAP	0x0001
 
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index e15b452..37e1ca2 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -138,6 +138,7 @@ struct ipip_net {
 static int ipip_tunnel_init(struct net_device *dev);
 static void ipip_tunnel_setup(struct net_device *dev);
 static void ipip_dev_free(struct net_device *dev);
+static struct rtnl_link_ops ipip_link_ops __read_mostly;
 
 /*
  * Locking : hash tables are protected by RCU and RTNL
@@ -305,6 +306,7 @@ static struct ip_tunnel *ipip_tunnel_locate(struct net *net,
 		goto failed_free;
 
 	strcpy(nt->parms.name, dev->name);
+	dev->rtnl_link_ops = &ipip_link_ops;
 
 	dev_hold(dev);
 	ipip_tunnel_link(ipn, nt);
@@ -829,6 +831,47 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t ipip_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_TOS */
+		nla_total_size(1) +
+		0;
+}
+
+static int ipip_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip_tunnel *tunnel = netdev_priv(dev);
+	struct ip_tunnel_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put_be32(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) ||
+	    nla_put_be32(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops ipip_link_ops __read_mostly = {
+	.kind		= "ipip",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip_tunnel),
+	.get_size	= ipip_get_size,
+	.fill_info	= ipip_fill_info,
+};
+
 static struct xfrm_tunnel ipip_handler __read_mostly = {
 	.handler	=	ipip_rcv,
 	.err_handler	=	ipip_err,
@@ -925,14 +968,26 @@ static int __init ipip_init(void)
 		return err;
 	err = xfrm4_tunnel_register(&ipip_handler, AF_INET);
 	if (err < 0) {
-		unregister_pernet_device(&ipip_net_ops);
 		pr_info("%s: can't register tunnel\n", __func__);
+		goto xfrm_tunnel_failed;
 	}
+	err = rtnl_link_register(&ipip_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
+
+out:
 	return err;
+
+rtnl_link_failed:
+	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
+xfrm_tunnel_failed:
+	unregister_pernet_device(&ipip_net_ops);
+	goto out;
 }
 
 static void __exit ipip_fini(void)
 {
+	rtnl_link_unregister(&ipip_link_ops);
 	if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
 		pr_info("%s: can't deregister tunnel\n", __func__);
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 2/3] sit: advertise tunnel param via rtnl
  2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
  2012-11-09 16:09       ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
@ 2012-11-09 16:10       ` Nicolas Dichtel
  2012-11-09 16:10       ` [PATCH net-next 3/3] ip6tnl: " Nicolas Dichtel
  2012-11-10  0:36       ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink David Miller
  3 siblings, 0 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 16:10 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, davem, Nicolas Dichtel

It is usefull for daemons that monitor link event to have the full parameters of
these interfaces when a rtnl message is sent.
It allows also to dump them via rtnetlink.

It is based on what is done for GRE tunnels.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/sit.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 3ed54ff..b543c56 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -68,6 +68,7 @@
 static int ipip6_tunnel_init(struct net_device *dev);
 static void ipip6_tunnel_setup(struct net_device *dev);
 static void ipip6_dev_free(struct net_device *dev);
+static struct rtnl_link_ops sit_link_ops __read_mostly;
 
 static int sit_net_id __read_mostly;
 struct sit_net {
@@ -282,6 +283,7 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
 		goto failed_free;
 
 	strcpy(nt->parms.name, dev->name);
+	dev->rtnl_link_ops = &sit_link_ops;
 
 	dev_hold(dev);
 
@@ -1216,6 +1218,47 @@ static int __net_init ipip6_fb_tunnel_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t sit_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_TOS */
+		nla_total_size(1) +
+		0;
+}
+
+static int sit_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip_tunnel *tunnel = netdev_priv(dev);
+	struct ip_tunnel_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put_be32(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) ||
+	    nla_put_be32(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops sit_link_ops __read_mostly = {
+	.kind		= "sit",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip_tunnel),
+	.get_size	= sit_get_size,
+	.fill_info	= sit_fill_info,
+};
+
 static struct xfrm_tunnel sit_handler __read_mostly = {
 	.handler	=	ipip6_rcv,
 	.err_handler	=	ipip6_err,
@@ -1302,6 +1345,7 @@ static struct pernet_operations sit_net_ops = {
 
 static void __exit sit_cleanup(void)
 {
+	rtnl_link_unregister(&sit_link_ops);
 	xfrm4_tunnel_deregister(&sit_handler, AF_INET6);
 
 	unregister_pernet_device(&sit_net_ops);
@@ -1319,10 +1363,21 @@ static int __init sit_init(void)
 		return err;
 	err = xfrm4_tunnel_register(&sit_handler, AF_INET6);
 	if (err < 0) {
-		unregister_pernet_device(&sit_net_ops);
 		pr_info("%s: can't add protocol\n", __func__);
+		goto xfrm_tunnel_failed;
 	}
+	err = rtnl_link_register(&sit_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
+
+out:
 	return err;
+
+rtnl_link_failed:
+	xfrm4_tunnel_deregister(&sit_handler, AF_INET6);
+xfrm_tunnel_failed:
+	unregister_pernet_device(&sit_net_ops);
+	goto out;
 }
 
 module_init(sit_init);
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next 3/3] ip6tnl: advertise tunnel param via rtnl
  2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
  2012-11-09 16:09       ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
  2012-11-09 16:10       ` [PATCH net-next 2/3] sit: " Nicolas Dichtel
@ 2012-11-09 16:10       ` Nicolas Dichtel
  2012-11-10  0:36       ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink David Miller
  3 siblings, 0 replies; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 16:10 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, davem, Nicolas Dichtel

It is usefull for daemons that monitor link event to have the full parameters of
these interfaces when a rtnl message is sent.
It allows also to dump them via rtnetlink.

It is based on what is done for GRE tunnels.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/if_tunnel.h |  3 +++
 net/ipv6/ip6_tunnel.c          | 57 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index ccb21d5..c1bf0b5 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -44,6 +44,9 @@ enum {
 	IFLA_IPTUN_REMOTE,
 	IFLA_IPTUN_TTL,
 	IFLA_IPTUN_TOS,
+	IFLA_IPTUN_ENCAP_LIMIT,
+	IFLA_IPTUN_FLOWINFO,
+	IFLA_IPTUN_FLAGS,
 	__IFLA_IPTUN_MAX,
 };
 #define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 09482f7..424ed45 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -83,6 +83,7 @@ static u32 HASH(const struct in6_addr *addr1, const struct in6_addr *addr2)
 
 static int ip6_tnl_dev_init(struct net_device *dev);
 static void ip6_tnl_dev_setup(struct net_device *dev);
+static struct rtnl_link_ops ip6_link_ops __read_mostly;
 
 static int ip6_tnl_net_id __read_mostly;
 struct ip6_tnl_net {
@@ -299,6 +300,7 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct __ip6_tnl_parm *p)
 		goto failed_free;
 
 	strcpy(t->parms.name, dev->name);
+	dev->rtnl_link_ops = &ip6_link_ops;
 
 	dev_hold(dev);
 	ip6_tnl_link(ip6n, t);
@@ -1504,6 +1506,55 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
 	return 0;
 }
 
+static size_t ip6_get_size(const struct net_device *dev)
+{
+	return
+		/* IFLA_IPTUN_LINK */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_LOCAL */
+		nla_total_size(sizeof(struct in6_addr)) +
+		/* IFLA_IPTUN_REMOTE */
+		nla_total_size(sizeof(struct in6_addr)) +
+		/* IFLA_IPTUN_TTL */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_ENCAP_LIMIT */
+		nla_total_size(1) +
+		/* IFLA_IPTUN_FLOWINFO */
+		nla_total_size(4) +
+		/* IFLA_IPTUN_FLAGS */
+		nla_total_size(4) +
+		0;
+}
+
+static int ip6_fill_info(struct sk_buff *skb, const struct net_device *dev)
+{
+	struct ip6_tnl *tunnel = netdev_priv(dev);
+	struct __ip6_tnl_parm *parm = &tunnel->parms;
+
+	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
+	    nla_put(skb, IFLA_IPTUN_LOCAL, sizeof(struct in6_addr),
+		    &parm->raddr) ||
+	    nla_put(skb, IFLA_IPTUN_REMOTE, sizeof(struct in6_addr),
+		    &parm->laddr) ||
+	    nla_put_u8(skb, IFLA_IPTUN_TTL, parm->hop_limit) ||
+	    nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
+	    nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
+	    nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags))
+		goto nla_put_failure;
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static struct rtnl_link_ops ip6_link_ops __read_mostly = {
+	.kind		= "ip6tnl",
+	.maxtype	= IFLA_IPTUN_MAX,
+	.priv_size	= sizeof(struct ip6_tnl),
+	.get_size	= ip6_get_size,
+	.fill_info	= ip6_fill_info,
+};
+
 static struct xfrm6_tunnel ip4ip6_handler __read_mostly = {
 	.handler	= ip4ip6_rcv,
 	.err_handler	= ip4ip6_err,
@@ -1612,9 +1663,14 @@ static int __init ip6_tunnel_init(void)
 		pr_err("%s: can't register ip6ip6\n", __func__);
 		goto out_ip6ip6;
 	}
+	err = rtnl_link_register(&ip6_link_ops);
+	if (err < 0)
+		goto rtnl_link_failed;
 
 	return 0;
 
+rtnl_link_failed:
+	xfrm6_tunnel_deregister(&ip6ip6_handler, AF_INET6);
 out_ip6ip6:
 	xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET);
 out_ip4ip6:
@@ -1629,6 +1685,7 @@ out_pernet:
 
 static void __exit ip6_tunnel_cleanup(void)
 {
+	rtnl_link_unregister(&ip6_link_ops);
 	if (xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET))
 		pr_info("%s: can't deregister ip4ip6\n", __func__);
 
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl
  2012-11-09 16:09       ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
@ 2012-11-09 16:37         ` Eric Dumazet
  2012-11-09 17:00           ` Nicolas Dichtel
  0 siblings, 1 reply; 18+ messages in thread
From: Eric Dumazet @ 2012-11-09 16:37 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: netdev, davem

On Fri, 2012-11-09 at 17:09 +0100, Nicolas Dichtel wrote:
> It is usefull for daemons that monitor link event to have the full parameters of
> these interfaces when a rtnl message is sent.
> It allows also to dump them via rtnetlink.
> 
> It is based on what is done for GRE tunnels.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---

Nice !

Note this also adds support for link creation.

Do you plan to add iproute2 support for :

ip link add ipip1 type ipip remote 10.246.8.36

Thanks

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl
  2012-11-09 16:37         ` Eric Dumazet
@ 2012-11-09 17:00           ` Nicolas Dichtel
  2012-11-09 19:42             ` Eric Dumazet
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolas Dichtel @ 2012-11-09 17:00 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, davem

Le 09/11/2012 17:37, Eric Dumazet a écrit :
> On Fri, 2012-11-09 at 17:09 +0100, Nicolas Dichtel wrote:
>> It is usefull for daemons that monitor link event to have the full parameters of
>> these interfaces when a rtnl message is sent.
>> It allows also to dump them via rtnetlink.
>>
>> It is based on what is done for GRE tunnels.
>>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> ---
>
> Nice !
>
> Note this also adds support for link creation.
>
> Do you plan to add iproute2 support for :
>
> ip link add ipip1 type ipip remote 10.246.8.36
>
> Thanks
>
> Acked-by: Eric Dumazet <edumazet@google.com>

If the principle is approved, yes. If we add it, we will have two
ways to manage these tunnels, via netlink and via ioctl, is it ok?

A side effect could be to have an option or an argument to the module to not 
create the control interface (tunl0, sit0, ...).

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl
  2012-11-09 17:00           ` Nicolas Dichtel
@ 2012-11-09 19:42             ` Eric Dumazet
  0 siblings, 0 replies; 18+ messages in thread
From: Eric Dumazet @ 2012-11-09 19:42 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev, davem

On Fri, 2012-11-09 at 18:00 +0100, Nicolas Dichtel wrote:

> If the principle is approved, yes. If we add it, we will have two
> ways to manage these tunnels, via netlink and via ioctl, is it ok?
> 
> A side effect could be to have an option or an argument to the module to not 
> create the control interface (tunl0, sit0, ...).

The principle is already used for gre tunnels, so it definitely is
approved ;)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] gre6: fix rtnl dump messages
  2012-11-09 16:09       ` Eric Dumazet
@ 2012-11-09 22:11         ` David Miller
  0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2012-11-09 22:11 UTC (permalink / raw)
  To: eric.dumazet; +Cc: nicolas.dichtel, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 09 Nov 2012 08:09:06 -0800

> On Fri, 2012-11-09 at 16:34 +0100, Nicolas Dichtel wrote:
>> Spotted after a code review.
>> Introduced by c12b395a46646bab69089ce7016ac78177f6001f (gre: Support GRE over
>> IPv6).
>> 
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> ---
>> v2: rebase the patch against net
>>     add the commit that introduces the bug
> 
> Thanks !
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next 0/3] Advertise tunnel parameters via netlink
  2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
                         ` (2 preceding siblings ...)
  2012-11-09 16:10       ` [PATCH net-next 3/3] ip6tnl: " Nicolas Dichtel
@ 2012-11-10  0:36       ` David Miller
  3 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2012-11-10  0:36 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: eric.dumazet, netdev

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri,  9 Nov 2012 17:09:58 +0100

> The goal of this serie is to advertise tunnel parameters via netlink.
> 
> It is usefull for daemons that monitor link event to have the full parameters
> of these interfaces.
> 
> The patch against iproute2 will be sent once the patches are included and
> net-next merged. I can send it on demand.
> 
> v2: remove last patch of the serie, which was a bug fix.
>     enhance commit log.
> 
> Comments are welcome.

Really nice, all applied, thanks Nicolas.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-11-10  0:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-09  9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
2012-11-09  9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09 13:20   ` Eric Dumazet
2012-11-09 16:09     ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
2012-11-09 16:09       ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09 16:37         ` Eric Dumazet
2012-11-09 17:00           ` Nicolas Dichtel
2012-11-09 19:42             ` Eric Dumazet
2012-11-09 16:10       ` [PATCH net-next 2/3] sit: " Nicolas Dichtel
2012-11-09 16:10       ` [PATCH net-next 3/3] ip6tnl: " Nicolas Dichtel
2012-11-10  0:36       ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink David Miller
2012-11-09  9:51 ` [PATCH net-next 2/4] sit: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09  9:51 ` [PATCH net-next 3/4] ip6tnl: " Nicolas Dichtel
2012-11-09  9:51 ` [PATCH net-next 4/4] gre6: fix rtnl dump messages Nicolas Dichtel
2012-11-09 13:22   ` Eric Dumazet
2012-11-09 15:34     ` [PATCH] " Nicolas Dichtel
2012-11-09 16:09       ` Eric Dumazet
2012-11-09 22:11         ` David Miller

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).