linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PPP state machine
@ 2004-06-16  5:52 Bhaskar-ROCSYS
  2004-06-16 12:06 ` James Carlson
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Bhaskar-ROCSYS @ 2004-06-16  5:52 UTC (permalink / raw)
  To: linux-ppp

Hi all,
I am trying to put the complete PPP state machine into the kernel space.

PPP implementation in linux is divided into kernel space code and user
space code.  The state machine is implemented in user space.  

I am trying to put the complete state machine into the kernel space and
make it work with Farsync card(V.35 interface).

Farsync depends on syncppp code which contains the implementation of the
PPP protocol.  But the code is not complete.  There is not
authentication phase and IPCP protocol implementation is not complete.

Is it possible to port the user space code to kernel space.  If so how
do I proceed.  
Did anyone tried this?


TIA

Regards
bhaskar






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

* PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
@ 2004-06-16 12:06 ` James Carlson
  2004-06-16 12:41 ` Bhaskar-ROCSYS
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: James Carlson @ 2004-06-16 12:06 UTC (permalink / raw)
  To: linux-ppp

Bhaskar-ROCSYS writes:
 > I am trying to put the complete PPP state machine into the kernel space.

The first big question to ask is "why?"  Why do you want to do this?
It will undoubtedly reduce functionality (it's hard to link to system
libraries or launch external helper programs from kernel space) and
lower system stability and security.  By far, the most complex piece
of PPP is the state machine and related support components.  Why would
anyone want these complex bits added to the kernel?

What is the problem being solved?  I don't think it can be a
performance issue, since the state machine is part of the control
path, and the entire data path is already in the kernel.

 > Farsync depends on syncppp code which contains the implementation of the
 > PPP protocol.  But the code is not complete.  There is not
 > authentication phase and IPCP protocol implementation is not complete.

I take it that this means that there's some third party code that
you're using that's designed this way.  I'd suggest changing that code
so that it just behaves as a normal synchronous interface, and use
pppd as it is.

 > Is it possible to port the user space code to kernel space.  If so how
 > do I proceed.  
 > Did anyone tried this?

Other than embedded systems, where there's often no kernel/user
distinction, I don't think so.

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

* Re: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
  2004-06-16 12:06 ` James Carlson
@ 2004-06-16 12:41 ` Bhaskar-ROCSYS
  2004-06-16 12:43 ` James Carlson
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bhaskar-ROCSYS @ 2004-06-16 12:41 UTC (permalink / raw)
  To: linux-ppp

Hi
First of all thanks for the response.

To answer to big question of "Why?", farsync card that I am using has 4
interfaces.  And the application in which i am working on may need all
the 4 interfaces to be up.
If I have to use the existing code, then I need to run 4 different
instances of pppd.  And if I want to use the same code, then I need to
go for a design similar to pppoe.  For such design i need to write code
both in kernel space and user space.
I decide to stick to kernel space and implement the complete state
machine in kernel space.  I am only interested in state machine.  Once
this is done I will initiate the state machine from the sync ppp code.

I think for implementing the state machine is independent of the mode.


Regards
bhaskar
On Wed, 2004-06-16 at 17:36, James Carlson wrote:
> Bhaskar-ROCSYS writes:
>  > I am trying to put the complete PPP state machine into the kernel space.
> 
> The first big question to ask is "why?"  Why do you want to do this?
> It will undoubtedly reduce functionality (it's hard to link to system
> libraries or launch external helper programs from kernel space) and
> lower system stability and security.  By far, the most complex piece
> of PPP is the state machine and related support components.  Why would
> anyone want these complex bits added to the kernel?

