[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] ppp-new IP forwarding only works one direction (Etherne

From: Sylvain Rochet
Subject: Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)
Date: Fri, 11 Apr 2014 19:01:18 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Charles,

On Fri, Apr 11, 2014 at 12:13:02PM +0000, address@hidden wrote:
> Sylvain,
> I applied the new patch, but the following statement always cause Data 
> Abort exception run-time error. No matter I set ETH_PAD_SIZE to 0 or 
> 2. The good thing is my compiler doesn't generate any error message 
> for the new patch.
> *((ppp_pcb**)payload) = pcb;

Yeah, of course, there is an alignment problem here, pbuf->payload might 
be unaligned, here is a new patch with an helper packed struct which 
should fix the issue.

It was fine with a PBUF_RAW because the pointer was put deliberately in 
front of the buffer, buffer which was allocated on alignment by lwIP.

You don't need to set ETH_PAD_SIZE, this is not necessary.

> Another thing I am not so sure is the macro PPP_USE_PBUF_RAM. I always 
> set it to 1 in lwipopts.h, but I think the default is set to 0 in 
> opt.h. Am I doing the right thing?

Yes!, if you have a heap PPP_USE_PBUF_RAM is the option you should use, 
it allows you to use a smaller PBUF_POOL_BUFSIZE.


Attachment: 0002-check-ppp-forwarding-to-ethernet.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]