-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Add civetweb HTTP sample #17019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add civetweb HTTP sample #17019
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously there are lot of things that would need ported to zephyr but generally this looks ok. Memory consumption seems to be quite high, I wonder if we could make it lower or is this the absolute minimum that we could have.
Yes, actually initially the stacks were quite small but we were getting a BUS fault every now and then (usually when handling a bigger request). To avoid that we just made them very large. The current settings are an overkill for sure. |
0a1daee
to
3d048ae
Compare
All checks are passing now. Review history of this comment for details about previous failed status. |
3d048ae
to
4b211c9
Compare
e3399f7
to
8fd4f40
Compare
431443d
to
4dd852e
Compare
4dd852e
to
eea4d47
Compare
This commit adds civetweb as a west module and a sample that uses it. Signed-off-by: Tomasz Gorochowik <[email protected]> Signed-off-by: Piotr Zierhoffer <[email protected]>
eea4d47
to
58f00fa
Compare
@pfalcon @tbursztyka could you review this patch, as well? |
I'm on vacation till next week. We already discussed this matter a lot, so I wouldn't give to -1, and if other folks don't spot small issues, it should be good to go. |
return zsock_recv(sock, buf, max_len, flags); | ||
} | ||
|
||
int socket(int family, int type, int proto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why re-declaring all these functions since include/net/socket.h does it already when CONFIG_NET_SOCKETS_OFFLOAD is not set. (and when it is, the offloading part provides these anyway).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
This PR adds support for CivetWeb - an external, POSIX-based HTTP library.
The form of this integration - filling the incompatibilities between CivetWeb and minimal libc - is a result of discussions on TSC and the networking forum, as described in #16683
Note that the additional hacky header only defines (and sometimes even declares) only the absolute minimum to get the sample to work.
Since the CivetWeb support for Zephyr is not yet merged, the west configuration points to our fork, thus - DNM.
It was tested on SAM E70 Xplained.
CC: @laperie @jukkar @PiotrZierhoffer @bel2125