Subject: Re: [mpls-tp] [PWE3] ACH TLV alignment

From: "Adrian Farrel" <[email-masked]>
Date: Wed, 19 Aug 2009 22:34:54 +0100

Hi,

Sorry for the long silence.

Nitin, you understood my question correctly.

Some people receive from hardware into a data buffer and for them alignment 
is possible, and TLV and sub-TLV alignment is important because it preserves 
alignment all through the header. Some people process as received which 
means that there is no alignment to start with, so there is no need to keep 
the padding in TLVs and sub-TLVs.

While in a higher level protocol (such as signaling) one might argue for the 
alignment because the message will be processed out of RAM (noting that some 
routing protocols don't require padding), for ACH we may assume that 
processing will be done in the line hardware.

Question would be to you, what benefit is gained by requiring the ACH TLVs 
and sub-TLVs to be padded?

BTW it is easy to change in draft-bryant-mpls-tp-ach-tlv-02.txt

OLD
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          AchTLVType = 5       |       Length = 2              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              PID              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

NEW
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          AchTLVType = 5       |       Length = 2              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Reserved           |              PID              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Cheers,
Adrian

----- Original Message ----- 
From: "Nitin Bahadur" <[email-masked]>
To: <[email-masked]>
Cc: "Adrian Farrel" <[email-masked]>; <[email-masked]>; 
<[email-masked]>
Sent: Sunday, July 26, 2009 12:35 AM
Subject: Re: [PWE3] [mpls-tp] ACH TLV alignment

But the TLV and sub-TLV by itself should have a 4-byte boundary size.

What I meant was that one should not allow a 5-byte sub-TLV. That Sub-tlv 
should
Be padded to 8-bytes.

Maybe that was not the intention of Adrian's question.

Nitin

On 7/25/09 2:01 PM, "Stewart Bryant" <[email-masked]> wrote:

I originally thought this but it was pointed out packets received
from an Ethernet do not preserve the 32bit alignment.

- Stewart

Nitin Bahadur wrote:
> TLVs and sub-TLVs MUST be 32-bit aligned.
>
> Nitin
>
>

---

From: Vishwas Manral <[email-masked]>
Date: Wed, 19 Aug 2009 15:02:38 -0700

Hi Adrian,

I know of systems where reading/ writing words from non-word
boundaries causes problems.

Thanks,
Vishwas

On Wed, Aug 19, 2009 at 2:34 PM, Adrian Farrel<[email-masked]> wrote:
> ----- Original Message ----- From: "Nitin Bahadur" <[email-masked]>
> To: <[email-masked]>
> _______________________________________________
> mpls-tp mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/mpls-tp
>

---

From: Nitin Bahadur <[email-masked]>
Date: Wed, 19 Aug 2009 15:14:51 -0700

I don't think initial implementations will do everything in hardware. Given that, alignment will be an issue.

Think of a low end MTU box that does MPLS and MPLS-TP OAM. It will probably be a dumb box with
very little capabilities (software and hardware). This might be an issue for such boxes where certain alignment
assumptions were made to reduce cost.

Nitin

On 8/19/09 2:34 PM, "Adrian Farrel" <[email-masked]> wrote:

---

From: Alexander Vainshtein <[email-masked]>
Date: Thu, 20 Aug 2009 08:10:38 +0300

Adrian,

A minor comment:

You proposed changed for the ACH TLV

<quote>

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          AchTLVType = 5       |       Length = 2              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Reserved           |              PID              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<end quote>
seems to contain a Typo: IMHO it should say Length = 4.And Reserved should be probably defined as MUST be zero (MBZ) if we consider fast HW parsing.

A more serious comment is: If HW parsing is expected, why to use TLVs at all?

My 2c,

     Sasha

________________________________________
From: [email-masked] [[email-masked]] On Behalf Of Adrian Farrel [[email-masked]]
Sent: Thursday, August 20, 2009 12:34 AM
To: Nitin Bahadur; [email-masked]
Cc: [email-masked]
Subject: Re: [mpls-tp] [PWE3]  ACH TLV alignment

Hi,

OLD
    0                   1                   2                   3

NEW
    0                   1                   2                   3

Cheers,
Adrian

----- Original Message -----
From: "Nitin Bahadur" <[email-masked]>
To: <[email-masked]>
Cc: "Adrian Farrel" <[email-masked]>; <[email-masked]>;
<[email-masked]>

Nitin

- Stewart

---

From: "Adrian Farrel" <[email-masked]>
Date: Thu, 20 Aug 2009 13:33:57 +0100

Hi Sasha,

> Your proposed changed for the ACH TLV
> seems to contain a Typo: IMHO it should say Length = 4

Yes

> And Reserved should be probably defined as MUST be
> zero (MBZ) if we consider fast HW parsing.

Probably SHOULD be 0, MUST be ignored.

> A more serious comment is: If HW parsing is expected, why

Yes, this is the question.
It affects the DCN draft.

I don't make hardware (never have) so I need to be guided by others. But I 
would have thought that the use of a TLV was neither here nor there for 
modern hardware.

The only (?) point in favour of a PID TLV is that one needs to be defined 
anyway for use in the ACH TLV structure.

To take this further I really need to hear more opinions and reasoning.
- for/against TLV alignment
- for/against the use of a PID TLV in DCN messages

Thanks,
Adrian

________________________________________
From: [email-masked] [[email-masked]] On Behalf Of 
Adrian Farrel [[email-masked]]
Sent: Thursday, August 20, 2009 12:34 AM
To: Nitin Bahadur; [email-masked]
Cc: [email-masked]
Subject: Re: [mpls-tp] [PWE3]  ACH TLV alignment

Hi,

OLD
    0                   1                   2                   3

NEW
    0                   1                   2                   3

Cheers,
Adrian

----- Original Message -----
From: "Nitin Bahadur" <[email-masked]>
To: <[email-masked]>
Cc: "Adrian Farrel" <[email-masked]>; <[email-masked]>;
<[email-masked]>

Nitin

- Stewart