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
[ upstream commit 83e2755 ]

Change the byte order of frag sizes and infos to match HW
implementation.

Fixes: 64a73eb ("common/cnxk: add CPT hardware definitions")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
  • Loading branch information
nithind1988 authored and kevintraynor committed Feb 21, 2022
1 parent 5deff57 commit 285183e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/common/cnxk/hw/cpt.h
Expand Up @@ -286,21 +286,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 285183e

Please sign in to comment.