Subject: Re: [issue54] correlator in the PL message header

From: "Putzolu, David" <[email-masked]>
Date: Mon, 13 Jun 2005 11:32:44 -0700

Small question on the size of the seq# and correlator# sizes.

The sizes should be large enough to unambiguously distinguish different
messages (for the correlator) and order different messages (for a
sequence number).

It seems to me both a 16 bit and a 32 bit length will eventually roll
over, so we need to deal with roll over no matter what.  If that is the
case, I wonder if we can get away with 16 (or 24) bit values for either
one? 

For sequence numbering, if we assume 500 bytes to store a message and
all related context, a 2^16 messages would require 32MB of buffering,
which is pretty significant.  2^24 would require a very large amount -
so it feels to me that a full 32 bits is not needed.  

For a correlator it seems to me to depend on how many simultaneous
active transactions are expected.  This also feels like a scenario where
a full 32 bits is not needed.

The above being said, I am mindful of the risk of being overly
conservative in such decisions, so I am not sure whether going shorter
than 32 is a good idea or not.  What has been the implementation
experience with Netlink and other protocols such as GSMP?

Thanks,
David

-----Original Message-----
From: Forwarding and Control Element Separation
[mailto:[email-masked]] On Behalf Of Jamal Hadi Salim
Sent: Sunday, June 12, 2005 8:37 AM
To: [email-masked]
Subject: Re: [FORCES] [issue54] correlator in the PL message header

On Sun, 2005-12-06 at 11:00 -0400, Joel M. Halpern wrote:

> But we can not simply treat the sequence number as the correlator.
> 

Agreed.
In the some cases we could - but i think allowing for such polymorphic
behavior is something we may live to regret (it has been trickery-hell
in netlink to ensure backward compatibility because the seq # is used as
a correlator as well) so lets just add a second 32 bit number in the
main header. 

cheers,
jamal

---

From: Jamal Hadi Salim <[email-masked]>
Date: Mon, 13 Jun 2005 16:22:37 -0400

> a full 32 bits is not needed.

Agreed. If i was to handwave i would say a 16 bit number would be
sufficient for the correlator. 
32 bit is sufficient for a sequence number I would think.

> experience with Netlink and other protocols such as GSMP?

Netlink is currently overloading the 32 bit sequence number on a
per-process level for a correlator; this is currently causing some
headaches in the case of conflicts and in particular when you have more
than one socket open by the same process (anology would be if you had
more than one connection between PL and TML at say the CE - not far off
if you look at Roberts model of implementation).
The result is the kernel does some funky things by changing the PID
(equivalent to FEID) for multiple users coming from the same process. 
Under such conflicts the ability to use netlink for IPC breaks.

[The good news is you can work around it by using getsockname() syscall
to find out what real values the kernel overrides for you.
This would have been real easy to resolve if netlink had a correlator in
its header - wed just ask the kernel not to be clever]. It's a good
lesson is the summary.

cheers,
jamal