]> git.droids-corp.org - dpdk.git/blobdiff - app/test-pmd/icmpecho.c
eal: add and use unaligned integer types
[dpdk.git] / app / test-pmd / icmpecho.c
index 29aef71115ced28ef019169e3a946545c6e98eb1..e510f9bf37ff95c550b56417512be73cba6320ba 100644 (file)
@@ -282,7 +282,7 @@ ipv4_hdr_cksum(struct ipv4_hdr *ip_h)
         * Compute the sum of successive 16-bit words of the IPv4 header,
         * skipping the checksum field of the header.
         */
-       v16_h = (uint16_t *) ip_h;
+       v16_h = (unaligned_uint16_t *) ip_h;
        ip_cksum = v16_h[0] + v16_h[1] + v16_h[2] + v16_h[3] +
                v16_h[4] + v16_h[6] + v16_h[7] + v16_h[8] + v16_h[9];