All of lore.kernel.org
 help / color / mirror / Atom feed
* CRC-16 or CRC-32
@ 2010-04-20  9:42 Arne Lie
  2010-04-20 14:16 ` Jan Just Keijser
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Arne Lie @ 2010-04-20  9:42 UTC (permalink / raw)
  To: linux-ppp

Hi,

A very basic question: does PPP v2.4.5 support CRC-16 or CRC-32 (or it may be configurable, in that case, how)?

Best regards


Arne Lie
SINTEF ICT, Dept. of Communication Systems
NO-7465 Trondheim, NORWAY
e-mail: arne.lie@sintef.no 


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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
@ 2010-04-20 14:16 ` Jan Just Keijser
  2010-04-20 14:38 ` Arne Lie
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jan Just Keijser @ 2010-04-20 14:16 UTC (permalink / raw)
  To: linux-ppp

Arne Lie wrote:
> Hi,
>
> A very basic question: does PPP v2.4.5 support CRC-16 or CRC-32 (or it may be configurable, in that case, how)?
>   
what exactly do you mean by CRC-16 or CRC-32? ( I know what CRC means )
BTW, the word 'crc' does not appear anywhere in the ppp source code.

cheers,

JJK / Jan Just Keijser


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

* RE: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
  2010-04-20 14:16 ` Jan Just Keijser
@ 2010-04-20 14:38 ` Arne Lie
  2010-04-20 14:49 ` Jan Just Keijser
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arne Lie @ 2010-04-20 14:38 UTC (permalink / raw)
  To: linux-ppp

Jan,

Hm, my observations are that if there are bit errors introduced in the PPP frame, the "ifconfig ppp0" will count such packets in the "error" tab. From this I anticipated that the PPP stack included CRC checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte. Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned. The question is, how does one select either? Perhaps it is not configurable via pppd?

Best regards


Arne Lie
SINTEF ICT, Dept. of Communication Systems
NO-7465 Trondheim, NORWAY
Dir. phone +47 73 59 27 03 - mobile +47 450 20 040
e-mail: arne.lie@sintef.no 



> -----Original Message-----
> From: Jan Just Keijser [mailto:jan.just.keijser@gmail.com]
> Sent: 20. april 2010 16:16
> To: Arne Lie
> Cc: linux-ppp@vger.kernel.org
> Subject: Re: CRC-16 or CRC-32
> 
> Arne Lie wrote:
> > Hi,
> >
> > A very basic question: does PPP v2.4.5 support CRC-16 or CRC-32 (or
> it may be configurable, in that case, how)?
> >
> what exactly do you mean by CRC-16 or CRC-32? ( I know what CRC means )
> BTW, the word 'crc' does not appear anywhere in the ppp source code.
> 
> cheers,
> 
> JJK / Jan Just Keijser


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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
  2010-04-20 14:16 ` Jan Just Keijser
  2010-04-20 14:38 ` Arne Lie
@ 2010-04-20 14:49 ` Jan Just Keijser
  2010-04-20 15:10 ` Milan P. Stanic
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jan Just Keijser @ 2010-04-20 14:49 UTC (permalink / raw)
  To: linux-ppp

Hi,

Arne Lie wrote:
> Jan,
>
> Hm, my observations are that if there are bit errors introduced in the PPP frame, the "ifconfig ppp0" will count such packets in the "error" tab. From this I anticipated that the PPP stack included CRC checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte. Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned. The question is, how does one select either? Perhaps it is not configurable via pppd?
>
>   
RFC2823 is about PPP SDL on SONET/SDH ; AFAIK the pppd code does not 
support this *at all* so I am not surprised that I did not find any 
references to CRCs in the headers...

So the short answer to your question would be: no, PPP v2.4.5 does not 
support CRC-16 or CRC-32.

HH,

JJK / Jan Just Keijser


