On Fri, Nov 9, 2018 at 2:17 AM Arnd Bergmann <arnd@xxxxxxxx> wrote: > > On Thu, Nov 8, 2018 at 7:37 PM <sunil.kovvuri@xxxxxxxxx> wrote: > > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h > > index f98b011..3f7e5e6 100644 > > --- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h > > +++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h > > @@ -259,4 +259,34 @@ struct nix_rx_action { > > #endif > > }; > > > > +struct nix_rx_vtag_action { > > +#if defined(__BIG_ENDIAN_BITFIELD) > > + u64 rsvd_63_48 :16; > > + u64 vtag1_valid :1; > > + u64 vtag1_type :3; > > + u64 rsvd_43 :1; > > + u64 vtag1_lid :3; > > + u64 vtag1_relptr :8; > > + u64 rsvd_31_16 :16; > > + u64 vtag0_valid :1; > > + u64 vtag0_type :3; > > + u64 rsvd_11 :1; > > + u64 vtag0_lid :3; > > + u64 vtag0_relptr :8; > > +#else > > + u64 vtag0_relptr :8; > > + u64 vtag0_lid :3; > > + u64 rsvd_11 :1; > > + u64 vtag0_type :3; > > + u64 vtag0_valid :1; > > + u64 rsvd_31_16 :16; > > + u64 vtag1_relptr :8; > > + u64 vtag1_lid :3; > > + u64 rsvd_43 :1; > > + u64 vtag1_type :3; > > + u64 vtag1_valid :1; > > + u64 rsvd_63_48 :16; > > +#endif > > +}; > > Here is another instance of bitfields in an interface structure. As > before, please try to avoid doing that and use bit shifts and masks > instead. > > Arnd No, this struct is not part of communication interface. This is used to fill up a register in a bit more readable fashion instead of plain bit shifts. === struct nix_rx_vtag_action vtag_action; *(u64 *)&vtag_action = 0; vtag_action.vtag0_valid = 1; /* must match type set in NIX_VTAG_CFG */ vtag_action.vtag0_type = 0; vtag_action.vtag0_lid = NPC_LID_LA; vtag_action.vtag0_relptr = 12; entry.vtag_action = *(u64 *)&vtag_action; /* Set TAG 'action' */ rvu_write64(rvu, blkaddr, NPC_AF_MCAMEX_BANKX_TAG_ACT(index, actbank), entry->vtag_action); === Thanks, Sunil.