summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2017-10-09 16:44:53 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-12 01:36:58 +0100
commit1b37f5d898349d70aaf1b8427694ca5b7a669d8f (patch)
tree27508555e2169d07b18e7e7e853c6964e19ae78a /drivers/net/mlx5/mlx5_trigger.c
parent35a010ad48cd6aba911f9c05fc7b5d3d86bf2094 (diff)
downloaddpdk-1b37f5d898349d70aaf1b8427694ca5b7a669d8f.zip
dpdk-1b37f5d898349d70aaf1b8427694ca5b7a669d8f.tar.gz
dpdk-1b37f5d898349d70aaf1b8427694ca5b7a669d8f.tar.xz
net/mlx5: use flow to enable promiscuous mode
RSS hash configuration is currently ignored by the PMD, this commits removes the RSS feature on promiscuous mode. This functionality will be added in a later commit. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.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.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index a311499..085abcc 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -163,7 +163,16 @@ mlx5_dev_start(struct rte_eth_dev *dev)
(void *)priv, strerror(err));
goto error;
}
- err = priv_flow_start(priv);
+ if (dev->data->promiscuous)
+ mlx5_promiscuous_enable(dev);
+ err = priv_flow_start(priv, &priv->ctrl_flows);
+ if (err) {
+ ERROR("%p: an error occurred while configuring control flows:"
+ " %s",
+ (void *)priv, strerror(err));
+ goto error;
+ }
+ err = priv_flow_start(priv, &priv->flows);
if (err) {
ERROR("%p: an error occurred while configuring flows:"
" %s",
@@ -187,7 +196,8 @@ error:
priv_special_flow_disable_all(priv);
priv_mac_addrs_disable(priv);
priv_destroy_hash_rxqs(priv);
- priv_flow_stop(priv);
+ priv_flow_stop(priv, &priv->flows);
+ priv_flow_flush(priv, &priv->ctrl_flows);
priv_rxq_stop(priv);
priv_txq_stop(priv);
priv_unlock(priv);
@@ -222,13 +232,14 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
priv_special_flow_disable_all(priv);
priv_mac_addrs_disable(priv);
priv_destroy_hash_rxqs(priv);
- priv_flow_stop(priv);
+ priv_flow_stop(priv, &priv->flows);
+ priv_flow_flush(priv, &priv->ctrl_flows);
priv_rx_intr_vec_disable(priv);
+ priv_dev_interrupt_handler_uninstall(priv, dev);
priv_txq_stop(priv);
priv_rxq_stop(priv);
LIST_FOREACH(mr, &priv->mr, next) {
priv_mr_release(priv, mr);
}
- priv_dev_interrupt_handler_uninstall(priv, dev);
priv_unlock(priv);
}