summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-07-05 10:16:19 -0300
committerJason Gunthorpe <jgg@mellanox.com>2019-07-05 10:16:19 -0300
commit5600a410ea24cb8467abdd4b8530961ff4f14907 (patch)
tree572b909f0c6cf4985e1d063f897e371ea0162995 /include/linux/mlx5/driver.h
parentbcde9a83b13ede042fd76e4cf0b759b6d6c0abe9 (diff)
parentf8efee08dd9d41ab71010e9b16c9ead51753b7d6 (diff)
downloadlinux-5600a410ea24cb8467abdd4b8530961ff4f14907.tar.gz
linux-5600a410ea24cb8467abdd4b8530961ff4f14907.tar.bz2
linux-5600a410ea24cb8467abdd4b8530961ff4f14907.zip
Merge mlx5-next into rdma for-next
From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Required for dependencies in the next patches. * mlx5-next: net/mlx5: Add rts2rts_qp_counters_set_id field in hca cap net/mlx5: Properly name the generic WQE control field net/mlx5: Introduce TLS TX offload hardware bits and structures net/mlx5: Refactor mlx5_esw_query_functions for modularity net/mlx5: E-Switch prepare functions change handler to be modular net/mlx5: Introduce and use mlx5_eswitch_get_total_vports()
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 24b02ab206c3..031043341ed5 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1085,7 +1085,7 @@ enum {
MLX5_PCI_DEV_IS_VF = 1 << 0,
};
-static inline bool mlx5_core_is_pf(struct mlx5_core_dev *dev)
+static inline bool mlx5_core_is_pf(const struct mlx5_core_dev *dev)
{
return dev->coredev_type == MLX5_COREDEV_PF;
}
@@ -1095,17 +1095,18 @@ static inline bool mlx5_core_is_ecpf(struct mlx5_core_dev *dev)
return dev->caps.embedded_cpu;
}
-static inline bool mlx5_core_is_ecpf_esw_manager(struct mlx5_core_dev *dev)
+static inline bool
+mlx5_core_is_ecpf_esw_manager(const struct mlx5_core_dev *dev)
{
return dev->caps.embedded_cpu && MLX5_CAP_GEN(dev, eswitch_manager);
}
-static inline bool mlx5_ecpf_vport_exists(struct mlx5_core_dev *dev)
+static inline bool mlx5_ecpf_vport_exists(const struct mlx5_core_dev *dev)
{
return mlx5_core_is_pf(dev) && MLX5_CAP_ESW(dev, ecpf_vport_exists);
}
-static inline u16 mlx5_core_max_vfs(struct mlx5_core_dev *dev)
+static inline u16 mlx5_core_max_vfs(const struct mlx5_core_dev *dev)
{
return dev->priv.sriov.max_vfs;
}