Hello, > It very well may be an issue with the toolchain. I am building RoHC > into a Linux Kernel Module and calling it from another LKM. > Toolchain does not appear to Support 64-bit division in the kernel so > I get the above "undefined" errors. > > For version 1.7.0 I applied a patch to replace all uint64_t with long > and time_t data types. The TCP profile actually worked fairly well. > I was able to get SCP, FTP, and serial-over-TCP running, albeit in > light traffic. This worked in the short term for some preliminary > testing.
I'll look at your patch. I remember now that I worked on this topic too. With a different way to alter the code. See https://github.com/didier-barvaux/rohc/commit/55a1da25e970637edd746a2cb7fec530157cd4f7 > I have since switched to using the master branch for the long term. > When I build it, only __aeabi_uldivmod appears to be undefined. I tested on ARM. I confirm the problem for the kernel module. > I have attached the patch I applied to the master branch. Just like > the 1.7.0 patch, it replaces all uint64_t variables with type long, > to prevent undefined routines. This builds (with several warnings), > but unfortunately crashes during rohc_decompress3() when a TCP > session is opened. ICMP traffic passes without issue. It might be due to the TCP profile not being fully robust yet in master. I hold a lot of patches on a private branch. I'll release them soon after some more testing. The problems with the TCP profile also affect the 1.7.x releases. You were probably testing the library/module with the TCP profile disabled. This is the default setting because the TCP profile is not ready. > Are the timer structures in the library required to be uint64_t? I used uint64_t to be ready for the 2038 bug :) > Is it possible my patch is causing the crash? I've turned tracing on > but kernel panics usually prevent me from figuring out the exact > point of the crash. Probably not if it happens with TCP traffic. > I also get the following warnings when building from master: > src/decomp/d_tcp.c:880:1: warning: the frame size of 16376 bytes is > larger than 1024 bytes [-Wframe-larger-than=] > src/decomp/rohc_decomp_rfc3095.c:1671:1: warning: the frame size of > 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=] Yes, I know those 2 warnings. I defined large structs as local variables, so the stack became quite big. I have yet to figure out how to achieve the same job without them. I don't know if large stacks may cause problems in the kernel or not. Regards, Didier
signature.asc
Description: PGP signature
_______________________________________________ Mailing list: https://launchpad.net/~rohc Post to : [email protected] Unsubscribe : https://launchpad.net/~rohc More help : https://help.launchpad.net/ListHelp

