Other protocol structs are in the host byte order, having eCPRI in network byte order is insistent and error prone.
Making eCPRI protocol header host byte order. Signed-off-by: Haiyue Wang <[email protected]> Signed-off-by: Ferruh Yigit <[email protected]> --- Cc: Stephen Hemminger <[email protected]> Cc: Bing Zhao <[email protected]> Cc: Olivier Matz <[email protected]> --- lib/librte_net/rte_ecpri.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/librte_net/rte_ecpri.h b/lib/librte_net/rte_ecpri.h index 1cbd6d813363..67bf9186ff6f 100644 --- a/lib/librte_net/rte_ecpri.h +++ b/lib/librte_net/rte_ecpri.h @@ -60,21 +60,20 @@ extern "C" { RTE_STD_C11 struct rte_ecpri_common_hdr { union { - rte_be32_t u32; /**< 4B common header in BE */ + uint32_t u32; /**< 4B common header in host byte order */ struct { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN - uint32_t size:16; /**< Payload Size */ - uint32_t type:8; /**< Message Type */ uint32_t c:1; /**< Concatenation Indicator */ uint32_t res:3; /**< Reserved */ uint32_t revision:4; /**< Protocol Revision */ + uint32_t type:8; /**< Message Type */ #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN uint32_t revision:4; /**< Protocol Revision */ uint32_t res:3; /**< Reserved */ uint32_t c:1; /**< Concatenation Indicator */ uint32_t type:8; /**< Message Type */ - uint32_t size:16; /**< Payload Size */ #endif + uint32_t size:16; /**< Payload Size */ }; }; }; -- 2.26.2

