diff options
author | Gal Pressman <galp@mellanox.com> | 2016-06-23 17:02:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-27 04:10:40 -0400 |
commit | 4e59e288813901815b39c82fc00d4e9fe78ce16b (patch) | |
tree | 838a987e8fcc263da3f1518cd7519eb5f38c3ccb /drivers/net/ethernet/mellanox/mlx5/core/en.h | |
parent | 507f0c817f7a28bbf4facb3a8dca72a68bc25248 (diff) |
net/mlx5e: Introduce net device priv flags infrastructure
Introduce an infrastructure for getting/setting private net device
flags.
Currently a 'nop' priv flag is added, following patches will override
the flag will actual feature specific flags.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 017e047965a6..02fa4daef59d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -144,6 +144,22 @@ struct mlx5e_umr_wqe { struct mlx5_wqe_data_seg data; }; +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = { + "nop", +}; + +enum mlx5e_priv_flag { + MLX5E_PFLAG_NOP = (1 << 0), +}; + +#define MLX5E_SET_PRIV_FLAG(priv, pflag, enable) \ + do { \ + if (enable) \ + priv->pflags |= pflag; \ + else \ + priv->pflags &= ~pflag; \ + } while (0) + #ifdef CONFIG_MLX5_CORE_EN_DCB #define MLX5E_MAX_BW_ALLOC 100 /* Max percentage of BW allocation */ #define MLX5E_MIN_BW_ALLOC 1 /* Min percentage of BW allocation */ @@ -543,6 +559,7 @@ struct mlx5e_priv { struct work_struct set_rx_mode_work; struct delayed_work update_stats_work; + u32 pflags; struct mlx5_core_dev *mdev; struct net_device *netdev; struct mlx5e_stats stats; |