Stop Sending UDP Checksum from compressor end
Hi!!
Didier is it possible I can stop sending UDP checksum from compressor end and we can recalculate at decompressor the checksum again and add it again ? This way I think we can save few bits when we are not sending the checksum bit. Asterisk can do this by using
setsockopt(s, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(
But no other software has that feature available. At rfc also says
The LLA profile is obviously not applicable if the UDP checksum (2
bytes) is enabled, which is always the case for IPv6/UDP. For
IPv4/UDP, the sender may choose to disable the UDP checksum.
So if its possible it might save us few bits. What you think ?
Regards
Abyan
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- rohc Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Mohammad Abyan Abdullah
- Solved:
- 2016-06-23
- Last query:
- 2016-06-23
- Last reply:
- 2016-06-20
Didier
My point is like this packet with udp_code_
[general] [rohc_comp.c:608 rohc_compress4()] compress the packet #1656
[profile ID 1] [c_rtp.c:1341 rtp_changed_
[profile ID 1] [c_rtp.c:1498 rtp_changed_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[profile ID 1] [c_rtp.c:1067 rtp_encode_
[profile ID 1] [c_rtp.c:1074 rtp_encode_
[profile ID 1] [rohc_comp_
[profile ID 1] [c_rtp.c:624 c_rtp_decide_
[profile ID 1] [c_rtp.c:675 c_rtp_decide_
[profile ID 1] [c_rtp.c:764 c_rtp_decide_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [c_udp.c:444 udp_code_
[general] [rohc_comp.c:736 rohc_compress4()] copy full 20-byte payload
[general] [rohc_comp.c:746 rohc_compress4()] ROHC size = 26 bytes (header = 6, payload = 20), output buffer size = 1351
and without udp_code_
[profile ID 1] [c_rtp.c:1344 rtp_changed_
[profile ID 1] [c_rtp.c:1501 rtp_changed_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp.c:2663 rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[general] [comp_scaled_
[profile ID 1] [c_rtp.c:1069 rtp_encode_
[profile ID 1] [c_rtp.c:1076 rtp_encode_
[profile ID 1] [rohc_comp_
[profile ID 1] [c_rtp.c:625 c_rtp_decide_
[profile ID 1] [c_rtp.c:676 c_rtp_decide_
[profile ID 1] [c_rtp.c:766 c_rtp_decide_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[profile ID 1] [rohc_comp_
[general] [rohc_comp.c:736 rohc_compress4()] copy full 20-byte payload
[general] [rohc_comp.c:746 rohc_compress4()] ROHC size = 24 bytes (header = 4, payload = 20), output buffer size = 1351
we can save 2 Bytes per packet. Even at each UDP Checksum change detection Packet has to go on FO state most of the time and at time Packet size increases to 31 bytes too even large.
And also as if RFC says'
https:/
The UDP checksum is optional. If disabled, its value is constantly
zero and could be compressed away. If enabled, its value depends on
the payload, which for compression purposes is equivalent to it
changing randomly with every packet.
UDP checksum is optional for client to send. For better compression we might omit the value for checksum at Compressor and we can regenerate it at decompressor. At that way we might save more bytes. Plzz let me know if it's feasible or not. I've checked the library which doesn't allow to omit the UDP Checksum and also protected by the CRC so which is not easy too. I just have an idea and shared with you my thoughts plzz let me know is it Ok or Not.
Regards
Abyan
Hello,
Yes, this is possible:
* in your application that uses the ROHC compressor:
* erase the UDP checksum by 0x0000
* compress the packet with the zero UDP checksum
* send the ROHC packet on the network
* in your application that uses the ROHC decompressor:
* receive the ROHC packet
* decompress the ROHC packet
* either compute the UDP checksum again or simply leave the zero UDP checksum alone (UDP checksums are optional)
Regards,
Didier
Hi!!
Didier thanks for the answer. Can you plzz give me a hint how can assign it at Compressor side ? Cause I've tried to assign it but all I got error, it's a read-only value can't modify. If I can reproduce the checksum at decompressor side that would be great but first I wanna try the checksum by 0x0000 then see if any error found at other end.
Regards
Abyan
Ok.
Thanks for the advice. I've implemented on the tunnel to stop sending the checksum and decompressor successfully decompress the packet with almost 1-2% better compression gain than before.
Regards
Abyan