diff options
author | Grigore Ion <ion.grigore@freescale.com> | 2016-01-11 11:13:01 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-01-11 15:23:09 +0300 |
commit | bc0821f4649b4425b088f60773e4438c3ccd0543 (patch) | |
tree | cbf82fb065a7f886ef81cf8d1acbfd23225f3abd /example | |
parent | ad831c8da063a3150b8a3d5ef36fa03a3ff2ee28 (diff) |
helper: fix UDP checksum computation
This patch fixes the following problems:
- checksum computation for LE platforms
- checksum computation for packets having the UDP length not a
multiple of 2
- checksum computation in the test and the example applications
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Reviewed-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r-- | example/generator/odp_generator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index cdbc7616..757dc540 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -242,7 +242,7 @@ static odp_packet_t pack_udp_pkt(odp_pool_t pool) udp->dst_port = 0; udp->length = odp_cpu_to_be_16(args->appl.payload + ODPH_UDPHDR_LEN); udp->chksum = 0; - udp->chksum = odp_cpu_to_be_16(odph_ipv4_udp_chksum(pkt)); + udp->chksum = odph_ipv4_udp_chksum(pkt); return pkt; } |