Re: [PATCH 11/20] octeontx2-af: Add support for stripping STAG/CTAG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux