Re: BSD Sockets like API: prototyping report #2


Paul Sokolovsky
 

On Mon, 3 Apr 2017 18:55:36 +0300
Paul Sokolovsky <Paul.Sokolovsky@linaro.org> wrote:

[]

2. send() was easy, but only superficially. At BUD17 min-summit,
Tomasz told few times that current issue of Zephyr buffer management
is that it mixes low-level data chunking (into net_buf's) with
network-level chunking of user data into MTU units. I wasn't sure I
understand that, but now I see the issue very well. Actually, I don't
see where MTU chunking happens at all. As far as I can see,
net_nbuf_append(), passed 10K of data, will happily create a network
packet with so many fragments (as long as it'll get that many
fragments), but what force will send out such a monster?
Confirmed to be a known issue, as there was no dedicated ticket, I
created https://jira.zephyrproject.org/browse/ZEP-1998


[]

4. Back to recv(), not everything is happy either. I don't see how my
socket implementation could affect TCP flow control, and that needs to
be done by sockets (and not existing push-style IP stack) to avoid
being DoSed with too much packets. I'd take lwIP's solution of
letting the application to advance TCP receive window as a proven
one, and on which MicroPython's lwIP socket module is based.
Confirmed, ticketed as https://jira.zephyrproject.org/browse/ZEP-1999.
Neither there's a send window handling, ticketed as
https://jira.zephyrproject.org/browse/ZEP-2000.

[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join devel@lists.zephyrproject.org to automatically receive all group messages.