Skip to contentSkip to conversation

net/ipv6: seperate sit driver to extra module

PATCH Superseded Joerg Roedel 6 participants 9 messages Oct 6, 2006 – Oct 7, 2006

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net/ipv6: seperate sit driver to extra module

this is the submit of the patch discussed yesterday to compile the sit driver as a seperate module.

changes to yesterday:
- default select changed to y in Kconfig
- added ifdefs to net/ipv6/addrconf.c
(this part is big, to keep the patches around 100 lines the
addrconf.c changes are posted in a seperate patch)

net/ipv6/af_inet6.c +0 -2
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/af_inet6.c linux-2.6.18/net/ipv6/af_inet6.c
@@ -849,7 +849,6 @@ static int __init inet6_init(void)
 	err = addrconf_init();
 	if (err)
 		goto addrconf_fail;
-	sit_init();
 
 	/* Init v6 extension headers. */
 	ipv6_rthdr_init();
@@ -920,7 +919,6 @@ static void __exit inet6_exit(void)
  	raw6_proc_exit();
 #endif
 	/* Cleanup code parts. */
-	sit_cleanup();
 	ip6_flowlabel_cleanup();
 	addrconf_cleanup();
 	ip6_route_cleanup();
net/ipv6/Kconfig +13 -0
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Kconfig linux-2.6.18/net/ipv6/Kconfig
@@ -126,6 +126,19 @@ config INET6_XFRM_MODE_TUNNEL
 
 	  If unsure, say Y.
 
+config IPV6_SIT
+	tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)"
+	depends on IPV6
+	default y
+	---help---
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This driver implements encapsulation of IPv6
+	  into IPv4 packets. This is usefull if you want to connect two IPv6
+	  networks over an IPv4-only path.
+
+	  Saying M here will produce a module called sit.ko. If unsure, say N.
+
 config IPV6_TUNNEL
 	tristate "IPv6: IPv6-in-IPv6 tunnel"
 	select INET6_TUNNEL
net/ipv6/Makefile +2 -1
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Makefile linux-2.6.18/net/ipv6/Makefile
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_IPV6) += ipv6.o
 
-ipv6-objs :=	af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o sit.o \
+ipv6-objs :=	af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \
 		route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o raw.o \
 		protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \
 		exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \
@@ -24,6 +24,7 @@ obj-$(CONFIG_INET6_XFRM_MODE_TRANSPORT) 
 obj-$(CONFIG_INET6_XFRM_MODE_TUNNEL) += xfrm6_mode_tunnel.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
 
+obj-$(CONFIG_IPV6_SIT) += sit.o
 obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
 
 obj-y += exthdrs_core.o
net/ipv6/sit.c +3 -0
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/sit.c linux-2.6.18/net/ipv6/sit.c
@@ -850,3 +850,6 @@ int __init sit_init(void)
 	inet_del_protocol(&sit_protocol, IPPROTO_IPV6);
 	goto out;
 }
+
+module_init(sit_init);
+module_exit(sit_cleanup);
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joerg" == Joerg Roedel <[email protected]> writes:

Joerg> this is the submit of the patch discussed yesterday to compile Joerg> the sit driver as a seperate module.

Your patch looks ok to me, but given that many people won't need sit, why is it enabled by default? Omitting it would save 10k of kernel text on x86 and people will see the new kernel configuration option anyway and will enable it if needed.

Sam

Signature · 1 line
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/
#2 lore raw
Quoted 9 lines · Samuel Tardieu
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joerg" == Joerg Roedel <[email protected]> writes:

Joerg> this is the submit of the patch discussed yesterday to compile Joerg> the sit driver as a seperate module.

Your patch looks ok to me, but given that many people won't need sit, why is it enabled by default? Omitting it would save 10k of kernel text on x86 and people will see the new kernel configuration option anyway and will enable it if needed.

At least if set to "n" don't forget to alert the distributors (Red Hat, etc.) to renable this. Otherwise, many clients which using 6to4 will fail...

Just my 2 cents,

Peter

Signature · 5 lines
Dr. Peter Bieringer                     http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D                       mailto:[email protected]
Deep Space 6 Co-Founder and Core Member  http://www.deepspace6.net/
OpenBC                    http://www.openbc.com/hp/Peter_Bieringer/
Personal invitation to OpenBC  http://www.openbc.com/go/invita/3889
#3 lore raw
In reply to Samuel Tardieu
Quoted 9 lines · Samuel Tardieu
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joerg" == Joerg Roedel <[email protected]> writes:

Joerg> this is the submit of the patch discussed yesterday to compile Joerg> the sit driver as a seperate module.

Your patch looks ok to me, but given that many people won't need sit, why is it enabled by default? Omitting it would save 10k of kernel text on x86 and people will see the new kernel configuration option anyway and will enable it if needed.

It is enabled per default because the users get this per default when using the current IPv6 module. James Morris mentioned this issue yesterday. I think setting the default to N would be more consistent, but the Y is probably less painfull for the users.

Joerg

#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joerg" == Joerg Roedel <[email protected]> writes:

Joerg> It is enabled per default because the users get this per Joerg> default when using the current IPv6 module. James Morris Joerg> mentioned this issue yesterday. I think setting the default to Joerg> N would be more consistent, but the Y is probably less painfull Joerg> for the users.

Makes sense. I proposed this because I reconfigure my kernel with "make oldconfig" and see new questions pop up. Maybe menuconfig and xconfig should proeminently highlight NEW questions from the top-level (by using a bold font on any item which is either new or has new sub-items) so that users get a clear view of what they may need to configure.

