summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2018-01-25 23:00:24 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-29 10:04:28 +0100
commit4a984153430cbdafe2b971e999bba8d96610b299 (patch)
tree1d45d3d52921480a608bd9e339c20eb2a89949bd /drivers/net/mlx5/mlx5_trigger.c
parent25f28d9d294d00a1c539d47a13c14ce282e31b09 (diff)
downloaddpdk-4a984153430cbdafe2b971e999bba8d96610b299.zip
dpdk-4a984153430cbdafe2b971e999bba8d96610b299.tar.gz
dpdk-4a984153430cbdafe2b971e999bba8d96610b299.tar.xz
net/mlx5: map UAR address around huge pages
Reserving the memory space for the UAR near huge pages helps to **reduce** the cases where the secondary process cannot start. Those pages being physical pages they must be mapped at the same virtual address as in the primary process to have a working secondary process. As this remap is almost the latest being done by the processes (libraries, heaps, stacks are already loaded), similar to huge pages, there is **no guarantee** this mechanism will always work. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index c5429e1..c397b9b 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -76,10 +76,13 @@ priv_txq_start(struct priv *priv)
goto error;
}
}
- return -ret;
+ ret = priv_tx_uar_remap(priv, priv->ctx->cmd_fd);
+ if (ret)
+ goto error;
+ return ret;
error:
priv_txq_stop(priv);
- return -ret;
+ return ret;
}
static void