>
>
>   
>> -----Original Message-----
>> From: Jan Just Keijser [mailto:jan.just.keijser@gmail.com]
>> Sent: 20. april 2010 16:16
>> To: Arne Lie
>> Cc: linux-ppp@vger.kernel.org
>> Subject: Re: CRC-16 or CRC-32
>>
>> Arne Lie wrote:
>>     
>>> Hi,
>>>
>>> A very basic question: does PPP v2.4.5 support CRC-16 or CRC-32 (or
>>>       
>> it may be configurable, in that case, how)?
>>     
>> what exactly do you mean by CRC-16 or CRC-32? ( I know what CRC means )
>> BTW, the word 'crc' does not appear anywhere in the ppp source code.
>>     


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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (2 preceding siblings ...)
  2010-04-20 14:49 ` Jan Just Keijser
@ 2010-04-20 15:10 ` Milan P. Stanic
  2010-04-21  6:56 ` Arne Lie
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Milan P. Stanic @ 2010-04-20 15:10 UTC (permalink / raw)
  To: linux-ppp

On Tue, 2010-04-20 at 16:49, Jan Just Keijser wrote:
> Arne Lie wrote:
> >Hm, my observations are that if there are bit errors introduced in the PPP frame, the "ifconfig ppp0" will count such packets in the "error" tab. From this I anticipated that the PPP stack included CRC checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte. Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned. The question is, how does one select either? Perhaps it is not configurable via pppd?
> >
> RFC2823 is about PPP SDL on SONET/SDH ; AFAIK the pppd code does not
> support this *at all* so I am not surprised that I did not find any
> references to CRCs in the headers...
> 
> So the short answer to your question would be: no, PPP v2.4.5 does
> not support CRC-16 or CRC-32.

In Linu CRC is done in kernel ppp driver not the ppp daemon.
ZLIB compression uses crc-32, AFAIR.

-- 
Kind regards,  Milan
--------------------------------------------------
Arvanta, IT Security        http://www.arvanta.net
Please do not send me e-mail containing HTML code.

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

* RE: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (3 preceding siblings ...)
  2010-04-20 15:10 ` Milan P. Stanic
@ 2010-04-21  6:56 ` Arne Lie
  2010-04-21  8:10 ` Jan Just Keijser
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arne Lie @ 2010-04-21  6:56 UTC (permalink / raw)
  To: linux-ppp

> -----Original Message-----
> From: linux-ppp-owner@vger.kernel.org [mailto:linux-ppp-
> owner@vger.kernel.org] On Behalf Of Milan P. Stanic
> Sent: 20. april 2010 17:10
> To: linux-ppp@vger.kernel.org
> Subject: Re: CRC-16 or CRC-32
> 
> On Tue, 2010-04-20 at 16:49, Jan Just Keijser wrote:
> > Arne Lie wrote:
> > >Hm, my observations are that if there are bit errors introduced in
> the PPP frame, the "ifconfig ppp0" will count such packets in the
> "error" tab. From this I anticipated that the PPP stack included CRC
> checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte.
> Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned.
> The question is, how does one select either? Perhaps it is not
> configurable via pppd?
> > >
> > RFC2823 is about PPP SDL on SONET/SDH ; AFAIK the pppd code does not
> > support this *at all* so I am not surprised that I did not find any
> > references to CRCs in the headers...
> >
> > So the short answer to your question would be: no, PPP v2.4.5 does
> > not support CRC-16 or CRC-32.
> 
> In Linu CRC is done in kernel ppp driver not the ppp daemon.
> ZLIB compression uses crc-32, AFAIR.
[Arne::] Milan, thanks for your information. Yes, the CRC is done in the kernel part of PPP. My question was how, of possible, one could select CRC-16 or CRC-32 to be activated using options when starting pppd (in a similar manner as one is able to select compression algorithm). In http://fixunix.com/ppp/62264-hdlc-like-framing.html James Carson says that the Solaris implementation of pppd make it possible to negotiate to CRC-32. I read your answer this way: by choosing the deflate compression algorithm, which I believe is using ZLIB, then we *are* using the CRC-32 since it defaults to this.
/Arne
> 
> --
> Kind regards,  Milan
> --------------------------------------------------
> Arvanta, IT Security        http://www.arvanta.net
> Please do not send me e-mail containing HTML code.
> --
> 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] 10+ messages in thread

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (4 preceding siblings ...)
  2010-04-21  6:56 ` Arne Lie
@ 2010-04-21  8:10 ` Jan Just Keijser
  2010-04-21  9:08 ` Milan P. Stanic
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jan Just Keijser @ 2010-04-21  8:10 UTC (permalink / raw)
  To: linux-ppp

Arne Lie wrote:
>> -----Original Message-----
>> From: linux-ppp-owner@vger.kernel.org [mailto:linux-ppp-
>> owner@vger.kernel.org] On Behalf Of Milan P. Stanic
>> Sent: 20. april 2010 17:10
>> To: linux-ppp@vger.kernel.org
>> Subject: Re: CRC-16 or CRC-32
>>
>> On Tue, 2010-04-20 at 16:49, Jan Just Keijser wrote:
>>     
>>> Arne Lie wrote:
>>>       
>>>> Hm, my observations are that if there are bit errors introduced in
>>>>         
>> the PPP frame, the "ifconfig ppp0" will count such packets in the
>> "error" tab. From this I anticipated that the PPP stack included CRC
>> checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte.
>> Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned.
>> The question is, how does one select either? Perhaps it is not
>> configurable via pppd?
>>     
>>> RFC2823 is about PPP SDL on SONET/SDH ; AFAIK the pppd code does not
>>> support this *at all* so I am not surprised that I did not find any
>>> references to CRCs in the headers...
>>>
>>> So the short answer to your question would be: no, PPP v2.4.5 does
>>> not support CRC-16 or CRC-32.
>>>       
>> In Linu CRC is done in kernel ppp driver not the ppp daemon.
>> ZLIB compression uses crc-32, AFAIR.
>>     
> [Arne::] Milan, thanks for your information. Yes, the CRC is done in the kernel part of PPP. My question was how, of possible, one could select CRC-16 or CRC-32 to be activated using options when starting pppd (in a similar manner as one is able to select compression algorithm). In http://fixunix.com/ppp/62264-hdlc-like-framing.html James Carson says that the Solaris implementation of pppd make it possible to negotiate to CRC-32. I read your answer this way: by choosing the deflate compression algorithm, which I believe is using ZLIB, then we *are* using the CRC-32 since it defaults to this.
> /Arne
>   
ah I've learned something myself here :)

unpacked the linux sources (2.6.28 which I had at hand) and checked the 
ppp module code:

ppp_async includes some CRC support BUT it only supports 
'crc_ccitt_byte' which is a 16bit CRC. The problem now is, which CRC32 
needs to be suppported? according to
  http://en.wikipedia.org/wiki/Cyclic_redundancy_check

"there are three polynomials reported for CRC-12, thirteen conflicting 
definitions of CRC-16, and six of CRC-32"

the second problem is: if you want to add CRC32 support then you'd have 
to get it into the linux kernel . that will take *quite* some time 
(unless you can live with patched linux kernels).

cheers,

JJK / Jan Just Keijser


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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (5 preceding siblings ...)
  2010-04-21  8:10 ` Jan Just Keijser
