Re: [PATCH v8] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)

Previous thread: [PATCH v8] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol) by Dmitry Kozlov on Friday, August 20, 2010 - 11:36 pm. (1 message)

Next thread: [PATCH] mlx4: use bitmap library by Akinobu Mita on Saturday, August 21, 2010 - 2:24 am. (4 messages)
From: Dmitry Kozlov
Date: Friday, August 20, 2010 - 11:40 pm

PPP: introduce "pptp" module which implements point-to-point tunneling protocol using pppox framework
NET: introduce the "gre" module for demultiplexing GRE packets on version criteria 
     (required to pptp and ip_gre may coexists)
NET: ip_gre: update to use the "gre" module

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
---
This patch introduces then pptp support to the linux kernel which dramatically speeds up pptp vpn connections and decreases cpu usage in comparison of existing user-space implementation (poptop/pptpclient). There is accel-pptp project (https://sourceforge.net/projects/accel-pptp/) to utilize this module, it contains plugin for pppd to use pptp in client-mode and modified pptpd (poptop) to build high-performance pptp NAS.

There was many changes from initial submitted patch, most important are:
1. using rcu instead of read-write locks
2. using static bitmap instead of dynamically allocated
3. using vmalloc for memory allocation instead of BITS_PER_LONG + __get_free_pages
4. fixed many coding style issues
Thanks to Eric Dumazet.

--
 MAINTAINERS              |   14 +
 drivers/net/Kconfig      |   11 +
 drivers/net/Makefile     |    1 +
 drivers/net/pptp.c       |  726 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/if_pppox.h |   59 +++--
 include/net/gre.h        |   18 ++
 net/ipv4/Kconfig         |    7 +
 net/ipv4/Makefile        |    1 +
 net/ipv4/gre.c           |  151 ++++++++++
 net/ipv4/ip_gre.c        |   14 +-
 10 files changed, 975 insertions(+), 27 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 02f75fc..cdae013 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6450,6 +6450,20 @@ M:	"Maciej W. Rozycki" <macro@linux-mips.org>
 S:	Maintained
 F:	drivers/serial/zs.*
 
+GRE DEMULTIPLEXER DRIVER
+M:	Dmitry Kozlov <xeb@mail.ru>
+L:	netdev@vger.kernel.org
+S:	Maintained
+F:	net/ipv4/gre.c
+F:	include/net/gre.h
+
+PPTP DRIVER
+M:	Dmitry Kozlov ...
From: Eric Dumazet
Date: Saturday, August 21, 2010 - 12:49 am

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks Dmitry !



--

From: Dmitry Kozlov
Date: Saturday, August 21, 2010 - 2:17 am

What is the next step ?
--

From: Eric Dumazet
Date: Saturday, August 21, 2010 - 2:31 am

David S. Miller review the thing, and if no problem remains, adds it to
its net-next-2.6 tree

You can check netdev list of current patches right here : 

http://patchwork.ozlabs.org/project/netdev/list/

Your patch is already there ;)



--

From: Dmitry Kozlov
Date: Saturday, August 21, 2010 - 4:24 am

Ah ok, thanks!

I see some unexpected symbols in mail's subject, maybe i have to resend mail with subject cleaned ?
--

From: Changli Gao
Date: Saturday, August 21, 2010 - 5:42 am

from Documentation/SubmittingPatches

 The "---" marker line serves the essential purpose of marking for patch
 handling tools where the changelog message ends.

I think the following lines from your patch are also useful, and you'd
better move them above the "---" marker.

 This patch introduces then pptp support to the linux kernel which
dramatically speeds up pptp vpn connections and decreases cpu usage in
comparison of existing user-space implementation (poptop/pptpclient).
There is accel-pptp project
(https://sourceforge.net/projects/accel-pptp/) to utilize this module,
it contains plugin for pppd to use pptp in client-mode and modified
pptpd (poptop) to build high-performance pptp NAS.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--

From: David Miller
Date: Saturday, August 21, 2010 - 11:01 pm

From: Changli Gao <xiaosuo@gmail.com>

I'll take care of this when applying his patch.

Also this patch was against net-2.6 or even something
earlier, so there were many patch rejects I had to fix
up against include/linux/if_pppox.h when applying this
to net-next-2.6

--

From: David Miller
Date: Saturday, August 21, 2010 - 11:03 pm

From: David Miller <davem@davemloft.net>

It also doesn't even build against anything even remotely
recent:

drivers/net/pptp.c: In function ‘pptp_xmit’:
drivers/net/pptp.c:204: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c:271: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c:279: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c:283: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c:288: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c: In function ‘pptp_connect’:
drivers/net/pptp.c:483: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c:485: error: ‘struct rtable’ has no member named ‘u’
drivers/net/pptp.c: In function ‘pptp_init_module’:
drivers/net/pptp.c:675: error: implicit declaration of function ‘__vmalloc’
drivers/net/pptp.c:676: warning: assignment makes pointer from integer without a cast
drivers/net/pptp.c:707: error: implicit declaration of function ‘vfree’

That means this patch is against a tree which is at least two
releases old.  We got rid of the 'u' member of struct rtable
quite some time ago.

Ugh, I'll fix this up, but after _8_, yes _EIGHT_, iterations of this
patch set the amount of problems that remain is completely
unbelievable.
From: Dmitry Kozlov
Date: Sunday, August 22, 2010 - 12:17 am

Sorry, maybe it is wrong, but i did patch using repository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git, HEAD at a63ecd835f075b21d7d5cef9580447f5fbb36263.
Have i update and resend it for net-next-2.6 ?
--

From: David Miller
Date: Sunday, August 22, 2010 - 12:39 am

From: Dmitry Kozlov <xeb@mail.ru>

I said "I'll fix this up" which means I'll take care of everything.

You should always make all patches against the tree that it will be
applied to.
--

From: David Miller
Date: Saturday, August 21, 2010 - 7:56 pm

From: Dmitry Kozlov <xeb@mail.ru>

No need.  Although in the future if you could post your patches
without koi8 encoding in the subject (that's the part of the subject
that patchwork can't parse properly) I would appreciate it.
--

Previous thread: [PATCH v8] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol) by Dmitry Kozlov on Friday, August 20, 2010 - 11:36 pm. (1 message)

Next thread: [PATCH] mlx4: use bitmap library by Akinobu Mita on Saturday, August 21, 2010 - 2:24 am. (4 messages)