Hacker News new | ask | show | jobs
by fargle 654 days ago
the stack itself is extremely solid and works perfectly with reasonable performance. the codebase is extremely stable and has not had major changes, nor significant bugs in ages.

the biggest problem with lwip is the documentation. you have doxygen API docs that tell you exactly what the interfaces are (and not much more than the reading the header filed does), you have a few pages of "how to ..." and higher level background. but often it's slightly bit rotted, subtly hasn't kept up with design changes. so it's difficult to learn - you effectively have to thoroughly read the code to get the big picture. and if you make a mistake in handling your application callbacks, you can easily leak buffers or create other problems. it's not "awful to use", it's actually very simple - once you understand it, which is seriously hampered by truly lacking documentation.

the second issue is that the SoC vendors inevitably pay some overseas contractor to do the port and MAC/PHY drivers and example code, just like another [1] comment describes. that's where a lot of the instability and bugs come in. it's not lwip, it's the port that sucks.

[1] https://news.ycombinator.com/item?id=41462602

1 comments

My experience comes from actually writing the ports as opposed to using it in other places. I’ve gotten issues like the UDP checksum generation breaking in the raw API at higher speeds or DHCP packets managing to come out corrupted, and in both cases I fixed it by just replacing the code that’s responsible. I’m not claiming this is representative of anything in general however, these are all for somewhat esoteric networking analysis in an academic setting. It definitely works well when you just use it as intended on microcontrollers however and I’ve never had issues when I’m not doing awful things to it :)