Hi Andrew !

Happy to see someone else tried to play with the rpi ;)
I'm guilty for the initial work 1 year ago, but as you saw, I did not tried to 
keep up with the development.

For the rpi timercode, it was mainly to have something standard, based on the 
aarch32 arch, but one thing worth mentioning is that I used a rpi2 (which is 
not a aarch64 running in aarch32 mode.)
But this does not exclude a specific mess-up from my side ;)


-----Original Message-----
From: vpp-dev@lists.fd.io [mailto:vpp-dev@lists.fd.io] On Behalf Of Andrew 
Sent: Tuesday, February 13, 2018 6:29 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Experiments in compiling and running VPP on Raspberry Pi 

Hi all,

This past weekend (which coincided with the start of my vacation) I have 
decided to spend a day to see if I can get VPP to compile and run on Raspberry 

After a few cuts with a blunt pen knife, I got it working - it compiles 
entirely on RPi 3 itself and I can get it to the "make run", create tap 
interfaces, and ping the linux side. Other than also testing VAT (it works. I 
could create a couple of ACLs/assign them to interfaces) I did not yet test 
anything more sophisticated, so - no warranties whatsoever ! :-)

I had a "real" HDD mounted as a checkout root - not sure how well it would work 
using the flash, but probably should not be a problem. The only other thing 
worth mentioning - I learned RPi has a "thermometer" onscreen display sign, 
during the compile :-) The temperature of the CPU has reached 84C (aka "don't 
touch!"), that was *with* the heatsink. So, ensure you have a good heat sink !

I've captured the current state of my experiments here:


I boot the RPi with the additional "isolcpus=2,3" on the kernel command line. I 
didn't test yet without that change. For the rest - it's a vanilla Raspbian 
Lite image.

One note: reading the archives / wiki
I saw the mention of the kernel module. When I ran the code with it, I saw very 
flaky behavior, and frequent lockups/crashes.

My debugging concluded that probably having the rdtsc deltas over a one second 
interval vary more than 10x over the consecutive periods of time is what makes 
the timer code very unhappy. Not sure if this is specific to the hardware I 
have or to the way it works in RPi in general.

Anyway, I found a way to create a very crude but more stable replacement - RPi 
appears to have a 64-bit 1Mhz free-running timer/counter. Multiply that value 
by 1200... With that there were no more mysterious instabilities/crashes. As a 
bonus - no need to load the kernel module, so the process is simpler. Probably 
the performance implications of that for running on Pi will be nontrivial, but 
it is surely better than crashing.

Next 2.5 weeks I won't hack on this further (sightseeing/skiing will take 
precedence - vacation!), so figured I'll use this time to hear what you all 
think :-)



You receive all messages sent to this group.

View/Reply Online (#8199): https://lists.fd.io/g/vpp-dev/message/8199
View All Messages In Topic (2): https://lists.fd.io/g/vpp-dev/topic/11145503
Mute This Topic: https://lists.fd.io/mt/11145503/21656
New Topic: https://lists.fd.io/g/vpp-dev/post

Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656
Group Home: https://lists.fd.io/g/vpp-dev
Contact Group Owner: vpp-dev+ow...@lists.fd.io
Terms of Service: https://lists.fd.io/static/tos
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub

Reply via email to