@ 2010-04-21  9:08 ` Milan P. Stanic
  2010-04-21  9:17 ` Milan P. Stanic
  2010-04-23  3:46 ` James Carlson
  8 siblings, 0 replies; 10+ messages in thread
From: Milan P. Stanic @ 2010-04-21  9:08 UTC (permalink / raw)
  To: linux-ppp

On Wed, 2010-04-21 at 08:56, Arne Lie wrote:
> > -----Original Message-----
> > From: linux-ppp-owner@vger.kernel.org [mailto:linux-ppp-
> > owner@vger.kernel.org] On Behalf Of Milan P. Stanic
> > Sent: 20. april 2010 17:10
> > To: linux-ppp@vger.kernel.org
> > Subject: Re: CRC-16 or CRC-32
> > 
> > On Tue, 2010-04-20 at 16:49, Jan Just Keijser wrote:
> > > Arne Lie wrote:
> > > >Hm, my observations are that if there are bit errors introduced in
> > the PPP frame, the "ifconfig ppp0" will count such packets in the
> > "error" tab. From this I anticipated that the PPP stack included CRC
> > checking of its payload. By CRC-16 I mean 2 byte CRC, CRC-32 4 byte.
> > Our customer wants 4 byte CRC. From RFC2823 I see both are mentioned.
> > The question is, how does one select either? Perhaps it is not
> > configurable via pppd?
> > > >
> > > RFC2823 is about PPP SDL on SONET/SDH ; AFAIK the pppd code does not
> > > support this *at all* so I am not surprised that I did not find any
> > > references to CRCs in the headers...
> > >
> > > So the short answer to your question would be: no, PPP v2.4.5 does
> > > not support CRC-16 or CRC-32.
> > 
> > In Linu CRC is done in kernel ppp driver not the ppp daemon.
> > ZLIB compression uses crc-32, AFAIR.

> [Arne::] Milan, thanks for your information. Yes, the CRC is done in
> the kernel part of PPP. My question was how, of possible, one could
> select CRC-16 or CRC-32 to be activated using options when starting
> pppd (in a similar manner as one is able to select compression
> algorithm). In http://fixunix.com/ppp/62264-hdlc-like-framing.html
> James Carson says that the Solaris implementation of pppd make it
> possible to negotiate to CRC-32.

CRC is just mathematical method to calculate some number. It would be
better to use term FCS (Frame Check Sequence) to avoid ambiguities.
FCS can be null, 16 and 32 bit. Default is 16 bit and if peers cannot
negotiate other values this is default.

To have 32bit FCS in Linux kernel and ppp daemon you (or someone who
could be paid or volunteer) should add it to the kernel driver and add
configuration option to the ppp daemon to signal kernel driver that it
wants/prefer 32/16/null FCS.

There are RFCs which describes what CRC and LCP should/must be used for
all that stuff.

> I read your answer this way: by choosing the deflate compression
> algorithm, which I believe is using ZLIB, then we *are* using the
> CRC-32 since it defaults to this.

No. ZLIB is used in data compression and not in link layer, but I
could be wrong.

-- 
Kind regards,  Milan
--------------------------------------------------
Arvanta, IT Security        http://www.arvanta.net
Please do not send me e-mail containing HTML code.

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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (6 preceding siblings ...)
  2010-04-21  9:08 ` Milan P. Stanic