> 
> What is the problem being solved?  I don't think it can be a
> performance issue, since the state machine is part of the control
> path, and the entire data path is already in the kernel.
> 
>  > Farsync depends on syncppp code which contains the implementation of the
>  > PPP protocol.  But the code is not complete.  There is not
>  > authentication phase and IPCP protocol implementation is not complete.
> 
> I take it that this means that there's some third party code that
> you're using that's designed this way.  I'd suggest changing that code
> so that it just behaves as a normal synchronous interface, and use
> pppd as it is.
> 
>  > Is it possible to port the user space code to kernel space.  If so how
>  > do I proceed.  
>  > Did anyone tried this?
> 
> Other than embedded systems, where there's often no kernel/user
> distinction, I don't think so.



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

* Re: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
  2004-06-16 12:06 ` James Carlson
  2004-06-16 12:41 ` Bhaskar-ROCSYS
@ 2004-06-16 12:43 ` James Carlson
  2004-06-16 12:58 ` Paul Mackerras
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: James Carlson @ 2004-06-16 12:43 UTC (permalink / raw)
  To: linux-ppp

Bhaskar-ROCSYS writes:
 > Hi
 > First of all thanks for the response.
 > 
 > To answer to big question of "Why?", farsync card that I am using has 4
 > interfaces.  And the application in which i am working on may need all
 > the 4 interfaces to be up.
 > If I have to use the existing code, then I need to run 4 different
 > instances of pppd.

Right.  Is having four daemons a problem?  It makes the links easy to
administer and configure.  What's the problem being solved?

 >  And if I want to use the same code, then I need to
 > go for a design similar to pppoe.  For such design i need to write code
 > both in kernel space and user space.

Since you're talking about sync PPP, I don't understand the reference
to PPPoE.  PPPoE is a bit of an ugly hack that involves (on Linux)
multiple trips in and out of the kernel for the data path.  I don't
know why you'd want to do that.

The user space daemon already supports running on sync ports, and the
implementation is efficient -- it doesn't involve the pty tricks as
done for PPPoE.  The data path is all in the kernel.

As far as I can tell, you don't need to change anything in user space.
You just need a sync driver for your card.

 > I decide to stick to kernel space and implement the complete state
 > machine in kernel space.  I am only interested in state machine.  Once
 > this is done I will initiate the state machine from the sync ppp code.
 > 
 > I think for implementing the state machine is independent of the mode.

In that case, best of luck.

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

* Re: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
                   ` (2 preceding siblings ...)
  2004-06-16 12:43 ` James Carlson
@ 2004-06-16 12:58 ` Paul Mackerras
  2004-06-16 13:00 ` Paul Mackerras
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Paul Mackerras @ 2004-06-16 12:58 UTC (permalink / raw)
  To: linux-ppp

Bhaskar-ROCSYS writes:

> To answer to big question of "Why?", farsync card that I am using has 4
> interfaces.  And the application in which i am working on may need all
> the 4 interfaces to be up.
> If I have to use the existing code, then I need to run 4 different
> instances of pppd.  And if I want to use the same code, then I need to

Those 4 instances will share code, only the data pages will be private
to each process.  If you said you needed thousands of instances I
might have some sympathy.  If you really need to trim it down you
could link pppd against one of the smaller libc implementations that
are out there instead of using glibc.

> go for a design similar to pppoe.  For such design i need to write code
> both in kernel space and user space.
> I decide to stick to kernel space and implement the complete state
> machine in kernel space.  I am only interested in state machine.  Once
> this is done I will initiate the state machine from the sync ppp code.

Unfortunately the authors of the syncppp code in Linux have never
converted it to use the ppp_generic module.  That would be the correct
approach IMO.

I can't see any advantage to putting the state machine in the kernel
apart from saving a few pages of memory, and if memory is that tight,
why are you running Linux anyway?

Paul.

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

* Re: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
                   ` (3 preceding siblings ...)
  2004-06-16 12:58 ` Paul Mackerras
@ 2004-06-16 13:00 ` Paul Mackerras
  2004-06-16 17:51 ` Matthew N. Dodd
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Paul Mackerras @ 2004-06-16 13:00 UTC (permalink / raw)
  To: linux-ppp

James Carlson writes:

