* [dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio probing
@ 2019-02-21 9:02 Viacheslav Ovsiienko
2019-03-07 8:34 ` Shahaf Shuler
0 siblings, 1 reply; 2+ messages in thread
From: Viacheslav Ovsiienko @ 2019-02-21 9:02 UTC (permalink / raw)
To: shahafs; +Cc: dev, stable
The mlx5 PMD probes the Verbs flow priorities supported with
ibv_create_flow() function. If rdma-core or kernel fails for
some reason, the returned error causes the drop queue is not
destroyed, and pd is locked by not freed resource.
Also the mlx5_flow_discover_priorities() returned negative value
as error, and this code was reported "as is", without sign
changing (eventually causing assert(err > 0)).
Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5.c | 4 +++-
drivers/net/mlx5/mlx5_flow.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index df71707..6679676 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1243,8 +1243,10 @@
priv->config = config;
/* Supported Verbs flow priority number detection. */
err = mlx5_flow_discover_priorities(eth_dev);
- if (err < 0)
+ if (err < 0) {
+ err = -err;
goto error;
+ }
priv->config.flow_prio = err;
/*
* Once the device is added to the list of memory event
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 11213e2..97af57b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -350,6 +350,7 @@ struct mlx5_flow_tunnel_info {
claim_zero(mlx5_glue->destroy_flow(flow));
priority = vprio[i];
}
+ mlx5_hrxq_drop_release(dev);
switch (priority) {
case 8:
priority = RTE_DIM(priority_map_3);
@@ -361,10 +362,9 @@ struct mlx5_flow_tunnel_info {
rte_errno = ENOTSUP;
DRV_LOG(ERR,
"port %u verbs maximum priority: %d expected 8/16",
- dev->data->port_id, vprio[i]);
+ dev->data->port_id, priority);
return -rte_errno;
}
- mlx5_hrxq_drop_release(dev);
DRV_LOG(INFO, "port %u flow maximum priority: %d",
dev->data->port_id, priority);
return priority;
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio probing
2019-02-21 9:02 [dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio probing Viacheslav Ovsiienko
@ 2019-03-07 8:34 ` Shahaf Shuler
0 siblings, 0 replies; 2+ messages in thread
From: Shahaf Shuler @ 2019-03-07 8:34 UTC (permalink / raw)
To: Slava Ovsiienko; +Cc: dev, stable
Thursday, February 21, 2019 11:02 AM, Viacheslav Ovsiienko:
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio
> probing
>
> The mlx5 PMD probes the Verbs flow priorities supported with
> ibv_create_flow() function. If rdma-core or kernel fails for some reason, the
> returned error causes the drop queue is not destroyed, and pd is locked by
> not freed resource.
>
> Also the mlx5_flow_discover_priorities() returned negative value as error,
> and this code was reported "as is", without sign changing (eventually causing
> assert(err > 0)).
>
> Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow")
> Cc: stable@dpdk.org
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Applied to next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-07 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21 9:02 [dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio probing Viacheslav Ovsiienko
2019-03-07 8:34 ` Shahaf Shuler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).