@ 2010-04-21  9:17 ` Milan P. Stanic
  2010-04-23  3:46 ` James Carlson
  8 siblings, 0 replies; 10+ messages in thread
From: Milan P. Stanic @ 2010-04-21  9:17 UTC (permalink / raw)
  To: linux-ppp

On Wed, 2010-04-21 at 10:10, Jan Just Keijser wrote:
> ppp_async includes some CRC support BUT it only supports
> 'crc_ccitt_byte' which is a 16bit CRC. The problem now is, which
> CRC32 needs to be suppported? according to

CCITT versions according to the RFC1570.

>  http://en.wikipedia.org/wiki/Cyclic_redundancy_check
> 
> "there are three polynomials reported for CRC-12, thirteen
> conflicting definitions of CRC-16, and six of CRC-32"
> 
> the second problem is: if you want to add CRC32 support then you'd
> have to get it into the linux kernel . that will take *quite* some
> time (unless you can live with patched linux kernels).

It wouldn't be so hard to push it to the kernel because Paul Mackerras
is/was on this list and he is the ppp driver maintainer, I hope ;)

-- 
Kind regards,  Milan
--------------------------------------------------
Arvanta, IT Security        http://www.arvanta.net
Please do not send me e-mail containing HTML code.

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

* Re: CRC-16 or CRC-32
  2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
                   ` (7 preceding siblings ...)
  2010-04-21  9:17 ` Milan P. Stanic
@ 2010-04-23  3:46 ` James Carlson
  8 siblings, 0 replies; 10+ messages in thread
From: James Carlson @ 2010-04-23  3:46 UTC (permalink / raw)
  To: linux-ppp

On 4/21/2010 5:17 AM, Milan P. Stanic wrote:
> On Wed, 2010-04-21 at 10:10, Jan Just Keijser wrote:
>> the second problem is: if you want to add CRC32 support then you'd
>> have to get it into the linux kernel . that will take *quite* some
>> time (unless you can live with patched linux kernels).
> 
> It wouldn't be so hard to push it to the kernel because Paul Mackerras
> is/was on this list and he is the ppp driver maintainer, I hope ;)

It's a little tricky to implement the feature *well*.  You have to be
able to withstand your peer restarting -- which means that while you're
in CRC-32 mode, you have to be able to accept and process an LCP
Configure-Request frame with a CRC-16 FCS on it -- and you need to be
tolerant of peers that are unable to handle switching -- which means
sending LCP Configure-Request messages with more than one FCS.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

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

end of thread, other threads:[~2010-04-23  3:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  9:42 CRC-16 or CRC-32 Arne Lie
2010-04-20 14:16 ` Jan Just Keijser
2010-04-20 14:38 ` Arne Lie
2010-04-20 14:49 ` Jan Just Keijser
2010-04-20 15:10 ` Milan P. Stanic
2010-04-21  6:56 ` Arne Lie
2010-04-21  8:10 ` Jan Just Keijser
2010-04-21  9:08 ` Milan P. Stanic
2010-04-21  9:17 ` Milan P. Stanic
2010-04-23  3:46 ` James Carlson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.