From: Nithin Dabilpuram Date: Fri, 21 Jan 2022 12:04:17 +0000 (+0530) Subject: common/cnxk: fix byte order of frag sizes and infos X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=83e275519c06a3c495db043197f9a174ae10ced6;p=dpdk.git common/cnxk: fix byte order of frag sizes and infos Change the byte order of frag sizes and infos to match HW implementation. Fixes: 64a73ebd87bd ("common/cnxk: add CPT hardware definitions") Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram Signed-off-by: Vidya Sagar Velumuri --- diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h index 4d9c89697b..8fbba2c2a4 100644 --- a/drivers/common/cnxk/hw/cpt.h +++ b/drivers/common/cnxk/hw/cpt.h @@ -301,10 +301,11 @@ struct cpt_frag_info_s { union { uint64_t u64; struct { - union cpt_frag_info f3; - union cpt_frag_info f2; - union cpt_frag_info f1; + /* CPT HW swaps each 8B word implicitly */ union cpt_frag_info f0; + union cpt_frag_info f1; + union cpt_frag_info f2; + union cpt_frag_info f3; }; } w0; @@ -312,10 +313,11 @@ struct cpt_frag_info_s { union { uint64_t u64; struct { - uint16_t frag_size3; - uint16_t frag_size2; - uint16_t frag_size1; + /* CPT HW swaps each 8B word implicitly */ uint16_t frag_size0; + uint16_t frag_size1; + uint16_t frag_size2; + uint16_t frag_size3; }; } w1; };