(K,P)

Asked by yiyuechan

Hello Didier,

          with respect to LSB encoding, there is a intervals f(Vref,K,P), However, How can we choose the K,P ,
especially the value P, it is only according to the section 4.5.1 a),b),c),d) in RFC 3095?
          in the TCP profile in the lib, there are many rohc_lsb_shift_t params P, how can the values be choosed? e.g. TCP_SN = 4, TCP_window = 16383,RTP_SN = 101,TCP_TS_3B = 0x00040000,TCP_TS_4B = 0x04000000 .
          Thank you very much.

best regards,

yiyuechan

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
Last query:
Last reply:
Revision history for this message
Didier Barvaux (didier-barvaux) said :
#1

Hello,

> with respect to LSB encoding, there is a intervals f(Vref,K,P), However,
> How can we choose the K,P , especially the value P, it is only according
> to the section 4.5.1 a),b),c),d) in RFC 3095?

Section 4.5.1 of RFC 3095 defines the main principles of the LSB encoding. The value for p is specific to the field that is encoded. Some examples:
* §4.5.5 of RFC3095 defines that the IP-ID offset is encoded with p = 0. That information is repeated in §5.7.
* §5.7 of RFC3095 defines that the SN field is encoded with p = 1 if bits(SN) <= 4 and p = 2^(bits(SN)-5) - 1 if bits(SN) > 4.
* §5.7 of RFC3095 defines that the TS field is encoded with p = 2^(bits(TS)-2) - 1.

The TCP profile defines that p values in a different way. Its uses the lsb() function defined in section 4.11.5 of RFC 4997. The 2nd parameter <offset_param> of the function lsb() is the p parameter defined in RFC 3095. For example, the RFC 6846 defines that the seq_1 packet type of the TCP profile shall encode the TCP sequence number with as follow: seq_number =:= lsb(16, 32767). It means that k = 16 and p = 32767.

> in the TCP profile in the lib, there are many rohc_lsb_shift_t params P,
> how can the values be choosed? e.g. TCP_SN = 4, TCP_window = 16383,
> RTP_SN = 101,TCP_TS_3B = 0x00040000,TCP_TS_4B = 0x04000000 .

The rohc_lsb_shift_t enum lists the different values that are used by the several ROHC RFCs. See the examples above.

Regards,
Didier

Revision history for this message
yiyuechan (yiyuechan) said :
#2

Hello,

>The TCP profile defines that p values in a different way. Its uses the lsb() function defined in section 4.11.5 >of RFC 4997. The 2nd parameter <offset_param> of the function lsb() is the p parameter defined in RFC >3095. For example, the RFC 6846 defines that the seq_1 packet type of the TCP profile shall encode the TCP >sequence number with as follow: seq_number =:= lsb(16, 32767). It means that k = 16 and p = 32767.

But how can we understand the p = 32767 and the corresponding interval?

Thank you very much.

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#3

Sorry, I don't understand your question. Could please rephrase it ?

Revision history for this message
yiyuechan (yiyuechan) said :
#4

Hello,

    what I mean is that:

1.field =:= lsb(K,P) is a Library of Encoding Methods defined in RFC4997, the FN means it has decided a certain filed has the K bits LSB? e.g. seq_number =:= lsb(16, 32767). It means that k = 16 and p = 32767. it has decided the seq_number is decoded with 16bits LSB communicated to the decompressor? However, in the RFC3095, it tells we should calculate the value K according to the section 4.5.1 a),b),c),d) in RFC 3095.
SO,what is the field =:= lsb(K,P) ? where can I see the algorithm realization for it.
2 in the lib 2.2.0, as for seq_number =:= lsb(16, 32767),I can not find the WLSB initialization with P = 32767.

Thanks a lot.

Revision history for this message
yiyuechan (yiyuechan) said :
#5

1 when we use the LSB decoding, we find or calculate the least K bits in the interval, but as for the field =:= lsb(K,P), the K is fixed,we only use it for the field , is it right?

Revision history for this message
yiyuechan (yiyuechan) said :
#6

Hello,

    what I mean is that:

1.field =:= lsb(K,P) is a Library of Encoding Methods defined in RFC4997, the FN means it has decided a certain filed use the K bits LSB? e.g. seq_number =:= lsb(16, 32767). It means that k = 16 and p = 32767. it has decided the seq_number is encoded with 16bits LSB communicated to the decompressor? However, in the RFC3095, it tells we should calculate the value K according to the section 4.5.1 a),b),c),d) in RFC 3095.
SO,what is the field =:= lsb(K,P) ? where can I see the algorithm realization for it.
      when we use the LSB encoding, we find or calculate the least K bits in the interval, but as for the field =:= lsb(K,P), the K is fixed,we only use it for the field , is it right?
2 in the lib 2.2.0, as for seq_number =:= lsb(16, 32767),I can not find the WLSB initialization with P = 32767?

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#7

Hello,

OK, I now understand your question.

The objective of the LSB algorithm is to transit only a fraction of the field (the Least Significant Bits of the field) instead of all the bits of the field. The LSB algorithm makes possible to transit some LSB but in a robust way. The LSB algorithm shall be robust to a few packet loss/damage, packet reordering, or decompression failures.

