diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2019-12-12 13:09:25 +0200 |
---|---|---|
committer | Leon Romanovsky <leonro@mellanox.com> | 2020-01-10 20:25:32 +0200 |
commit | ca1992c62cadb6c8e1e1b47e197b550f3cd89b76 (patch) | |
tree | 04d67af7ec50c770958a9025d611dfd9193f4562 /include/linux/mlx5 | |
parent | 90fbca5952436e7817910b33eb4464ddd77a8964 (diff) | |
download | linux-ca1992c62cadb6c8e1e1b47e197b550f3cd89b76.tar.gz linux-ca1992c62cadb6c8e1e1b47e197b550f3cd89b76.tar.bz2 linux-ca1992c62cadb6c8e1e1b47e197b550f3cd89b76.zip |
net/mlx5: Expose vDPA emulation device capabilities
Expose vDPA emulation device capabilities from the core layer.
It includes reading the capabilities from the firmware and exposing
helper functions to access the data.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/device.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index cc1c230f10ee..1a1c53f0262d 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h @@ -1105,6 +1105,7 @@ enum mlx5_cap_type { MLX5_CAP_DEV_MEM, MLX5_CAP_RESERVED_16, MLX5_CAP_TLS, + MLX5_CAP_VDPA_EMULATION = 0x13, MLX5_CAP_DEV_EVENT = 0x14, /* NUM OF CAP Types */ MLX5_CAP_NUM @@ -1297,6 +1298,14 @@ enum mlx5_qcam_feature_groups { #define MLX5_CAP_DEV_EVENT(mdev, cap)\ MLX5_ADDR_OF(device_event_cap, (mdev)->caps.hca_cur[MLX5_CAP_DEV_EVENT], cap) +#define MLX5_CAP_DEV_VDPA_EMULATION(mdev, cap)\ + MLX5_GET(device_virtio_emulation_cap, \ + (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap) + +#define MLX5_CAP64_DEV_VDPA_EMULATION(mdev, cap)\ + MLX5_GET64(device_virtio_emulation_cap, \ + (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap) + enum { MLX5_CMD_STAT_OK = 0x0, MLX5_CMD_STAT_INT_ERR = 0x1, |