In functions like lnd_send and lnd_recv, what''s the protocol around use of the iov and kiov which come in with the lntmsg? Is it safe to copy pointers to them, or do I need to copy the contents? I guess this is another way of asking whether the lntmsg is going to hang around unmolested until lnet_finalize(). I suppose the same question could be asked about the hdr as well. If the lntmsg really is safe until finalize, presumably it''s safe for me to just keep a pointer to him, or anything contained within him, as needed, eh?
> In functions like lnd_send and lnd_recv, what''s the protocol > around use of the iov and kiov which come in with the lntmsg? > Is it safe to copy pointers to them, or do I need to copy the > contents? I guess this is another way of asking whether the > lntmsg is going to hang around unmolested until lnet_finalize().Yes it is. msg_iov/kiov etc are stable until the finalize. But you may only read them.> I suppose the same question could be asked about the hdr as > well. If the lntmsg really is safe until finalize, presumably > it''s safe for me to just keep a pointer to him, or anything > contained within him, as needed, eh?Yes - same. Cheers, Eric --------------------------------------------------- |Eric Barton Barton Software | |9 York Gardens Tel: +44 (117) 330 1575 | |Clifton Mobile: +44 (7909) 680 356 | |Bristol BS8 4LL Fax: call first | |United Kingdom E-Mail: eeb@bartonsoftware.com| ---------------------------------------------------
From: "Eric Barton" <eeb@bartonsoftware.com> Date: Tue, 5 Dec 2006 15:45:04 -0000 > In functions like lnd_send and lnd_recv, what''s the protocol > around use of the iov and kiov which come in with the lntmsg? > Is it safe to copy pointers to them, or do I need to copy the > contents? I guess this is another way of asking whether the > lntmsg is going to hang around unmolested until lnet_finalize(). Yes it is. msg_iov/kiov etc are stable until the finalize. But you may only read them. Sure. I just didn''t to manage my own copies if I didn''t need to. > I suppose the same question could be asked about the hdr as > well. If the lntmsg really is safe until finalize, presumably > it''s safe for me to just keep a pointer to him, or anything > contained within him, as needed, eh? Yes - same. Spiff. Tnx.