summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorShahaf Shuler <shahafs@mellanox.com>2017-03-14 15:03:09 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-04-04 18:59:39 +0200
commit3c7d44af252a1ee0683670b6909c23ef373554e1 (patch)
treeb8b62c47a456d1c25a7e6bf19afc7612108382eb /drivers/net/mlx5/mlx5_trigger.c
parent49e2f374e45a8ac101191ece8be7e7636cd8a940 (diff)
downloaddpdk-3c7d44af252a1ee0683670b6909c23ef373554e1.zip
dpdk-3c7d44af252a1ee0683670b6909c23ef373554e1.tar.gz
dpdk-3c7d44af252a1ee0683670b6909c23ef373554e1.tar.xz
net/mlx5: support user space Rx interrupt event
Implement rxq interrupt callbacks Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 0acbf28..229b05e 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -95,6 +95,11 @@ mlx5_dev_start(struct rte_eth_dev *dev)
goto error;
}
priv_dev_interrupt_handler_install(priv, dev);
+ if (dev->data->dev_conf.intr_conf.rxq) {
+ err = priv_intr_efd_enable(priv);
+ if (!err)
+ err = priv_create_intr_vec(priv);
+ }
priv_xstats_init(priv);
priv_unlock(priv);
return 0;
@@ -135,6 +140,10 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
priv_fdir_disable(priv);
priv_flow_stop(priv);
priv_dev_interrupt_handler_uninstall(priv, dev);
+ if (priv->dev->data->dev_conf.intr_conf.rxq) {
+ priv_destroy_intr_vec(priv);
+ priv_intr_efd_disable(priv);
+ }
priv->started = 0;
priv_unlock(priv);
}