Sylvain, Great, the latest patch works. Thank you very much.
Charles -----Original Message----- From: lwip-users-bounces+cmao=moog....@nongnu.org [mailto:lwip-users-bounces+cmao=moog....@nongnu.org] On Behalf Of Sylvain Rochet Sent: Friday, April 11, 2014 2:01 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP) Hello Charles, On Fri, Apr 11, 2014 at 12:13:02PM +0000, l...@moog.com 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. Sylvain _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users