Subject: Setting the Length filed in the PWE3 Control Word draft

From: Sasha Vainshtein <[email-masked]>
Date: Tue, 8 Mar 2005 12:40:11 +0200

Stewart and all,
Section 3 of draft-ietf-pwe3-cw-02.txt contains the following text related
to setting and processing of the Length field in the Preferred CW:

<quote>
    Length (bits 10 to 15): 
 
          If the PW payload size could be less than 64 bytes, and is  
          either variable, or unknown to the CE-bound PE, the length 
          field is used to indicate the size of a PW payload that might 
          have been padded to the minimum Ethernet MAC frame size 
          during its transit across the PSN. If the MPLS payload 
          (defined as the PW-CW + the PW payload + any additional PW 
          headers) is less than 63 bytes, the length MUST be set to the 
          length of the MPLS payload.  
 
          Otherwise the length MUST be set to 0.   
<end quote>

IMHO the requirement level ("the length MUST be set to the 
length of the MPLS payload") used in this text does not
match the use case described ("If the PW payload size...
is  either variable, or unknown to the CE-bound PE").

E.g., consider an ATM Cell PWs using "many-to-one" encapsulation
in the default mode (i.e., single cell per packet). 
The MPLS payload size in this case would be always 56 < 63; but
does the CE-bound PE really need the Length value to remove padding?
Even if packing of cells into the packet is used, the length
field is not necessary.

Hence I propose to change MUST to SHOULD. If necessary,
some known examples when the length field MAY be always 
set to 0 in spite of short MPLS payloads can be added as a note.

In addition, IMHO "less than 63 bytes" should be replaced by
"less than or equal to 63 bytes".

The requirement level in the last sentence of the quoted 
fragment ("Otherwise the length MUST be set to 0") is OK with me.

Hopefully this note will be useful.

Regards,
                                  Sasha Vainshtein
email:                         [email-masked]
phone:                       +972-3-7569993 (office)
fax:                            +972-3-6487779
mobile:                      +972-52-8674833

---

From: Stewart Bryant <[email-masked]>
Date: Tue, 08 Mar 2005 16:54:24 +0000

I discussed the length text with Yaakov, and we would
like to propose the following simplified text:

Length (bits 10 to 15):

           The value of the length field, if non-zero, can be used to
           remove any padding added by the PSN. If the entire packet
           length is less than 64 bytes, then length field MUST be set
           to the length of the layer 2 payload plus the length of
           the control word. Otherwise it MUST be set to zero.

           If a non-zero length field is received, the PW payload
           MUST, if required, be trimmed.

- Stewart

---

From: Sasha Vainshtein <[email-masked]>
Date: Tue, 8 Mar 2005 19:08:21 +0200

Stewart and all,

Sorry to say that but, if anything, I think that 
this "simplification" is WORSE than the original text.

Not only does it leave intact the mandatory requirement to set
the Length field regardless of the actual need, but it makes 
processing of this field at reception unpredictable by saying:

"  If a non-zero length field is received, the PW payload
   MUST, if required, be trimmed".
         -----------
             ^
             | 
             -- the problematic qualifier.

To explain why the resulting behavior is unpredictable, assume 
the following situation: 

- A PW packet containg some L2 overhead, exactly two labels,
  a preferred control word and 1K of payload has been
  received; the Length field in the CW is set to 44.

Now, is it really REQUIRED to trim the payload to 40 bytes as indicated 
by the Length field? Or may I safely assume that trimming is NOT REQUIRED 
since the payload size (1K) cannot be attributed to any padding?

If you (and the WG) decide that the requirement to set the Length field
cannot be relaxed from MUST to SHOULD, then, at the very least,
please leave the original unambiguous text intact.

One implication of the decision to mandate setting of the Length field
regardless of its need should be, IMO, a clarification in the ATM
encapsulation draft wrt processing of packets with the Length value
that does not match any integral number of cells.

Regards,
                                  Sasha Vainshtein
email:                         [email-masked] <mailto:[email-masked]> 
phone:                       +972-3-7569993 (office)
fax:                            +972-3-6487779
mobile:                      +972-52-8674833 

> -----Original Message-----
> From: Stewart Bryant [mailto:[email-masked]]
> Sent: Tuesday, March 08, 2005 6:54 PM
> To: Sasha Vainshtein
> Cc: PWE3 WG (E-mail)
> Subject: Re: Setting the Length filed in the PWE3 Control Word draft
> 
>

---

From: "Yaakov Stein" <[email-masked]>
Date: Tue, 8 Mar 2005 21:26:35 +0200

Sasha, 

> Not only does it leave intact the mandatory requirement to 
> set the Length field regardless of the actual need, 

We have discussed this at length before,
and you haven't shown any case where there may be padding
and we can do without the length field,
except possibly SAToP.

I don't see why we need to make an additional "if"
here for this one case.

> but it 
> makes processing of this field at reception unpredictable by saying:
> 

This is not unpredictable behavior.

"if required" simply means if the declared length is 
less than the length received.

> To explain why the resulting behavior is unpredictable, 
> assume the following situation: 
> 

I am not sure what you mean.
Why is the length equal to 44 if there is such a big packet?

I don't know of any L2 that pads to 1K,
and this is not what is being discussed here.

> 
> Now, is it really REQUIRED to trim the payload to 40 bytes as 
> indicated by the Length field? Or may I safely assume that 
> trimming is NOT REQUIRED since the payload size (1K) cannot 
> be attributed to any padding?

If the packet is so out of whack, then it might not even 
be a PW packet at all. But the length field is not meant
to be a sanity check to detect stray packets.

> 
> If you (and the WG) decide that the requirement to set the 
> Length field cannot be relaxed from MUST to SHOULD, then, at 
> the very least, please leave the original unambiguous text intact.

The issue of the MUST vs. SHOULD is not for 1K packets.
The question arises when there is a border line case
which might need padding with 1 label, but not when
an additional label is pushed.

> One implication of the decision to mandate setting of the 
> Length field regardless of its need should be, IMO, a 
> clarification in the ATM encapsulation draft wrt processing 
> of packets with the Length value that does not match any 
> integral number of cells.

The wording here is precisely the same as that of the ATM draft.

Y(J)S

---

From: Luca Martini <[email-masked]>
Date: Tue, 08 Mar 2005 13:23:00 -0700

>   MUST, if required, be trimmed".
This is an error packet , and must be dropped.
The length MUST indicate the CW + payload length , so the above example 
in invalid.
Luca

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

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

---

From: Sasha Vainshtein <[email-masked]>
Date: Wed, 9 Mar 2005 21:09:12 +0200

Luca and all,
Please see inline below.

-----Original Message-----
From: Luca Martini [mailto:[email-masked]]
Sent: Tuesday, March 08, 2005 10:23 PM
To: Sasha Vainshtein
Cc: 'Stewart Bryant'; PWE3 WG (E-mail)
Subject: Re: [PWE3] RE: Setting the Length filed in the PWE3 Control Word
draft

Sasha Vainshtein wrote: 

Stewart and all,

         -----------

             ^

             | 

the following situation: 

  

This is an error packet , and must be dropped.
The length MUST indicate the CW + payload length , so the above example in
invalid.
Luca
[[Sasha]] I agree that this should be the decision of the receiver. But the
CW draft does not state that.
Nor , AFAIK, do the specific ecnapsulation drafts. 

Regards,

                                  Sasha Vainshtein

email:                          [email-masked] <mailto:[email-masked]>
<mailto:[email-masked]> <mailto:[email-masked]> 

fax:                            +972-3-6487779

mobile:                      +972-52-8674833 

-----Original Message-----

From: Stewart Bryant [ mailto:[email-masked] <mailto:[email-masked]>
]

To: Sasha Vainshtein

Cc: PWE3 WG (E-mail)

Length (bits 10 to 15):

- Stewart

pwe3 mailing list

[email-masked] <mailto:[email-masked]> 

https://www1.ietf.org/mailman/listinfo/pwe3
<https://www1.ietf.org/mailman/listinfo/pwe3>

---

From: "Yaakov Stein" <[email-masked]>
Date: Wed, 9 Mar 2005 23:22:43 +0200

This is an error packet , and must be dropped.
The length MUST indicate the CW + payload length , so the above example
in invalid.
Luca
[[Sasha]] I agree that this should be the decision of the receiver. But
the CW draft does not state that. 

 Sasha:
 
Do you mean that you want a threshold,
i.e. the receiver MUST trim if the packet length is up to 70 bytes (or
whatever)
and discard thereafter?
 
Y(J)S