Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #28867
| Newsgroups | comp.arch.embedded |
|---|---|
| From | Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> |
| Subject | Re: High packet rate ethernet with LwIP |
| References | (5 earlier) <qmasbq$ta$1@dont-email.me> <nnd$140f1721$6b899046@38585550e4395ef3> <qmf5of$jr1$1@dont-email.me> <nnd$5643ec2a$1c241815@0b4723ba5ecf5559> <qmflfo$cqo$1@dont-email.me> |
| Message-ID | <nnd$0f4675f3$33ebdb5d@47082012cdfd2a96> (permalink) |
| Organization | Newsxs |
| Date | 2019-09-25 15:22 +0200 |
On 2019-09-25 David Brown wrote in comp.arch.embedded: ... > What are your other lwip config numbers? I have: > > #define MEM_SIZE (48*1024) > #define MEMP_NUM_PBUF 32 > #define MEMP_NUM_UDP_PCB 6 > #define MEMP_NUM_TCP_PCB 128 > #define MEMP_NUM_TCP_PCB_LISTEN 8 > #define MEMP_NUM_TCP_SEG 16 > #define MEMP_NUM_SYS_TIMEOUT 10 > #define PBUF_POOL_SIZE 32 > #define PBUF_POOL_BUFSIZE 1518 In lwipopt.h: #define MEM_SIZE (32 * 1024) #define MEMP_NUM_SYS_TIMEOUT 300 #define PBUF_POOL_SIZE 64 Most were not in my lwipopt.h, so at default from opt.h: #define MEMP_NUM_PBUF 16 #define MEMP_NUM_UDP_PCB 4 #define MEMP_NUM_TCP_PCB 5 #define MEMP_NUM_TCP_PCB_LISTEN 8 #define MEMP_NUM_TCP_SEG 16 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN) The last one expands to: ((1460+40+14)+3) & ~3 = 1516 > I can't say I have studied the usage in detail, so I might have much > more than I need for some of these. But if any of your values are > hugely lower than mine, check them to be sure. /Something/ is giving > you memory allocation errors, and you need to find and fix that something. Tried changing MEMP_NUM_TCP_PCB, MEMP_NUM_PBUF and MEMP_NUM_SYS_TIMEOUT to your values, but no change in behaviour. > It is also possible that the rest of program structure means you are > getting slow handling of the packets - I can't guess anything about > that, because I don't know your code at all. It's just a loop calling the lwip handlers (the standard stand alone echo example) and a function that checks a timer for when to send a (dummy) packet. So really lightweight, just to test if I can get packets out at the required rate. I'm giving up the TCP version for now and go with the UDP, which seems to work fine (with the same settings). I'll give TCP another try some time. -- Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) No hardware designer should be allowed to produce any piece of hardware until three software guys have signed off for it. -- Andy Tanenbaum
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-20 18:27 +0200
Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-20 21:20 +0300
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 10:37 +0200
Re: High packet rate ethernet with LwIP Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-09-23 14:08 +0300
Re: High packet rate ethernet with LwIP Richard Damon <Richard@Damon-Family.org> - 2019-09-23 07:13 -0400
Re: High packet rate ethernet with LwIP Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-09-23 18:55 +0300
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 14:04 +0200
Re: High packet rate ethernet with LwIP Dimiter_Popoff <dp@tgi-sci.com> - 2019-09-23 17:03 +0300
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 18:37 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-24 14:22 +0200
Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-25 07:55 +0300
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 09:51 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 16:03 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 11:59 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 13:16 +0200
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 09:42 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 13:41 +0200
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 14:10 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 15:22 +0200
Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-23 22:26 +0300
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 22:16 +0200
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 23:08 +0200
Re: High packet rate ethernet with LwIP Joe Chisolm <jchisolm6@earthlink.net> - 2019-09-20 13:44 -0500
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 10:46 +0200
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-21 19:00 +0200
Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-22 00:01 +0300
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-22 09:06 +0200
Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-22 11:29 +0300
Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-22 23:24 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 11:10 +0200
Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 11:03 +0200
csiph-web