From bc0821f4649b4425b088f60773e4438c3ccd0543 Mon Sep 17 00:00:00 2001 From: Grigore Ion Date: Mon, 11 Jan 2016 11:13:01 +0200 Subject: 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 Reviewed-by: Ilya Maximets Signed-off-by: Maxim Uvarov --- example/generator/odp_generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example') diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index cdbc76168..757dc540b 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; } -- cgit v1.2.3