Subject: StatSN wraparound; 2 typos

From: "Tony Battersby" <[email-masked]>
Date: Wed, 7 Aug 2002 13:57:06 -0400

According to 2.2.2.2 (draft 15), the status sequence number space is 32-bit
unsigned integers and the arithmetic operations are the regular mod(2**32)
arithmetic.  Why is StatSN not specified to use serial number arithmetic
(like CmdSN) to handle wrap-around?

For example, I am working on a target implementation that keeps the
information for response PDUs around until they are acknowledged by
ExpStatSN from the initiator.  If the target sends two response PDUs with
StatSNs equal to 2**32-1 and 0, and the initiator's next PDU has ExpStatSN
equal to 1, then the target should consider both response PDUs acknowledged.
Clearly, this will not happen with "regular" unsigned integer comparisons,
since 2**32-1 > 1.  Perhaps it should be made explicit that comparisons on
StatSN and ExpStatSN should use serial number arithmetic, which would handle
the wrap-around.

I have also found two typos in draft 15:

Section 11.12 MaxRecvDataSegmentLength
Last sentence "... if immediate data where sent" change "where" to "were".

Section B.3 R2TSN DataSN use Examples
Bidirectional DataSN Example "... in the alter case" change "alter" to
"latter".

Thanks,
Anthony J. Battersby
Cybernetics

---

From: "Julian Satran" <[email-masked]>
Date: Fri, 9 Aug 2002 14:18:44 +0300

Tony,

For the difference between regular modulo arithmetic  and serial number 
arithmetic it would be helpful to have a glimpse at the referred RFC.
We sue regular modulo arithmetic whenever we don't have to define an 
interval (order?)  and serial where we have to.

Thanks for the typos.

Julo

"Tony Battersby" <[email-masked]>
Sent by: [email-masked]
08/07/2002 08:57 PM
Please respond to tonyb

        To:     <[email-masked]>
        cc: 
        Subject:        StatSN wraparound; 2 typos

According to 2.2.2.2 (draft 15), the status sequence number space is 
32-bit
unsigned integers and the arithmetic operations are the regular mod(2**32)
arithmetic.  Why is StatSN not specified to use serial number arithmetic
(like CmdSN) to handle wrap-around?

For example, I am working on a target implementation that keeps the
information for response PDUs around until they are acknowledged by
ExpStatSN from the initiator.  If the target sends two response PDUs with
StatSNs equal to 2**32-1 and 0, and the initiator's next PDU has ExpStatSN
equal to 1, then the target should consider both response PDUs 
acknowledged.
Clearly, this will not happen with "regular" unsigned integer comparisons,
since 2**32-1 > 1.  Perhaps it should be made explicit that comparisons on
StatSN and ExpStatSN should use serial number arithmetic, which would 
handle
the wrap-around.

Thanks,
Anthony J. Battersby
Cybernetics