aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-29 21:20:21 +0300
committerMike Holmes <mike.holmes@linaro.org>2016-05-03 12:14:32 -0400
commit7c4704b37306827c9d7fbabd07eb9df6548357f3 (patch)
tree0281acfc532d04f28b4daa89e8afc5b37ae2a940 /helper
parent269914284a0c8955b799bd3e9b13636d363f5f39 (diff)
helper: chksum add ipv3 and udp fields
Chksum routines updated to serarch l4 and udp flags set in the packets. Because there is syntetic allocated packet we need also set required bits. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Diffstat (limited to 'helper')
-rw-r--r--helper/test/chksum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/helper/test/chksum.c b/helper/test/chksum.c
index f47fa64bf..749d4959d 100644
--- a/helper/test/chksum.c
+++ b/helper/test/chksum.c
@@ -111,6 +111,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
ip->proto = ODPH_IPPROTO_UDP;
ip->id = odp_cpu_to_be_16(1);
ip->chksum = 0;
+ odp_packet_has_ipv4_set(test_packet, 1);
odph_ipv4_csum_update(test_packet);
/* udp */
@@ -122,6 +123,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
udp->dst_port = 0;
udp->length = odp_cpu_to_be_16(udat_size + ODPH_UDPHDR_LEN);
udp->chksum = 0;
+ odp_packet_has_udp_set(test_packet, 1);
udp->chksum = odph_ipv4_udp_chksum(test_packet);
if (udp->chksum == 0)