[net,2/7] mlx4: fix QP tree trashing

Submitted by Yevgeny Petrilin on Feb. 14, 2012, 4:37 p.m.


Message ID 4F3A8DC2.8030502@mellanox.co.il
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Yevgeny Petrilin Feb. 14, 2012, 4:37 p.m.
From: Eugenia Emantayev <eugenia@mellanox.co.il>

When adding new unicast steer entry, before moving qp to state ready,
actually before calling mlx4_RST2INIT_QP_wrapper(), there were added
a lot of entries with local_qpn=0 into radix tree.
This fact impacted the get_res() function and proper functioning
of resource tracker in addition to adding trash entries into radix tree.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@melllanox.co.il>
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 1420dbc..629cc30 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -374,6 +374,7 @@  static struct res_common *alloc_qp_tr(int id)
 	ret->com.res_id = id;
 	ret->com.state = RES_QP_RESERVED;
+	ret->local_qpn = id;