netdev
[Top] [All Lists]

Re: socklen_t instead of size_t in struct cmsghdr

To: kuznet@xxxxxxxxxxxxx
Subject: Re: socklen_t instead of size_t in struct cmsghdr
From: Jakub Jelinek <jakub@xxxxxxxxxx>
Date: Tue, 3 Oct 2000 14:26:15 -0400
Cc: davem@xxxxxxxxxx, ak@xxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <200010031823.WAA06019@ms2.inr.ac.ru>; from kuznet@ms2.inr.ac.ru on Tue, Oct 03, 2000 at 10:23:26PM +0400
References: <20001002220155.P9588@sunsite.ms.mff.cuni.cz> <200010031823.WAA06019@ms2.inr.ac.ru>
Reply-to: Jakub Jelinek <jakub@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Tue, Oct 03, 2000 at 10:23:26PM +0400, kuznet@xxxxxxxxxxxxx wrote:
> Hello!
> 
> > Yes, but the different alignment is because of the 64bit type in struct
> > cmsghdr.
> 
> No! That's problem. Alignment of cmsgs is forced to unsigned long.
> Look at macros CMSG_*
> 
> cmsgs may contain qword aligned objects (which also require translation,
> by the way). It is problem.
> 
> F.e. I forced 32bit alignment in rtnetlink to help you and Dave.
> But thing, which is allowed there, can be not allowed with cmsgs.
> At least bad alignment smells like you are going to emulate
> 64bit interface on top of 32bit one. 8)

Let's wait for DaveM then, worst case I'll hack some %sp munging so that the
cmsg fixup is not done in situ.

        Jakub

<Prev in Thread] Current Thread [Next in Thread>