> Since you're talking about sync PPP, I don't understand the reference
> to PPPoE.  PPPoE is a bit of an ugly hack that involves (on Linux)
> multiple trips in and out of the kernel for the data path.

The ugly hack part is correct, but with the in-kernel pppoe module the
data path is at least entirely in the kernel. :)

Paul.

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

* RE: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
                   ` (4 preceding siblings ...)
  2004-06-16 13:00 ` Paul Mackerras
@ 2004-06-16 17:51 ` Matthew N. Dodd
  2004-06-17  4:23 ` James Cameron
  2004-06-17  4:33 ` Bhaskar-ROCSYS
  7 siblings, 0 replies; 9+ messages in thread
From: Matthew N. Dodd @ 2004-06-16 17:51 UTC (permalink / raw)
  To: linux-ppp

linux-ppp-owner@vger.kernel.org wrote:
> Unfortunately the authors of the syncppp code in Linux have
> never converted it to use the ppp_generic module.  That would be the
> correct approach IMO. 

Dan Eble wrote some code that allows the HDLC layer to interface with
the normal PPP code.

It works great.

Check list archives for patches.

--
Matthew N. Dodd <mdodd@patton.com>
Software Engineer, Patton Electronics
7622 Rickenbacker Dr., Gaithersburg,  MD 20879
(301) 975-1000x184


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

* Re: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
                   ` (5 preceding siblings ...)
  2004-06-16 17:51 ` Matthew N. Dodd
@ 2004-06-17  4:23 ` James Cameron
  2004-06-17  4:33 ` Bhaskar-ROCSYS
  7 siblings, 0 replies; 9+ messages in thread
From: James Cameron @ 2004-06-17  4:23 UTC (permalink / raw)
  To: linux-ppp

Matthew Dodd wrote:
> Dan Eble wrote some code that allows the HDLC layer to interface with
> the normal PPP code.  It works great.  Check list archives for
> patches.

Bhaskar wrote:
> Oh thats great.  Can I get the code ?

Process error.  Use the list archives.  Search.

http://marc.theaimsgroup.com/?l=linux-ppp&w=2&r=1&s=HDLC+Dan+Eble&q=b

Or use google.

http://www.google.com/search?q=hdlc%20%22dan%20eble%22

-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/

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

* RE: PPP state machine
  2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
                   ` (6 preceding siblings ...)
  2004-06-17  4:23 ` James Cameron
@ 2004-06-17  4:33 ` Bhaskar-ROCSYS
  7 siblings, 0 replies; 9+ messages in thread
From: Bhaskar-ROCSYS @ 2004-06-17  4:33 UTC (permalink / raw)
  To: linux-ppp

Oh thats great.  Can I get the code ?


Regards
bhaskar
On Wed, 2004-06-16 at 23:21, Matthew N. Dodd wrote:
> linux-ppp-owner@vger.kernel.org wrote:
> > Unfortunately the authors of the syncppp code in Linux have
> > never converted it to use the ppp_generic module.  That would be the
> > correct approach IMO. 
> 
> Dan Eble wrote some code that allows the HDLC layer to interface with
> the normal PPP code.
> 
> It works great.
> 
> Check list archives for patches.
> 
> --
> Matthew N. Dodd <mdodd@patton.com>
> Software Engineer, Patton Electronics
> 7622 Rickenbacker Dr., Gaithersburg,  MD 20879
> (301) 975-1000x184
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" 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] 9+ messages in thread

end of thread, other threads:[~2004-06-17  4:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-16  5:52 PPP state machine Bhaskar-ROCSYS
2004-06-16 12:06 ` James Carlson
2004-06-16 12:41 ` Bhaskar-ROCSYS
2004-06-16 12:43 ` James Carlson
2004-06-16 12:58 ` Paul Mackerras
2004-06-16 13:00 ` Paul Mackerras
2004-06-16 17:51 ` Matthew N. Dodd
2004-06-17  4:23 ` James Cameron
2004-06-17  4:33 ` Bhaskar-ROCSYS

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