[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: |
LMao |
Subject: |
Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP) |
Date: |
Fri, 11 Apr 2014 18:21:09 +0000 |
Sylvain,
Great, the latest patch works. Thank you very much.
Charles
-----Original Message-----
From: address@hidden [mailto:address@hidden 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, 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.
Sylvain
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), (continued)
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/11
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/11
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP),
LMao <=
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/11
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/12
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/14
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/14
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), LMao, 2014/04/15
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/15
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Simon Goldschmidt, 2014/04/10
- Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP), Sylvain Rochet, 2014/04/10