netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IP/UDP encapsulation
@ 2010-04-08  7:42 Gustavo F. Padovan
  2010-04-08  7:58 ` Eric Dumazet
  2010-04-08  9:48 ` Mark Smith
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo F. Padovan @ 2010-04-08  7:42 UTC (permalink / raw)
  To: netdev
  Cc: marco bonola, ZioPRoTo (Saverio Proto), Behling Mario,
	L. Aaron Kaplan

Hi,

I'm looking for some advice on that work. The Freifunk organization is
planning work on the IP/UDP encapsulation kernel module as a GSoC
project. The idea is to create a IP-in-UDP tunnel like we do for
IP-in-IP or IP-in-GRE tunnels. The only way to do that today is to use
some VPN software.

The module will export its virtual interface through sockets and will
have support for the standard syscalls like the others encapsulation
modules.

It will improve the performance of mesh networks that will we be able
to use IP-in-UDP rather than IP-in-IP. So, instead of push all data to
local gateway into the mesh all the data can be tunneled to a faster
server and from there to the Internet. With all the data exiting with
the same IP address (the fast server IP). That will improve bandwidth,
especially for upload.

Is such module acceptable for merge into the Linux Kernel?

Any comments or suggestions to the module architecture and
implementation? If you want more information about the module I can
provide that.

Regards,

-- 
Gustavo F. Padovan
http://padovan.org

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

* Re: IP/UDP encapsulation
  2010-04-08  7:42 IP/UDP encapsulation Gustavo F. Padovan
@ 2010-04-08  7:58 ` Eric Dumazet
  2010-04-08  9:48 ` Mark Smith
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2010-04-08  7:58 UTC (permalink / raw)
  To: Gustavo F. Padovan
  Cc: netdev, marco bonola, ZioPRoTo (Saverio Proto), Behling Mario,
	L. Aaron Kaplan

Le jeudi 08 avril 2010 à 04:42 -0300, Gustavo F. Padovan a écrit :
> Hi,
> 
> I'm looking for some advice on that work. The Freifunk organization is
> planning work on the IP/UDP encapsulation kernel module as a GSoC
> project. The idea is to create a IP-in-UDP tunnel like we do for
> IP-in-IP or IP-in-GRE tunnels. The only way to do that today is to use
> some VPN software.
> 
> The module will export its virtual interface through sockets and will
> have support for the standard syscalls like the others encapsulation
> modules.
> 
> It will improve the performance of mesh networks that will we be able
> to use IP-in-UDP rather than IP-in-IP. So, instead of push all data to
> local gateway into the mesh all the data can be tunneled to a faster
> server and from there to the Internet. With all the data exiting with
> the same IP address (the fast server IP). That will improve bandwidth,
> especially for upload.
> 
> Is such module acceptable for merge into the Linux Kernel?
> 
> Any comments or suggestions to the module architecture and
> implementation? If you want more information about the module I can
> provide that.
> 
> Regards,
> 

My suggestion would be to take a look at l2tp, which uses udp
encapsulation.

net-next-2.6

