summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorOr Ami <ora@mellanox.com>2016-03-17 16:38:55 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-25 18:56:44 +0100
commita48deada651bb18a72adc4cd0a45a1d6999d64f1 (patch)
tree3c8e7e6a0287c050507589f867928fc7108ac46c /drivers/net/mlx5/mlx5_trigger.c
parent62072098b54ea502764b60f19a626013f838c778 (diff)
downloaddpdk-a48deada651bb18a72adc4cd0a45a1d6999d64f1.zip
dpdk-a48deada651bb18a72adc4cd0a45a1d6999d64f1.tar.gz
dpdk-a48deada651bb18a72adc4cd0a45a1d6999d64f1.tar.xz
mlx5: allow operation in secondary processes
Secondary processes are expected to use queues and other resources allocated by the primary, however Verbs resources can only be shared between processes when inherited through fork(). This limitation can be worked around for TX by configuring separate queues from secondary processes. Signed-off-by: Or Ami <ora@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index b5ca7d4..e9b9a29 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -64,6 +64,9 @@ mlx5_dev_start(struct rte_eth_dev *dev)
struct priv *priv = dev->data->dev_private;
int err;
+ if (mlx5_is_secondary())
+ return -E_RTE_SECONDARY;
+
priv_lock(priv);
if (priv->started) {
priv_unlock(priv);
@@ -104,6 +107,9 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
{
struct priv *priv = dev->data->dev_private;
+ if (mlx5_is_secondary())
+ return;
+
priv_lock(priv);
if (!priv->started) {
priv_unlock(priv);