mlx4_core: Add helper functions to support MR re-registration
authorMatan Barak <matanb@mellanox.com>
Thu, 31 Jul 2014 08:01:29 +0000 (11:01 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 22:11:13 +0000 (15:11 -0700)
commite630664c8383f300c4146d7613d61e5a8eb1f8e3
treee3ec77b2c8b34bc022d0014622e4d392a33aed43
parent7e6edb9b2e0bcfb2a588db390c44d120213c57ae
mlx4_core: Add helper functions to support MR re-registration

Add few helper functions to support a mechanism of getting an MPT,
modifying it and updating the HCA with the modified object.

The code takes 2 paths, one for directly changing the MPT (and
sometimes its related MTTs) and another one which queries the MPT and
updates the HCA via fw command SW2HW_MPT. The first path is used in
native mode; the second path is slower and is used only in SRIOV.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
include/linux/mlx4/device.h