net/l2tp/l2tp_core.c:1108:		(udp_sk(sk))->encap_type = 0;
net/l2tp/l2tp_core.c:1304:	enum l2tp_encap_type encap = L2TP_ENCAPTYPE_UDP;
net/l2tp/l2tp_core.c:1383:		udp_sk(sk)->encap_type = UDP_ENCAP_L2TPINUDP;
net/l2tp/l2tp_core.h:148:	enum l2tp_encap_type	encap;
net/l2tp/l2tp_core.h:171:	enum l2tp_encap_type	encap;
net/ipv4/udp.c:1299:	if (up->encap_type) {
net/ipv4/udp.c:1660:			up->encap_type = val;
net/ipv4/udp.c:1747:		val = up->encap_type;
include/linux/l2tp.h:81:	L2TP_ATTR_ENCAP_TYPE,		/* u16, enum l2tp_encap_type */
include/linux/l2tp.h:146:enum l2tp_encap_type {
include/linux/udp.h:63:  	__u16		 encap_type;	/* Is this an Encapsulation socket? */



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

* Re: IP/UDP encapsulation
  2010-04-08  7:42 IP/UDP encapsulation Gustavo F. Padovan
  2010-04-08  7:58 ` Eric Dumazet
@ 2010-04-08  9:48 ` Mark Smith
  2010-04-08 10:29   ` Eric Dumazet
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Smith @ 2010-04-08  9:48 UTC (permalink / raw)
  To: Gustavo F. Padovan
  Cc: netdev, marco bonola, ZioPRoTo (Saverio Proto), Behling Mario,
	L. Aaron Kaplan

On Thu, 8 Apr 2010 04:42:47 -0300
"Gustavo F. Padovan" <gustavo@padovan.org> wrote:

> Hi,
> 
> I'm looking for some advice on that work. The Freifunk organization is
> planning work on the IP/UDP encapsulation kernel module as a GSoC
> project. The idea is to create a IP-in-UDP tunnel like we do for
> IP-in-IP or IP-in-GRE tunnels. The only way to do that today is to use
> some VPN software.
> 
> The module will export its virtual interface through sockets and will
> have support for the standard syscalls like the others encapsulation
> modules.
> 
> It will improve the performance of mesh networks that will we be able
> to use IP-in-UDP rather than IP-in-IP.

I'm a bit confused. How can tunnelling IP in UDP in IP be faster than IP in IP?


> So, instead of push all data to
> local gateway into the mesh all the data can be tunneled to a faster
> server and from there to the Internet. With all the data exiting with
> the same IP address (the fast server IP). That will improve bandwidth,
> especially for upload.
> 
> Is such module acceptable for merge into the Linux Kernel?
> 
> Any comments or suggestions to the module architecture and
> implementation? If you want more information about the module I can
> provide that.
> 
> Regards,
> 
> -- 
> Gustavo F. Padovan
> http://padovan.org
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: IP/UDP encapsulation
  2010-04-08  9:48 ` Mark Smith
@ 2010-04-08 10:29   ` Eric Dumazet
  2010-04-08 10:39     ` ZioPRoTo (Saverio Proto)
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2010-04-08 10:29 UTC (permalink / raw)
  To: Mark Smith
  Cc: Gustavo F. Padovan, netdev, marco bonola,
	ZioPRoTo (Saverio Proto), Behling Mario, L. Aaron Kaplan

Le jeudi 08 avril 2010 à 19:18 +0930, Mark Smith a écrit :
> On Thu, 8 Apr 2010 04:42:47 -0300
> "Gustavo F. Padovan" <gustavo@padovan.org> wrote:
> 
> > Hi,
> > 
> > I'm looking for some advice on that work. The Freifunk organization is
> > planning work on the IP/UDP encapsulation kernel module as a GSoC
> > project. The idea is to create a IP-in-UDP tunnel like we do for
> > IP-in-IP or IP-in-GRE tunnels. The only way to do that today is to use
> > some VPN software.
> > 
> > The module will export its virtual interface through sockets and will
> > have support for the standard syscalls like the others encapsulation
> > modules.
> > 
> > It will improve the performance of mesh networks that will we be able
> > to use IP-in-UDP rather than IP-in-IP.
> 
> I'm a bit confused. How can tunnelling IP in UDP in IP be faster than IP in IP?
> 

Maybe the 'gateway' doesnt handle IPIP at all ;)

Until 2.6.32, IPIP tunnels were not so scalable then UDP (RCU enabled)
ipip_rcv() was hitting a global rwlock

git describe 8f95dd63a2ab6fe7243c4f0bd2c3266e3a5525ab
v2.6.32-rc3-468-g8f95dd6




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

* Re: IP/UDP encapsulation
  2010-04-08 10:29   ` Eric Dumazet
@ 2010-04-08 10:39     ` ZioPRoTo (Saverio Proto)
  0 siblings, 0 replies; 5+ messages in thread
From: ZioPRoTo (Saverio Proto) @ 2010-04-08 10:39 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Mark Smith, Gustavo F. Padovan, netdev, marco bonola,
	Behling Mario, L. Aaron Kaplan

>> I'm a bit confused. How can tunnelling IP in UDP in IP be faster than IP in IP?
>>
>
> Maybe the 'gateway' doesnt handle IPIP at all ;)

Yes that's the point. IP in UDP is more supported. It has much an
easier way when your traffic travels over the Internet, and maybe you
have to pass some NAT. Some NAT will not handle at all IP in IP
packets.

IP in IP has of course less overhead but you can experience problems
and many network setups. This is why at Freifunk we are thinking of
developing this kernel module.

Regards

Saverio Proto

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

end of thread, other threads:[~2010-04-08 10:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08  7:42 IP/UDP encapsulation Gustavo F. Padovan
2010-04-08  7:58 ` Eric Dumazet
2010-04-08  9:48 ` Mark Smith
2010-04-08 10:29   ` Eric Dumazet
2010-04-08 10:39     ` ZioPRoTo (Saverio Proto)

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