netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RFC] net/ipv6: seperate sit driver to extra module
@ 2006-10-05 15:41 Joerg Roedel
  2006-10-05 15:49 ` James Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2006-10-05 15:41 UTC (permalink / raw)
  To: netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

Is there a reason why the tunnel driver for IPv6-in-IPv4 is currently
compiled into the ipv6 module? This driver is only needed in gateways
between different IPv6 networks. On all other hosts with ipv6 enabled it
is not required. To have this driver in a seperate module will save
memory on those machines.
I appended a small and trival patch to 2.6.18 which does exactly this.

Joerg

[-- Attachment #2: patch_sit_as_module --]
[-- Type: text/plain, Size: 2918 bytes --]

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
--- linux-2.6.18-vanilla/net/ipv6/af_inet6.c	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/net/ipv6/af_inet6.c	2006-10-05 16:55:02.000000000 +0200
@@ -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();
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Kconfig linux-2.6.18/net/ipv6/Kconfig
--- linux-2.6.18-vanilla/net/ipv6/Kconfig	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/net/ipv6/Kconfig	2006-10-05 17:07:11.000000000 +0200
@@ -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 n
+	---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
diff -upr -X linux-2.6.18/Documentation/dontdiff linux-2.6.18-vanilla/net/ipv6/Makefile linux-2.6.18/net/ipv6/Makefile
--- linux-2.6.18-vanilla/net/ipv6/Makefile	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/net/ipv6/Makefile	2006-10-05 17:10:42.000000000 +0200
@@ -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
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
--- linux-2.6.18-vanilla/net/ipv6/sit.c	2006-09-20 05:42:06.000000000 +0200
+++ linux-2.6.18/net/ipv6/sit.c	2006-10-05 16:55:02.000000000 +0200
@@ -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);

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

* Re: [PATCH][RFC] net/ipv6: seperate sit driver to extra module
  2006-10-05 15:41 [PATCH][RFC] net/ipv6: seperate sit driver to extra module Joerg Roedel
@ 2006-10-05 15:49 ` James Morris
  2006-10-05 15:59   ` Joerg Roedel
  2006-10-05 17:26   ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 4+ messages in thread
From: James Morris @ 2006-10-05 15:49 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: netdev, linux-kernel

On Thu, 5 Oct 2006, Joerg Roedel wrote:

> Is there a reason why the tunnel driver for IPv6-in-IPv4 is currently
> compiled into the ipv6 module? This driver is only needed in gateways
> between different IPv6 networks. On all other hosts with ipv6 enabled it
> is not required. To have this driver in a seperate module will save
> memory on those machines.
> I appended a small and trival patch to 2.6.18 which does exactly this.

Looks ok to me, although given that users used to get this by default when 
selecting IPv6, perhaps the default in Kconfig should be y.



- James
-- 
James Morris
<jmorris@namei.org>

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

* Re: [PATCH][RFC] net/ipv6: seperate sit driver to extra module
  2006-10-05 15:49 ` James Morris
@ 2006-10-05 15:59   ` Joerg Roedel
  2006-10-05 17:26   ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2006-10-05 15:59 UTC (permalink / raw)
  To: James Morris; +Cc: netdev, linux-kernel

On Thu, Oct 05, 2006 at 11:49:38AM -0400, James Morris wrote:
> On Thu, 5 Oct 2006, Joerg Roedel wrote:
> 
> > Is there a reason why the tunnel driver for IPv6-in-IPv4 is currently
> > compiled into the ipv6 module? This driver is only needed in gateways
> > between different IPv6 networks. On all other hosts with ipv6 enabled it
> > is not required. To have this driver in a seperate module will save
> > memory on those machines.
> > I appended a small and trival patch to 2.6.18 which does exactly this.
> 
> Looks ok to me, although given that users used to get this by default when 
> selecting IPv6, perhaps the default in Kconfig should be y.

Ok, a good point to write y there. I change this. I wrote n there
because of the "If unsure, say N" sentence in the description.

Joerg

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

* Re: [PATCH][RFC] net/ipv6: seperate sit driver to extra module
  2006-10-05 15:49 ` James Morris
  2006-10-05 15:59   ` Joerg Roedel
@ 2006-10-05 17:26   ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-10-05 17:26 UTC (permalink / raw)
  To: jmorris; +Cc: joro-lkml, netdev, linux-kernel, yoshfuji

In article <Pine.LNX.4.64.0610051148230.23631@d.namei> (at Thu, 5 Oct 2006 11:49:38 -0400 (EDT)), James Morris <jmorris@namei.org> says:

> On Thu, 5 Oct 2006, Joerg Roedel wrote:
> 
> > Is there a reason why the tunnel driver for IPv6-in-IPv4 is currently
> > compiled into the ipv6 module? This driver is only needed in gateways
> > between different IPv6 networks. On all other hosts with ipv6 enabled it
> > is not required. To have this driver in a seperate module will save
> > memory on those machines.
> > I appended a small and trival patch to 2.6.18 which does exactly this.
> 
> Looks ok to me, although given that users used to get this by default when 
> selecting IPv6, perhaps the default in Kconfig should be y.

Agreed.  And, we could add #ifdef in addrconf.c.

--yoshfuji

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

end of thread, other threads:[~2006-10-05 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 15:41 [PATCH][RFC] net/ipv6: seperate sit driver to extra module Joerg Roedel
2006-10-05 15:49 ` James Morris
2006-10-05 15:59   ` Joerg Roedel
2006-10-05 17:26   ` YOSHIFUJI Hideaki / 吉藤英明

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