Skip to content
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

Flapping bitrates on 32-bit systems, possible overflow? #15

Open
fivesixzero opened this issue Aug 31, 2021 · 0 comments
Open

Flapping bitrates on 32-bit systems, possible overflow? #15

fivesixzero opened this issue Aug 31, 2021 · 0 comments

Comments

@fivesixzero
Copy link

Hi, and thanks for taking the time to create this. Its saved me a bunch of time while working on some validation of a new homelab setup with a bunch of Mikrotik gear today!

While testing I ran into some weird behavior with bitrates greater than ~4.2 Gbps on a 32-bit arm7l system - a QNAP TS-431KX NAS running an Anapurna Labs AL214 quad Cortex-A15 @ 1.7 GHz CPU. However, I was able to work around this by manually setting the bandwidth to less than 4295M.

[~/btest-opensource] # ./btest -c 192.168.88.1 -t -b 4295M
Tx speed: 32704
Interval:  1:0
gettime:  13511:660314092
Remote: Seq: 2550136833, Rate: 1551.6Mb/s
Remote: Seq: 2399141890, Rate: 0.0kb/s
Remote: Seq: 2382364675, Rate: 0.0kb/s
Remote: Seq: 2399141892, Rate: 0.0kb/s
^C
[~/btest-opensource] # ./btest -c 192.168.88.1 -t -b 4294M
Tx speed: 4294000000
Interval:  0:16767
gettime:  13541:760491272
Remote: Seq: 2583691265, Rate: 4288.0Mb/s
Remote: Seq: 2684354562, Rate: 4291.9Mb/s
Remote: Seq: 2667577347, Rate: 4294.1Mb/s
Remote: Seq: 2684354564, Rate: 4294.2Mb/s
^C

Its been a long time since I've worked in C so I'm not sure I'll be able to cook up a proper PR for a fix (sorry!) but it feels like an overflow. I did take a few runs at a fix (tried moving a few things from 'lu' to 'llu', for instance) but had no success in the time I've got available today. Probably not a huge deal given that there can't be many 32-bit platforms with 5G/10G network support out there anyway.

At the very least I hope the workaround here is helpful for anyone else that's crazy enough to try using btest on a 10G-equipped 32-bit ARM platform. 😂

p.s. - To get btest working with higher bitrates I had to change the hard-coded tx_size of 1500 to match my jumbo frame MTU of 9000 to avoid choking the tx system with packet generation overhead. At 1500 the QNAP system could do about Might be worth making that a command-line option but its easy enough to just edit btest.c and recompile I guess. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant