diff options
author | Tariq Toukan <tariqt@nvidia.com> | 2021-12-05 12:31:47 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-12-21 19:08:56 -0800 |
commit | 6c72cb05d4b877300cb23df32f7451bdc55d2940 (patch) | |
tree | 89563afaa259866bd1a0b7f8a818b4c96d2596a7 /drivers/net/ethernet/mellanox/mlx5/core/en.h | |
parent | net/mlx5: Remove the repeated declaration (diff) | |
download | linux-dev-6c72cb05d4b877300cb23df32f7451bdc55d2940.tar.xz linux-dev-6c72cb05d4b877300cb23df32f7451bdc55d2940.zip |
net/mlx5e: Use bitmap field for profile features
Use a features bitmap field in mlx5e_profile to declare profile support
state of the different features. Let it replace the existing
rx_ptp_support boolean. It will be extended to cover more features in a
downstream patch.
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index e77c4159713f..a8fa7f1e5ce5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -956,6 +956,10 @@ struct mlx5e_rx_handlers { extern const struct mlx5e_rx_handlers mlx5e_rx_handlers_nic; +enum mlx5e_profile_feature { + MLX5E_PROFILE_FEATURE_PTP_RX, +}; + struct mlx5e_profile { int (*init)(struct mlx5_core_dev *mdev, struct net_device *netdev); @@ -974,9 +978,12 @@ struct mlx5e_profile { const struct mlx5e_rx_handlers *rx_handlers; int max_tc; u8 rq_groups; - bool rx_ptp_support; + u32 features; }; +#define mlx5e_profile_feature_cap(profile, feature) \ + ((profile)->features & (MLX5E_PROFILE_FEATURE_## feature)) + void mlx5e_build_ptys2ethtool_map(void); bool mlx5e_check_fragmented_striding_rq_cap(struct mlx5_core_dev *mdev); |