-
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
drivers/slipdev: make use of chunked ringbuffer #18066
Conversation
Any results yet? |
7dc1283
to
b1c19c4
Compare
So far no improvements, but also no worse than master. (I tested |
Uh so this turns out to fix a gnarly pktbuf corruption issue with SLIP |
4ed7888
to
88db0e9
Compare
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.
From my POV (non-user of this driver):
- the change improves it:
reading in chunks enables the networkstack to check the size of the next chunck prior to requesting it making loss of packages less likely - and the readability (there is only one place the unescaping is done)
@benpicco: you may squash and make this ready for review |
180a449
to
a379450
Compare
a379450
to
81b5247
Compare
All squashed now. |
81b5247
to
9482882
Compare
9482882
to
db26bba
Compare
db26bba
to
fef861b
Compare
fef861b
to
f54d381
Compare
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.
Even if it may not be a performance increase,I can understand the new code better than the old code.
f54d381
to
1a888fe
Compare
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.
BOARD=same54-xpro UPLINK=slip make flash term
(gnrc_border_router)
> ping -c 10 -s 1000 fe80::1%6
ping -c 10 -s 1000 fe80::1%6
1008 bytes from fe80::1%6: icmp_seq=0 ttl=64 time=185.192 ms
ps
1008 bytes from fe80::1%6: icmp_seq=1 ttl=64 time=185.191 ms
1008 bytes from fe80::1%6: icmp_seq=2 ttl=64 time=185.160 ms
1008 bytes from fe80::1%6: icmp_seq=3 ttl=64 time=185.192 ms
1008 bytes from fe80::1%6: icmp_seq=4 ttl=64 time=185.189 ms
1008 bytes from fe80::1%6: icmp_seq=5 ttl=64 time=185.169 ms
1008 bytes from fe80::1%6: icmp_seq=6 ttl=64 time=185.157 ms
1008 bytes from fe80::1%6: icmp_seq=7 ttl=64 time=185.172 ms
1008 bytes from fe80::1%6: icmp_seq=8 ttl=64 time=185.264 ms
1008 bytes from fe80::1%6: icmp_seq=9 ttl=64 time=185.176 ms
--- fe80::1%6 PING statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 185.157/185.186/185.264 ms
> ps
pid | name | state Q | pri | stack ( used) ( free) | base addr | current
- | isr_stack | - - | - | 512 ( 256) ( 256) | 0x20000000 | 0x200001c8
1 | main | running Q | 7 | 1536 ( 936) ( 600) | 0x20000320 | 0x20000624
2 | 6lo | bl rx _ | 3 | 1024 ( 256) ( 768) | 0x20004664 | 0x20004964
3 | ipv6 | bl rx _ | 4 | 1024 ( 496) ( 528) | 0x200009fc | 0x20000c6c
4 | udp | bl rx _ | 5 | 512 ( 256) ( 256) | 0x20004a64 | 0x20004b64
5 | sam0_eth | bl anyfl _ | 2 | 896 ( 296) ( 600) | 0x20001988 | 0x20001c4c
6 | slipdev | bl anyfl _ | 2 | 896 ( 280) ( 616) | 0x20001e90 | 0x20002154
| SUM | | | 6400 ( 2776) ( 3624)
- works fine IMO
- code got cleaner
- PR has been open for a long time now and we also have been using it internally for that time
so let's have it merged
Contribution description
Just a test to see if this can increase performance with high data ingress.
But turns out this also solves two nasty SLIP bugs:
Testing procedure
SLIP should work as before, ideally a bit better.
Issues/PRs references
alternative to #18826, #18229