[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ULE-01 : last byte(s) precision



Mahesh Sooriyabandara wrote:
Alain,

It's a good question!
Clearly we need more text:

There are three concerns on the use of unused bytes in a TS-packet.

(i) No PP (i.e. when PUSI =0) and 1 B remaining (this is fixed in ULE
-01, i.e. by skipping is there is <2B remaining).
If PP is not set, the remaining one byte can not be used for packing in
any case.
OK this is set.

But if PP is set and use of remaining 1 byte for packing depends on
whether splitting of "end indicator" (case ii) and/or " length field"
(case iii)
is allowed.

(ii) No split "end indicator" if we skip when {0,1} bytes remaining (as
in ULE -01, i.e. by skipping is there is <2B remaining).
OK as well.


(iii) No split Length field if {0,1,2} bytes when PUSI set and {0,1,2,3)

bytes when PUSI was not originally set. That would mean skipping if
there is <4B remaining!
No, I think it is one byte less.

I think splitting length and/or end-indicator is a bad idea
because the receiver must in such case, when there is nor more
SNDU, the receive a next TS cell to discover that there was nothing
more !

the way to work that seems good to me is :
  PP set, 0,1 bytes left        --> new TS-cell
  PP set,  >= 2 bytes left      --> pack in this TS-cell
  PP not set, 0,1,2 bytes left  --> new TS-cell
  PP not set, >=3 bytes left    --> pack in this TS-cell

which can be "coded" as follow

-In the sender :
    if (PUSI == 1)
        Needed = 2;
    else
        Needed = 3;
    if (packing_allowed && (bytes_letf >= Needed))
    {
        if (PUSI == 0)
        {
           set PUSI = 1;
           insert_payload_pointer();
        }
        sart_new_SNDU_in_this_TS();
    }
    else
    {
        padd_with_0xff();
        SNDU_in_new_TS_cell();
    }
-In the receiver, after an SNDU completion :
    if (remaing_bytes < 2)
        ignore_last_bytes();
    else
    {
         if (first_two_bytes == 0xffff)
             ignore_last_bytes();
         else
         {
             /*
              * Here we even know the SNDU length
              */
             start_SNDU_reass();
         }
     }

Here is a text that I think would remove all ambiguity, and that
needs not detail the sub-case is PP alreay set or not ...

"If the first two bytes of an SNDU can not be put in in TS-cell,
then, a new TS cell MUST be started."

your thoughts ?


Alain.
--
Alain RITOUX
Tel +33-1-39-30-92-32
Fax +33-1-39-30-92-11
visit our web http://www.6wind.com