diff options
Diffstat (limited to 'helper/include/odp')
-rw-r--r-- | helper/include/odp/helper/ip.h | 8 | ||||
-rw-r--r-- | helper/include/odp/helper/threads.h | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index 3fac438f1..0faf47f82 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -111,7 +111,7 @@ static inline int odph_ipv4_csum(odp_packet_t pkt, odph_ipv4hdr_t *ip, odp_u16sum_t *chksum) { - unsigned nleft = ODPH_IPV4HDR_IHL(ip->ver_ihl) * 4; + uint32_t nleft = (uint32_t)(ODPH_IPV4HDR_IHL(ip->ver_ihl) * 4); uint16_t buf[nleft / 2]; int res; @@ -119,13 +119,13 @@ static inline int odph_ipv4_csum(odp_packet_t pkt, return -1; ip->chksum = 0; memcpy(buf, ip, sizeof(*ip)); - res = odp_packet_copy_to_mem(pkt, offset + sizeof(*ip), - nleft - sizeof(*ip), + res = odp_packet_copy_to_mem(pkt, offset + (uint32_t)sizeof(*ip), + nleft - (uint32_t)sizeof(*ip), buf + sizeof(*ip) / 2); if (odp_unlikely(res < 0)) return res; - *chksum = ~odp_chksum_ones_comp16(buf, nleft); + *chksum = (odp_u16sum_t)~odp_chksum_ones_comp16(buf, nleft); return 0; } diff --git a/helper/include/odp/helper/threads.h b/helper/include/odp/helper/threads.h index 53ce8cd07..00f47fd76 100644 --- a/helper/include/odp/helper/threads.h +++ b/helper/include/odp/helper/threads.h @@ -83,8 +83,11 @@ typedef struct { /** Helper internal thread start arguments. Used both in process and thread * mode */ typedef struct { - /** Atomic variable to sync status */ - odp_atomic_u32_t status; + /** Thread status */ + uint32_t status; + + /** Thread initialization status */ + odp_atomic_u32_t *init_status; /** Process or thread */ odp_mem_model_t mem_model; |