Skip to contentSkip to conversation

mlx4_core: mtt modifications for SRIOV

PATCH New Yevgeny Petrilin 1 participant 1 message Dec 12, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 10/21 mlx4_core: mtt modifications for SRIOV

From: Jack Morgenstein <[email protected]>

MTTs are resources which are allocated and tracked by the PF driver. In multifunction mode, the allocation and icm mapping is done in the resource tracker (later patch in this sequence).

To accomplish this, we have "work" functions whose names start with "__", and "request" functions (same name, no __). If we are operating in multifunction mode, the request function actually results in comm-channel commands being sent (ALLOC_RES or FREE_RES). The PF-driver comm-channel handler will ultimately invoke the "work" (__) function and return the result.

If we are not in multifunction mode, the "work" handler is invoked immediately.

---
 drivers/net/ethernet/mellanox/mlx4/mlx4.h |    1 +
 drivers/net/ethernet/mellanox/mlx4/mr.c   |  401 ++++++++++++++++++++++++++---
 2 files changed, 361 insertions(+), 41 deletions(-)
drivers/net/ethernet/mellanox/mlx4/mlx4.h +1 -0
index ab06e2c..23701a2 100644
@@ -612,6 +612,7 @@ struct mlx4_priv {
 	struct list_head	bf_list;
 	struct mutex		bf_mutex;
 	struct io_mapping	*bf_mapping;
+	int			reserved_mtts;
 };
 
 static inline struct mlx4_priv *mlx4_priv(struct mlx4_dev *dev)
drivers/net/ethernet/mellanox/mlx4/mr.c +360 -41

561 lines not on this page · raw message

Signature · 1 line
1.7.7