summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5.c
diff options
context:
space:
mode:
authorNelio Laranjeiro <nelio.laranjeiro@6wind.com>2018-07-12 11:30:48 +0200
committerShahaf Shuler <shahafs@mellanox.com>2018-07-12 12:10:01 +0200
commit78be885295b86da2c208324f1e276e802812b60d (patch)
tree21cc351e784b2390ef997464831bd35bd6a0bd67 /drivers/net/mlx5/mlx5.c
parentb42c000e37a80112bdf5150fbccb645ae34e5a09 (diff)
downloaddpdk-next-eventdev-78be885295b86da2c208324f1e276e802812b60d.zip
dpdk-next-eventdev-78be885295b86da2c208324f1e276e802812b60d.tar.gz
dpdk-next-eventdev-78be885295b86da2c208324f1e276e802812b60d.tar.xz
net/mlx5: handle drop queues as regular queues
Drop queues are essentially used in flows due to Verbs API, the information if the fate of the flow is a drop or not is already present in the flow. Due to this, drop queues can be fully mapped on regular queues. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5.c')
-rw-r--r--drivers/net/mlx5/mlx5.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 1b393c3..60305b1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -261,7 +261,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
priv->txqs_n = 0;
priv->txqs = NULL;
}
- mlx5_flow_delete_drop_queue(dev);
mlx5_mprq_free_mp(dev);
mlx5_mr_release(dev);
if (priv->pd != NULL) {
@@ -1139,22 +1138,15 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
mlx5_link_update(eth_dev, 0);
/* Store device configuration on private structure. */
priv->config = config;
- /* Create drop queue. */
- err = mlx5_flow_create_drop_queue(eth_dev);
- if (err) {
- DRV_LOG(ERR, "port %u drop queue allocation failed: %s",
- eth_dev->data->port_id, strerror(rte_errno));
- err = rte_errno;
- goto error;
- }
/* Supported Verbs flow priority number detection. */
- if (verb_priorities == 0)
- verb_priorities = mlx5_get_max_verbs_prio(eth_dev);
- if (verb_priorities < MLX5_VERBS_FLOW_PRIO_8) {
- DRV_LOG(ERR, "port %u wrong Verbs flow priorities: %u",
- eth_dev->data->port_id, verb_priorities);
- err = ENOTSUP;
- goto error;
+ if (verb_priorities == 0) {
+ err = mlx5_verbs_max_prio(eth_dev);
+ if (err < 0) {
+ DRV_LOG(ERR, "port %u wrong Verbs flow priorities",
+ eth_dev->data->port_id);
+ goto error;
+ }
+ verb_priorities = err;
}
priv->config.max_verbs_prio = verb_priorities;
/*