Jan Kiszka wrote: > Cyril Wallois wrote: >> Hello Jan , >> >>> Could you verify that sizeof(struct ipv4_cmd) gives the same results in >> kernel and user space: >> >> In the kernel space the size is 56, against in the user space the size is >> 52. >> >> Where should I add the definition of the structure, in rtping.c ? >> > > Please try this patch: >
Or just this for now: diff --git a/stack/include/ipv4_chrdev.h b/stack/include/ipv4_chrdev.h index a96a8ad..b30b5fe 100644 --- a/stack/include/ipv4_chrdev.h +++ b/stack/include/ipv4_chrdev.h @@ -71,6 +71,8 @@ struct ipv4_cmd { unsigned int timeout; __s64 rtt; } ping; + + unsigned char __padding[64]; } args; }; There might be more alignment issues in the other command structures. I think you already stumbled over one in rtmac/tdma. So we have to understand where the differences are: Please compare which sub-structures differ in size. The padding above may solve the IOCTL mismatch, but we may still need a full rework if field offsets mismatch as well. Thanks, Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users