27/05/2020 15:40, guohongzhi:
> From: Hongzhi Guo <guohongz...@huawei.com>
> 
> __rte_raw_cksum should consider Big Endian.
We need to explain the logic in the commit log.

> Signed-off-by: Hongzhi Guo <guohongz...@huawei.com>
> ---
> +#if (RTE_BYTE_ORDER == RTE_BIG_ENDIAN)
> +             sum += *((const uint8_t *)u16_buf) << 8;
> +#else
>               sum += *((const uint8_t *)u16_buf);
> +#endif

*((const uint8_t *)u16_buf) should be an uint8_t.
What is the expected behaviour of shifting 8 bits of a byte?


Reply via email to