PR 1098: "struct ipovly" not packed.
Chris Johns
chrisj at rtems.org
Mon Jun 26 00:47:11 UTC 2006
Ralf Corsepius wrote:
> On Sat, 2006-06-24 at 14:50 +1000, Chris Johns wrote:
>> This PR:
>>
>> http://www.rtems.com/cgi-bin/gnatsweb.pl?cmd=view&database=RTEMS&pr=1098
>>
>> contains a patch related to this thread:
>>
>> http://www.rtems.org/ml/rtems-users/2006/may/msg00060.html
>>
>> It requires the packing of "struct ipovly" and "struct tcpiphdr".
>>
>> I would like to commit this patch and close the PR but before I do this
>> I would like to know why this patch is needed for a specific ARM board
>> and network device and not others.
> And I would like to know why this patch is needed at all.
>
> 1. I fail to understand why this patch is required at all, because I
> don't see why __attribute__(packed) should have any influence on the
> structs you are trying to pack.
I agree which is why I asked.
>
> 2. __attribute__(packed) is hack and should not be used.
>
It is used in a number of places. Does this mean we should remove the
other cases where it is used (run the following) ?
$ grep -r packed cpukit/libnetworking/
Looking at the netbsd code which I have handy it is present in files
such as 'netinet/ip.h'. Can we really avoid using it ?
> Can you provide an isolated example exposing the problem (Which?) you
> are trying to solve?
No I cannot. I am only handling the patch. I have cc'ed the originator
of the patch.
Regards
Chris
More information about the users
mailing list