question about "act_on_crc_failure"

Asked by qingbaibai

hello,

I have two questions.
first, why act_on_crc failure always return ROHC_ERROR_CRC? If the wrong SN has been corrected and the new CRC is right, I think it may be better to return ROHC_OK.
Second, why only decode_UO0, decode_ UO1 and decode_UO2 use act_on_crc failure.? How about the CRC failure of IR and IRDYN?

Regards,
qingbaibai

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
Best Didier Barvaux (didier-barvaux) said :
#1

Hello,

> why act_on_crc failure always return ROHC_ERROR_CRC? If the wrong SN
> has been corrected and the new CRC is right, I think it may be better to
> return ROHC_OK.

Even in case of successful repair, the packet must be discarded. RFC 3095
reads in section 5.3.2.2.4:

      e. If this decompression succeeds, the decompressor updates the
         context but SHOULD NOT deliver the packet to upper layers. The
         following packet is also decompressed and updates the context if
         its CRC succeeds, but SHOULD be discarded. If decompression of
         the third packet using the new context also succeeds, the context
         repair is deemed successful and this and subsequent decompressed
         packets are delivered to the upper layers.

> Second, why only decode_UO0, decode_ UO1 and decode_UO2 use
> act_on_crc failure.? How about the CRC failure of IR and IRDYN?

The act_on_crc_failure() function mainly handles the "SN LSB wraparound"
case that is not valid for IR and IR-DYN packets (see §5.3.2.2.3 in RFC 3095).
The function could however be enhanced to handle the "the reference SN has
been incorrectly updated" case for IR-DYN. You're right on that point.

For your information, the act_on_crc_failure() was removed from the ROHC
library in the main development branch (= trunk) by revision 229 [1] to fix
several bugs. Support for repair upon CRC failure will be added again in later
releases (no planning yet).

Regards,
Didier

[1] http://bazaar.launchpad.net/~didier-barvaux/rohc/main/revision/229

Revision history for this message
qingbaibai (sunqing-cztz) said :
#2

Thank you.