-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pkg/lwip: use ztimer_msec instead of xtimer #17115
Conversation
May I squash? |
Yes, please go ahead. |
It appears you need to address this unrelated issue, pointed out by |
Maybe a void cast would be enough though...
Went with an alternative, let me know if it's OK with you or you prefer the ones you suggested. |
I would prefer either one of the suggested or the void cast you proposed. The initialization you use in your alternative introduces additional code (via an implicit |
tests/lwip/ip.c
Outdated
sizeof(addrstr))); | ||
break; | ||
} | ||
printf("unspecified source\n"); |
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.
I used c-conditionals and it seems to work, should I change de message here to something like inet unsupported
?
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.
since it continues the "Received IP data from" line, maybe say "unsupported protocol" ?
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.
[…] maybe say "unsupported protocol" ?
Maybe, to immediately give a hint what is missing "unsupported protocol IPv4"/"unsupported protocol IPv6"?
I am not familiar with the timer implementations, but the changes look reasonable to me |
May I squash? |
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.
Yes please.
515573a
to
a33271d
Compare
Hmm those |
@miri64 how can we get this unblocked? It seems from you testing that this is failing independent of this PR |
Where is the block? The only NACK I see was addressed AFAIK. I do not have much time for review, so please, if a reviewer can be found, go ahead. |
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.
Looks good
But fails:
tests/lwip$ LWIP_IPV4=1 make
is failing
@@ -174,7 +174,7 @@ static int tcp_send(char *data, unsigned int num, unsigned int delay) | |||
else { | |||
printf("Success: send %u byte over TCP to server\n", (unsigned)data_len); | |||
} | |||
xtimer_usleep(delay); | |||
ztimer_sleep(ZTIMER_USEC, delay); |
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.
something like
d5dee30
is missing here but this might be an oportunity for another PR
ztimer_sleep(ZTIMER_USEC, delay); | |
if( i+1 < num) ztimer_sleep(ZTIMER_USEC, delay); |
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.
see #17115 (comment)
@@ -121,7 +121,7 @@ static int udp_send(char *addr_str, char *data, unsigned int num, | |||
printf("Success: send %u byte over UDP to %s\n", | |||
(unsigned)data_len, addr_str); | |||
} | |||
xtimer_usleep(delay); | |||
ztimer_sleep(ZTIMER_USEC, delay); |
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.
something like
d5dee30
is missing here but this might be an oportunity for another PR
ztimer_sleep(ZTIMER_USEC, delay); | |
if( i+1 < num) ztimer_sleep(ZTIMER_USEC, delay); |
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.
True but IMO not worth it, this is just for the test, the actual module is only using msec
tests/lwip/ip.c
Outdated
ipv6_addr_to_str(addrstr, | ||
(ipv6_addr_t *)&src.addr.ipv6, | ||
sizeof(addrstr))); | ||
if (IS_USED(MODULE_LWIP_IPV6)) { |
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.
this does not do as intended:
tests/lwip$ LWIP_IPV4=1 make
tests/lwip/ip.c: In function ‘_ip_recv’:
tests/lwip/ip.c:74:74: error: ‘union <anonymous>’ has no member named ‘ipv6’; did you mean ‘ipv4’?
74 | (ipv6_addr_t *)&src.addr.ipv6,
| ^~~~
| ipv4
Hmm strange that this was not caught before... |
55770f9
to
19a28ad
Compare
Thanks for testing @kfessel, I pushed and squashed the fixup => new build triggered (good idea anyway since this PR was old) |
btw.: |
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.
looking good wait for murdock
Well seems like another xtimer call was added in the meantime... good we ran the ci again |
I'll have to rebase to fix this |
fe1fefd
to
409d5df
Compare
@kfessel seems like re-triggering the python job is not enough... maybe I need to rebase, can I skip the ci build? |
For reference last build was yesterday https://ci.riot-os.org/RIOT-OS/RIOT/17115/409d5df061a95787f4136461d74c40c9f4c33cce/output.html:
|
409d5df
to
8516e25
Compare
I rebased and now the static job failed, I let you device if we let the ci run again @kfessel |
There is no reason to compile again #17115 (comment) murdock says it is green and i trust that this is just a rebase |
Did you test IPv4 and dual stack as well? ;-) |
the provided lwip/test/run.py is not able to test IPv4, but since there are only timer changes left keeping every thing else the same i assume they work the same as before before ACK I redid the build test: #17115 (comment) |
Re-run of native tests as @miri64 did in #17145 I ran for all combinations, all still passing for test in tests/lwip_sock_{ip,tcp,udp}/; do
for ipv6 in 0 1; do
for ipv4 in 0 1; do
if [ $((ipv4 + ipv6)) -eq 0 ]; then
continue
fi
LWIP_IPV4=${ipv4} LWIP_IPV6=${ipv6} make -C ${test} flash -j test || break
done
done
done
|
You have fingers to type ;-). Since you need DHCP for it, most likely, it is hard to automate. |
For the moment i think we can trust the lwip_socket_.. test done by @fjmolinas and keep the ACK I tested the aspect that changed in the in the lwip test and it failed that -> that specific aspect change was undone -> it succeeded, the rest are 1 for 1 timer changes. most of our current ztimer transitions ignore #17614, -and ai was a bit hassitant to ack any ztimer transition, but i think that is easier to account for that after a solution like #17607 is implemented and easier from ztimer -> ztimer taking the now issue into account that going the full path at once. (any move toward ztimer (especialy 32 or msec) is a huge improvement) |
GO! |
Contribution description
This package changes
lwip
to useztimer_msec
instead ofxtimer
.Testing procedure
Run all
tests/lwip*
teststest/lwip_sock_ip
test/lwip_sock_udp
test/lwip_sock_tcp
Related Issues
Ticks item off #13667