[dpdk-dev] [PATCH] ethdev: replace single bit masks with macros

Thomas Monjalon thomas at monjalon.net
Fri Oct 22 09:24:51 CEST 2021


22/10/2021 09:23, Andrew Rybchenko:
>  /** PMD supports thread-safe flow operations */
> -#define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE  0x0001
> +#define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE  RTE_BIT32(0)
>  /** Device supports link state interrupt */
> -#define RTE_ETH_DEV_INTR_LSC     0x0002
> +#define RTE_ETH_DEV_INTR_LSC              RTE_BIT32(1)
>  /** Device is a bonded slave */
> -#define RTE_ETH_DEV_BONDED_SLAVE 0x0004
> +#define RTE_ETH_DEV_BONDED_SLAVE          RTE_BIT32(2)
>  /** Device supports device removal interrupt */
> -#define RTE_ETH_DEV_INTR_RMV     0x0008
> +#define RTE_ETH_DEV_INTR_RMV              RTE_BIT32(3)
>  /** Device is port representor */
> -#define RTE_ETH_DEV_REPRESENTOR  0x0010
> +#define RTE_ETH_DEV_REPRESENTOR		  RTE_BIT32(4)

misalignment here

>  /** Device does not support MAC change after started */
> -#define RTE_ETH_DEV_NOLIVE_MAC_ADDR  0x0020
> +#define RTE_ETH_DEV_NOLIVE_MAC_ADDR       RTE_BIT32(5)






More information about the dev mailing list