From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Changelog; v1->v2: * Slightly changed allocation algorithm * Removed uverbs_dealloc_dm() * Fixed error-handling paths * Used __aligned_u64 v0->v1: The main change that Ariel moved almost all alloc/dealloc code from netdev part of mlx5 driver to ib part. ------------------------------------------------------------------------ Hi The feature itself is implemented on top of new ioctl() infrastructure, the patches itself are stacked on previously sent IPsec series. In addition to being tied to IPsec, this series will have extremely minor conflict with Dave's netdev tree. --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h @@@ -1016,7 -1018,7 +1021,8 @@@ enum mlx5_cap_type MLX5_CAP_RESERVED, MLX5_CAP_VECTOR_CALC, MLX5_CAP_QOS, + MLX5_CAP_DEBUG, + MLX5_CAP_RESERVED_14, + MLX5_CAP_DEV_MEM, /* NUM OF CAP Types */ MLX5_CAP_NUM }; MLX5_CAP_DEBUG comes from netdev, while MLX5_CAP_DEV_MEM comes from this series. The IB device memory support was presented as RFC [1] by Ahamd. Many types of user space application can get a real performance gain by using the internal memory of an IB device. This can be useful to decrease latency of a trading operation where data is already allocated in the device memory, to save the PCI round trip when doing atomic operations on semaphores remotely and also to save the PCI round trip when performing modification by the device on received traffic that should be transmitted directly after this modification. In order for user space applications to use the internal device memory, we implement allocate/free device memory verbs. Thanks [1] https://www.spinics.net/lists/linux-rdma/msg49702.html Ariel Levkovich (8): IB/uverbs: Expose device memory capabilities to user IB/uverbs: Add device memory capabilities reporting IB/uverbs: Add alloc/free dm uverbs ioctl support IB/uverbs: Add device memory registration ioctl support net/mlx5: Query device memory capabilities IB/mlx5: Device memory support in mlx5_ib net/mlx5: Mkey creation command adjustments IB/mlx5: Device memory mr registration support drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_cmd.c | 6 + drivers/infiniband/core/uverbs_std_types.c | 13 +- drivers/infiniband/core/uverbs_std_types_dm.c | 108 +++++++++++++++ drivers/infiniband/core/uverbs_std_types_mr.c | 147 +++++++++++++++++++++ drivers/infiniband/core/verbs.c | 6 +- drivers/infiniband/hw/mlx5/cmd.c | 104 +++++++++++++++ drivers/infiniband/hw/mlx5/cmd.h | 4 + drivers/infiniband/hw/mlx5/main.c | 145 +++++++++++++++++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 44 +++++- drivers/infiniband/hw/mlx5/mr.c | 87 +++++++++++- .../net/ethernet/mellanox/mlx5/core/en_common.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- .../net/ethernet/mellanox/mlx5/core/fpga/conn.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 + include/linux/mlx5/device.h | 9 ++ include/linux/mlx5/mlx5_ifc.h | 84 +++++++++++- include/rdma/ib_verbs.h | 32 ++++- include/rdma/uverbs_ioctl.h | 12 ++ include/uapi/rdma/ib_user_ioctl_cmds.h | 31 +++++ include/uapi/rdma/ib_user_verbs.h | 1 + include/uapi/rdma/mlx5-abi.h | 1 + include/uapi/rdma/mlx5_user_ioctl_cmds.h | 6 +- 24 files changed, 828 insertions(+), 28 deletions(-) create mode 100644 drivers/infiniband/core/uverbs_std_types_dm.c create mode 100644 drivers/infiniband/core/uverbs_std_types_mr.c -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html