Subject: [rddp] How can we detect FPDU boundary using MPA markers?

From: Kohta NAKASHIMA <[email-masked]>
Date: Thu, 19 Dec 2002 19:41:17 +0900

Hello,

I've heard, in order to find boundary of FPDUs or DDP header though TCP 
segments are re-segmented, the MPA markers which have a 512 octets periodic 
interval are inserted into TCP stream. I realized this is the main purpose 
of MPA marker.

As the mailing list archive before several days, if we use MPA-aware TCP and 
there is no middle box which may re-segment TCP segments, we don't need MPA 
markers, and if non-MPA-aware TCP or middle boxes which may re-segment TCP 
segments, some people say that we can detect nearest DDP header using MPA 
markers though some TCP segments are lost.

But I cannot understand how we can detect DDP header when TCP segments are 
re-segmented and some TCP segments are lost.

Please look at following 2 figures. These figures show some TCP segments, 
and show locations and values of TCP headers, MPA headers, MPA markers, and 
DDP headers into TCP segments. 

   ULPDU_Length=790(800-2-4-4)   ULPDU_Length=786(800-2-4-4-4)
               |                           |
               V                          ||
              |<-          800          ->||
            +-+-+-+----//----+-+---//---+-+|
Segment 1   |T|M|D|          |m|        |C|V
            +-+-+-+----//----+-+---//---+-|<-            800             ->|
             A|<-   400    ->|A         +-+-+-+/+-+-------//-------+-+//-+-+
Segment 2    |               ||         |T|M|D| |m|                |m|   |C|
             |               ||         +-+-+-+/+-+-------//-------+-+//-+-+
             |               |<-     512  |   ->|<-     512      ->|<-176->|
             |                |          A|      A                  A
             |                |          ||      |                  |  
     SeqNum =113(1+112)       |  SeqNum=913(113+800)                |
                              |           |      |                  |
            FPDUPTR=513(1+512*1)  FPDUPTR=1025(1+512*2)  FPDUPTR=1537(1+512*3)
                                          |
                         FPDU 1           |            FPDU 2
                                 boundary of FPDUs

  T: TCP header  M: MPA header  D: DDP header  m: Marker  C: CRC for MPA

                        Figure 1. Original TCP segments

   ULPDU_Length=790              ULPDU_Length=786
               |                           |
               V                          ||
              |<-       600         ->|   ||
            +-+-+-+----//----+-+--//--+   ||
Segment 1'  |T|M|D|          |m|      |   ||
            +-+-+-+----//----+-+--//--|<- |V    600        ->|
             A|<-   400    ->|A     +-+/+-+-+-+/+-+----//----+
Segment 2'   |               ||     |T| |C|M|D| |m|          |
             |               ||     +-+/+-+-+-+/+-+----//----|<-   400   ->|
             |               |<-     512  |   ->|A         +-+-//--+-+//-+-+
Segment 3'   |                |      A    |     ||         |T|     |m|   |C|
             |                |      |    |     ||         +-+-//--+-+//-+-+
             |                |      |    |     |<-     512      ->|<-176->| 
             |                |      |    |      |          A       A
             |                |      |    |      |          |       |  
     SeqNum =113(1+112)       |SeqNum=713(113+600) SeqNum=1313(713+600)
                              |           |      |                  |
            FPDUPTR=513(1+512*1)  FPDUPTR=1025(1+512*2)  FPDUPTR=1537(1+512*3)
                                          |
                        FPDU 1            |          FPDU 2
                                 boundary of FPDUs

  T: TCP header  M: MPA header  D: DDP header  m: Marker  C: CRC for MPA

                      Figure 2. Modified TCP segments

In Figure 1, I show that original TCP 
segments before re-segmented by middle boxes. There two TCP segments, 
the length of first segment is 800, and the length of second segment is 800.
Segment 1 has 1 MPA header (2 octets), 1 MPA marker (4 octets), and 
1 MPA CRC (4 octets), so that ULPDU_Length of Segment 1 is 790.
Segment 2 has 1 MPA header, 2 MPA markers, and 1 MPA CRC, so that ULPDU_Length 
of Segment 2 is 786.

In Figure 2, the original TCP segments in Figure 1 are re-segmented by 
middle boxes, then the original 2 TCP segments are modified to 3 TCP segments.
But the TCP stream isn't modified. Please notice that Figure 1 and Figure 2 
are different in TCP segmentation, but they have same TCP stream, so that 
location of MPA headers, DDP headers, MPA markers, and MPA CRCs aren't 
modified. (In order to notify it, I draw these figure very carefully.)

In these figures, I assumed that the MPA connection was started at TCP 
sequence number 1, and length of previous TCP segment was 112, 
thus TCP sequence number of Segment 1 is 113, and value of FPDUPTR 
in Segment 1 is 513.

In Figure 1, we can find boundary of FPDUs and DDP header 
using MPA markers, because subtracting TCP segment number(913) from 
FPDUPTR(1025), we can find that the locate of boundary is 112 octets 
before the marker. Please notice that we can find only the TCP segment 
boundary in this way. In this case, we can find it because the TCP boundary
accords with the boundary of FPDUs.

In Figure 2, I think we cannot find boundary of FPDUs and DDP header 
using MPA markers. The FPDUPTRs point to the TCP segment boundary, 
do not point to FPDU boundary in this way. In this case, if Segment 1' 
is not lost, we can find boundary of FPDUs because we find it from 
the length information which MPA header in Segment 1' has. But if Segment 1' 
is lost, we cannot find boundary of FPDUs. I think we need some information 
of location of the FPDU boundary in TCP sequence number space in this case.

If you know the way how to detect FPDU boundary using MPA markers 
without information of location of FPDU boundary, or if you find that I 
misread or misunderstand the MPA draft, please tell me it.

Thank you,

Kohta
--
Kohta NAKASHIMA, Grid Computing and Bioinformatics Laboratory,
Fujitsu Laboratories, Ltd.

_______________________________________________
rddp mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rddp