The LSB robustness uses a "reference window" of values for that. The LSB algorithm computes the minimum number of bits that the compressor must transmit to be 100% sure that the remote decompressor is able to correctly decode the value from:
* the LSB received from the compressor
* any decoded value from the reference window.

If the decompressor did not decode correctly any value from the reference window, the LSB robustness is not ensured anymore. That means that a reference window of 4 values protects from a loss/damage of up to 3 consecutive packets.

So, the ROHC compressor performs the following actions for every packet field that is encoded with the LSB algorithm:
a/ the compressorrecords the last N encoded values of that field in the reference window.
b/ when a new packet is compressed:
       * for every value in the reference window of N values, the compressor
          computes the number of LSB required to transmit the new value.
       * the compressor keeps the greatest number of those N numbers of
          LSB. This is the k variable.
c/ once all k are computed for all fields, the compressor chooses a ROHC packet format that is able to transmit the k LSB of all fields. For example, the seq_1 packet type for the TCP profile is able to transmit 16 LSBs of the sequence number, so the compressor may choose the seq_1 packet if k <= 16. If not, the compressor chooses another packet type.

I hope that the explanation is clear enough ;-)

Regards,
Didier

Revision history for this message
yiyuechan (yiyuechan) said :
#8

Hello,

       what you answer me above is the WLSB(window width = 4), I understood it before.However, what I want to know is not it. what I want to know is as follows:

1\as for the formal notation field =:= lsb(K,P) ,the lsb(K,P) represents the WLSB procedure or it represents results of calculating with the WLSB, from the many statements,I think it represent the results of calculating with the WLSB, it is a packet type fomat, is it right?
2\if the lsb(K,P) represents the results of calculating with the WLSB, e.g. seq_number =:= lsb(16, 32767),K = 16 is calculated from the WLSB(P = 32767),is it right?
3\The rohc_lsb_shift_t enum in lib 2.2.0 lists the different P values that are used by the several ROHC RFCs. but I can not find the definitions about P values in RFCs,for example RFC4996, So where is it?
4\ in the lib 2.2.0, as for seq_number =:= lsb(16, 32767),I can not find the WLSB initialization with P = 32767, if so, How can we get the k = 16bits? thank you .

Regards,
yiyuechan

Revision history for this message
yiyuechan (yiyuechan) said :
#9

I am very sorry for my questions to make you misunderstanding

Revision history for this message
yiyuechan (yiyuechan) said :
#10

4\ in the lib 2.2.0, as for seq_number =:= lsb(16, 32767),I can not find the WLSB initialization with P = 32767, if so, How can we get the k = 16bits? thank you .

Revision history for this message
yiyuechan (yiyuechan) said :
#11

Hello Didier,

             could you make a simple explanation again,Thank you very much.;-)

best regards,
yiyuechan

Revision history for this message
Best Didier Barvaux (didier-barvaux) said :
#12

Hello,

> 1\as for the formal notation field =:= lsb(K,P) ,the lsb(K,P) represents
> the WLSB procedure or it represents results of calculating with the
> WLSB, from the many statements,I think it represent the results of
> calculating with the WLSB, it is a packet type fomat, is it right?

The notation field =:= lsb(K,P) means that the compressed field is composed of the k least significant bits of the uncompressed field.

> 2\if the lsb(K,P) represents the results of calculating with the WLSB,
> e.g. seq_number =:= lsb(16, 32767),K = 16 is calculated from the
> WLSB(P = 32767),is it right?

The W-LSB algorithm is performed on the last N seq_number values with p = 32767. The result is the minimum number of bits that must be transmitted by the compressor to the decompressor, let's call that value k_min. The compressor then chooses a ROHC packet format that is able to transmit at k_min bits of seq_number. If k_min >= 16, then the seq_1 packet format is possible.

> 3\The rohc_lsb_shift_t enum in lib 2.2.0 lists the different P values
> that are used by the several ROHC RFCs. but I can not find the
> definitions about P values in RFCs,for example RFC4996, So where is it?

RFC 4996 is obsolete. RFC 6846 replaces it. The p values are defined by all the notations field := lsb(k, p) that you may find in §8.2 of RFC 6846 : https://tools.ietf.org/html/rfc6846#section-8.2

> 4\ in the lib 2.2.0, as for seq_number =:= lsb(16, 32767),I can not
> find the WLSB initialization with P = 32767, if so, How can we get
> the k = 16bits? thank you .

The value k for seq_number and p = 32767 is computed : https://github.com/didier-barvaux/rohc/blob/rohc-2.2.0/src/comp/c_tcp.c#L4666

The seq_1 packet is chosen only if value k <= 16 : https://github.com/didier-barvaux/rohc/blob/rohc-2.2.0/src/comp/c_tcp.c#L4744

The seq_1 packet is filled with 16 LSB of seq_number : https://github.com/didier-barvaux/rohc/blob/rohc-2.2.0/src/comp/c_tcp.c#L2438

Regards,
Didier

Revision history for this message
yiyuechan (yiyuechan) said :
#13

Thanks Didier Barvaux, that solved my question.