Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/mlx5: Expose TLP emulation capabilities

Expose and query TLP device emulation caps on driver load.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

authored by

Maher Sanalla and committed by
Leon Romanovsky
385a06f7 01b77685

+16
+6
drivers/net/ethernet/mellanox/mlx5/core/fw.c
··· 255 255 return err; 256 256 } 257 257 258 + if (MLX5_CAP_GEN(dev, tlp_device_emulation_manager)) { 259 + err = mlx5_core_get_caps_mode(dev, MLX5_CAP_TLP_EMULATION, HCA_CAP_OPMOD_GET_CUR); 260 + if (err) 261 + return err; 262 + } 263 + 258 264 if (MLX5_CAP_GEN(dev, ipsec_offload)) { 259 265 err = mlx5_core_get_caps_mode(dev, MLX5_CAP_IPSEC, HCA_CAP_OPMOD_GET_CUR); 260 266 if (err)
+1
drivers/net/ethernet/mellanox/mlx5/core/main.c
··· 1772 1772 MLX5_CAP_CRYPTO, 1773 1773 MLX5_CAP_SHAMPO, 1774 1774 MLX5_CAP_ADV_RDMA, 1775 + MLX5_CAP_TLP_EMULATION, 1775 1776 }; 1776 1777 1777 1778 static void mlx5_hca_caps_free(struct mlx5_core_dev *dev)
+9
include/linux/mlx5/device.h
··· 1259 1259 MLX5_CAP_PORT_SELECTION = 0x25, 1260 1260 MLX5_CAP_ADV_VIRTUALIZATION = 0x26, 1261 1261 MLX5_CAP_ADV_RDMA = 0x28, 1262 + MLX5_CAP_TLP_EMULATION = 0x2a, 1262 1263 /* NUM OF CAP Types */ 1263 1264 MLX5_CAP_NUM 1264 1265 }; ··· 1481 1480 #define MLX5_CAP64_DEV_VDPA_EMULATION(mdev, cap)\ 1482 1481 MLX5_GET64(virtio_emulation_cap, \ 1483 1482 (mdev)->caps.hca[MLX5_CAP_VDPA_EMULATION]->cur, cap) 1483 + 1484 + #define MLX5_CAP_DEV_TLP_EMULATION(mdev, cap)\ 1485 + MLX5_GET(tlp_dev_emu_capabilities, \ 1486 + (mdev)->caps.hca[MLX5_CAP_TLP_EMULATION]->cur, cap) 1487 + 1488 + #define MLX5_CAP64_DEV_TLP_EMULATION(mdev, cap)\ 1489 + MLX5_GET64(tlp_dev_emu_capabilities, \ 1490 + (mdev)->caps.hca[MLX5_CAP_TLP_EMULATION]->cur, cap) 1484 1491 1485 1492 #define MLX5_CAP_IPSEC(mdev, cap)\ 1486 1493 MLX5_GET(ipsec_cap, (mdev)->caps.hca[MLX5_CAP_IPSEC]->cur, cap)