Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello Charles, On Wed, Apr 09, 2014 at 06:47:43PM +, l...@moog.com wrote: My test setup is like this: Ethernet PPP PC - My gateway device Linux PPP server 192.168.0.211

Re: [lwip-users] raw api tcp_write()ing small chunks fills snd_queue

2014-04-10 Thread Simon Goldschmidt
Sergio R. Caprile wrote: I have this raw api application which tcp_write()s 5 small (~20 bytes) messages and then checks tcp_sndbuf() to send the biggest possible chunk, but it ends up having to send a smaller chunk because an internal queue gets full. Actually, you have to understand

[lwip-users] MEM TCPIP_MSG_INPKT

2014-04-10 Thread Guy Eschemann
Hello, while trying to track down the performance bottlenecks of my lwIP instance, the following section in the stats display caught my attention: MEM TCPIP_MSG_INPKT avail: 8 used: 0 max: 8 err: 2 What parameter do I have to change to increase the number of

Re: [lwip-users] MEM TCPIP_MSG_INPKT

2014-04-10 Thread Simon Goldschmidt
Guy Eschemann wrote: What parameter do I have to change to increase the number of TCPIP_MSG_INPKT? MEMP_NUM_TCPIP_MSG_INPKT Simon ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] raw api tcp_write()ing small chunks fills snd_queue

2014-04-10 Thread Sergio R. Caprile
Thank you Simon, your words now populate the wiki -- ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Hi Sylvain, Thank you for your reply. I really appreciate your help. The below are a few comments and more observations. Well, ip_forward() should call netif-output(), which in our case is ppp_netif_output_ip4(), could you first check that ? Sorry, I may confuse you about which direction the

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Sylvain, It seems the patch makes things worse - PPP connection couldn’t build-up anymore. Below is the complete log message after applying the patch. It seems the code stalled at very early stage. *** FreeRTOS Demo Started! *** netif_set_ipaddr: netif addrnetif: IP address of interface set

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Simon Goldschmidt
Sylvain Rochet wrote: Oh dear, now I see what is happening. PPP header is smaller than Ethernet header [..] This is actually a lwIP design issue, the only way we can fix that is by adding a configuration option so pbuf from PPP are allocated with enough extra space so a Ethernet header

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello Simon, On Thu, Apr 10, 2014 at 08:12:00PM +0200, Simon Goldschmidt wrote: Sylvain Rochet wrote: Oh dear, now I see what is happening. PPP header is smaller than Ethernet header [..] This is actually a lwIP design issue, the only way we can fix that is by adding a configuration

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Below is more debug information and hope it's helpful for fixing the problem. Regarding the code stalled at early stage, that's hardware related. I am using ARM7 (AT91SAM7 to be specific), so the data alignment is 4 and PBUF_LINK_HLEN is 14 by default, so I replaced all PBUF_LINK_HLEN in the

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello Charles, On Thu, Apr 10, 2014 at 05:30:12PM +, l...@moog.com wrote: Sylvain, It seems the patch makes things worse - PPP connection couldn’t build-up anymore. Below is the complete log message after applying the patch. It seems the code stalled at very early stage. Hummm, this

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread S G
Sylvain Rochet wrote: PPPoE use PBUF_LINK, PPPoL2TP use PBUF_TRANSPORT, PPPoS use PBUF_RAW, it all makes sense at first sight and IP forwarding should work for PPPoE and PPPoL2TP. Maybe we should allocate a PBUF_LINK for PPPoS as well. That would be a good idea for the forwarding case, I

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello Charles, On Thu, Apr 10, 2014 at 06:37:02PM +, l...@moog.com wrote: Below is more debug information and hope it's helpful for fixing the problem. Regarding the code stalled at early stage, that's hardware related. I am using ARM7 (AT91SAM7 to be specific), so the data alignment is

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Hi Sylvain, Good news, I got it work with your patch plus the replacement of (PBUF_LINK_HLEN +2), however, set ETH_PAD_SIZE to 2 actually doesn't work. It seems fail at ARP and infinitely repeat with the following debug messages: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc,

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello Charles, On Thu, Apr 10, 2014 at 08:03:13PM +, l...@moog.com wrote: Hi Sylvain, Good news, I got it work with your patch Yeah, happy to hear that. Here is another patch, which should fix the issue in a way that can be pushed to the repository, would you test it ? plus the

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread Sylvain Rochet
Hello, On Thu, Apr 10, 2014 at 08:44:43PM +0200, S G wrote: Sylvain Rochet wrote: PPPoE use PBUF_LINK, PPPoL2TP use PBUF_TRANSPORT, PPPoS use PBUF_RAW, it all makes sense at first sight and IP forwarding should work for PPPoE and PPPoL2TP. Maybe we should allocate a PBUF_LINK for PPPoS

Re: [lwip-users] need help building netio server

2014-04-10 Thread Sergio R. Caprile
If you arrive here looking for something on the netio server, yes, the one in contrib (at least upto 1.4.1) is incomplete. There's one guy who submitted patch #7026 with a full server; however, that server reacts with one write to each ACK it gets, and so its output throughput is very low. I