-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Networking/Filesystem: add 9P2000 network file client. #28977
base: master
Are you sure you want to change the base?
Conversation
e6a0b9c
to
679f835
Compare
Tested on CubeRed, works the same as SITL. |
('AP_NETWORKING_BACKEND_PPP', 'AP_Networking_PPP::init'), | ||
('AP_NETWORKING_CAN_MCAST_ENABLED', 'AP_Networking_CAN::start'), | ||
('AP_NETWORKING_FILESYSTEM_ENABLED', r'AP_Networking::NineP2000::init'), |
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.
('AP_NETWORKING_FILESYSTEM_ENABLED', r'AP_Networking::NineP2000::init'), | |
('AP_NETWORKING_FILESYSTEM_9P2000_ENABLED', r'AP_Networking::NineP2000::init'), |
"diod" is another impl... |
Some bench marking with the new script, although I'm not sure how much I trust lua with writing larger block sizes. It just assumes that the write worked and does some buffering. For reads we know the length of the data returned so the script deals with incomplete results.
I think the results are positive, SD similar speeds for write between 1024 and 4096. |
…ORKING_FILESYSTEM_ENABLED` directly
…except linux and sitl
…ns and extract features
I have fixed up the higher block size read/write. It now splits long writes into multiple commands. As before we see read and write speeds the same. Speed increases linearly with block size until you have to add another command. This is why 512 and 1024 block size are similar, the with a 1024 buffer size the headers take up some space so 1024 bytes of data have to be sent in two messages. So we send the same number of messages total as we do for the 512 block size. Currently the splits are all sent sequentially, the next speedup would probably be to send them in parallel. Or increase the buffer size..... |
This allows AP to access network storage. This implements a full set of filesystem functions. Future work would be to allow logging to and loading scripts.
This has only been tested in SITL so far, some more work is needed to get this working on real hardware (mostly just fixing the compiler warnings). It would be good to more to more union/structure based packing rather than lots of memcpy-ing. But there are some slightly tricky variable length fields. There are also loads of internal errors here to catch issues, we may want to deal with in a better way. This is also a blocking, not for use in the main thread.
9P2000 docs are a bit thin on the ground, there is this: https://ericvh.github.io/9p-rfc/rfc9p2000.html and https://www.usenix.org/legacy/event/usenix05/tech/freenix/full_papers/hensbergen/hensbergen.pdf.
I have been testing against a server hosted with: https://github.com/knusbaum/go9p
Note that this is client only. You cannot access the AP file system remotely, the point is that you use a external file system in the first place which you can accesses remotely without AP slowing things down.