aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2007-08-01 05:28:53 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:16 -0400
commitd7bb58fb1c0e7264a7261c7d0304121ef9402e94 (patch)
treeaefbae7ee4b4b84022a7646372ddfcdb0a99e72f /drivers/infiniband
parent121964ec38d3e17b5ea6183b3c0571df2f4b0eb6 (diff)
mlx4_core: Write MTTs from CPU instead with of WRITE_MTT FW command
Write MTT entries directly to ICM from the driver (eliminating use of WRITE_MTT command). This reduces the number of FW commands needed to register an MR by at least a factor of 2 and speeds up memory registration significantly. This code will also be used to implement FMRs. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx4/mr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c
index 85ae906f1d12..734ec2bd15cd 100644
--- a/drivers/infiniband/hw/mlx4/mr.c
+++ b/drivers/infiniband/hw/mlx4/mr.c
@@ -96,11 +96,10 @@ int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt,
96 pages[i++] = sg_dma_address(&chunk->page_list[j]) + 96 pages[i++] = sg_dma_address(&chunk->page_list[j]) +
97 umem->page_size * k; 97 umem->page_size * k;
98 /* 98 /*
99 * Be friendly to WRITE_MTT firmware 99 * Be friendly to mlx4_write_mtt() and
100 * command, and pass it chunks of 100 * pass it chunks of appropriate size.
101 * appropriate size.
102 */ 101 */
103 if (i == PAGE_SIZE / sizeof (u64) - 2) { 102 if (i == PAGE_SIZE / sizeof (u64)) {
104 err = mlx4_write_mtt(dev->dev, mtt, n, 103 err = mlx4_write_mtt(dev->dev, mtt, n,
105 i, pages); 104 i, pages);
106 if (err) 105 if (err)