Sam

Signature · 1 line
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/
#5 lore raw
In reply to Joerg Roedel

In article <[email protected]> (at Fri, 6 Oct 2006 11:34:02 +0200), Joerg Roedel <[email protected]> says:

Quoted 9 lines

this is the submit of the patch discussed yesterday to compile the sit driver as a seperate module.

changes to yesterday:
- default select changed to y in Kconfig
- added ifdefs to net/ipv6/addrconf.c
(this part is big, to keep the patches around 100 lines the
addrconf.c changes are posted in a seperate patch)

Quoted 3 lines

+ into IPv4 packets. This is usefull if you want to connect two IPv6

                                       ~~~~~~~useful

Otherwise, it seems okay to me.

--yoshfuji

#6 lore raw
Quoted 1 line · On Fri, Oct 06, 2006 at 09:59:35PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
Quoted 1 line

+ into IPv4 packets. This is usefull if you want to connect two IPv6

Argh. Bad typo. I appended the fixed patch

net/ipv6/af_inet6.c +0 -2
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/af_inet6.c linux-2.6.18/net/ipv6/af_inet6.c
@@ -849,7 +849,6 @@ static int __init inet6_init(void)
 	err = addrconf_init();
 	if (err)
 		goto addrconf_fail;
-	sit_init();
 
 	/* Init v6 extension headers. */
 	ipv6_rthdr_init();
@@ -920,7 +919,6 @@ static void __exit inet6_exit(void)
  	raw6_proc_exit();
 #endif
 	/* Cleanup code parts. */
-	sit_cleanup();
 	ip6_flowlabel_cleanup();
 	addrconf_cleanup();
 	ip6_route_cleanup();
net/ipv6/Kconfig +13 -0
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Kconfig linux-2.6.18/net/ipv6/Kconfig
@@ -126,6 +126,19 @@ config INET6_XFRM_MODE_TUNNEL
 
 	  If unsure, say Y.
 
+config IPV6_SIT
+	tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)"
+	depends on IPV6
+	default y
+	---help---
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This driver implements encapsulation of IPv6
+	  into IPv4 packets. This is useful if you want to connect two IPv6
+	  networks over an IPv4-only path.
+
+	  Saying M here will produce a module called sit.ko. If unsure, say N.
+
 config IPV6_TUNNEL
 	tristate "IPv6: IPv6-in-IPv6 tunnel"
 	select INET6_TUNNEL
net/ipv6/Makefile +2 -1
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Makefile linux-2.6.18/net/ipv6/Makefile
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_IPV6) += ipv6.o
 
-ipv6-objs :=	af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o sit.o \
+ipv6-objs :=	af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \
 		route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o raw.o \
 		protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \
 		exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \
@@ -24,6 +24,7 @@ obj-$(CONFIG_INET6_XFRM_MODE_TRANSPORT) 
 obj-$(CONFIG_INET6_XFRM_MODE_TUNNEL) += xfrm6_mode_tunnel.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
 
+obj-$(CONFIG_IPV6_SIT) += sit.o
 obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
 
 obj-y += exthdrs_core.o
net/ipv6/sit.c +3 -0
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/sit.c linux-2.6.18/net/ipv6/sit.c
@@ -850,3 +850,6 @@ int __init sit_init(void)
 	inet_del_protocol(&sit_protocol, IPPROTO_IPV6);
 	goto out;
 }
+
+module_init(sit_init);
+module_exit(sit_cleanup);
#7 lore raw
Quoted 13 lines · Joerg Roedel
net/ipv6/Kconfig +12 -0
+config IPV6_SIT
+	tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)"
+	depends on IPV6
+	default y
+	---help---
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This driver implements encapsulation of IPv6
+	  into IPv4 packets. This is useful if you want to connect two IPv6
+	  networks over an IPv4-only path.
+
+	  Saying M here will produce a module called sit.ko. If unsure, say N.
Quoted 1 line

From a user perspective, I believe it should say "If unsure, say Y".

The unsure case for the unsure user should be the case that works for the broadest possible usage spectrum, which would be the 'Y' case. To put it another way, if you pick 'Y' and don't really need it, the only downside is wasting some memory. But if you pick 'N' and actually did need it, previously working IPv6 networking would no longer work. I believe the default setting should match the unsure recommendation.

-Bill

#8 lore raw
Quoted 15 lines · Bill Fink
Quoted 12 lines · Joerg Roedel
net/ipv6/Kconfig +12 -0
+config IPV6_SIT
+	tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)"
+	depends on IPV6
+	default y
+	---help---
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This driver implements encapsulation of IPv6
+	  into IPv4 packets. This is useful if you want to connect two IPv6
+	  networks over an IPv4-only path.
+
+	  Saying M here will produce a module called sit.ko. If unsure, say N.
Quoted 7 lines
Quoted 1 line

From a user perspective, I believe it should say "If unsure, say Y".

The unsure case for the unsure user should be the case that works for the broadest possible usage spectrum, which would be the 'Y' case. To put it another way, if you pick 'Y' and don't really need it, the only downside is wasting some memory. But if you pick 'N' and actually did need it, previously working IPv6 networking would no longer work. I believe the default setting should match the unsure recommendation.

Yes, the unsure value should match the default. People pick the default because they're unsure.

Signature · 2 lines
James Morris
<[email protected]>