Skip to content

Commit

Permalink
common/cnxk: fix byte order of frag sizes and infos
Browse files Browse the repository at this point in the history
Change the byte order of frag sizes and infos to match HW
implementation.

Fixes: 64a73eb ("common/cnxk: add CPT hardware definitions")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
  • Loading branch information
nithind1988 authored and jerinjacobk committed Jan 23, 2022
1 parent 6a78d41 commit 83e2755
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/common/cnxk/hw/cpt.h
Expand Up @@ -301,21 +301,23 @@ 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;

/* WORD 1 */
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;
};
Expand Down

0 comments on commit 83e2755

Please sign in to comment.