* [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion
@ 2020-11-11 7:36 Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow Michael Baum
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Michael Baum @ 2020-11-11 7:36 UTC (permalink / raw)
To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable
The RSS flow expansion get a memory buffer to fill the new patterns of
the expanded flows.
This memory management saves the next address to write into the buffer
in a dedicated variable.
The calculation for the next address was wrongly also done when all the
patterns were ready.
Remove it.
Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 92adfca..ebd79c6 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -377,8 +377,6 @@ struct mlx5_flow_expand_rss {
user_pattern_size);
addr = (void *)(((uintptr_t)addr) + user_pattern_size);
rte_memcpy(addr, flow_items, elt * sizeof(*item));
- addr = (void *)(((uintptr_t)addr) +
- elt * sizeof(*item));
}
}
return lsize;
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
@ 2020-11-11 7:36 ` Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize " Michael Baum
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Baum @ 2020-11-11 7:36 UTC (permalink / raw)
To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko
In Rx queue creation, there is a validation for the Rx configuration.
When scatter offload validation for buffer split is failed, the Rx queue
object memory was not freed what caused a memory leak.
Free it.
Fixes: a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 4e6b8f4..0693c92 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1506,7 +1506,7 @@ struct mlx5_rxq_ctrl *
dev->data->port_id, idx, mb_len, max_rx_pkt_len,
RTE_PKTMBUF_HEADROOM);
rte_errno = ENOSPC;
- return NULL;
+ goto error;
}
tmpl->type = MLX5_RXQ_TYPE_STANDARD;
if (mlx5_mr_btree_init(&tmpl->rxq.mr_ctrl.cache_bh,
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize error flow
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow Michael Baum
@ 2020-11-11 7:36 ` Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Baum @ 2020-11-11 7:36 UTC (permalink / raw)
To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko
In ASO age pools resize, the PMD starts ASO data-path.
When starting ASO data-path is failed, the pools memory was not freed
what caused a memory leak.
Free it.
Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 78c710f..8214c59 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9347,8 +9347,10 @@ struct mlx5_cache_entry *
/* First ASO flow hit allocation - starting ASO data-path. */
int ret = mlx5_aso_queue_start(priv->sh);
- if (ret)
+ if (ret) {
+ mlx5_free(pools);
return ret;
+ }
}
mng->n = resize;
mng->pools = pools;
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize " Michael Baum
@ 2020-11-11 7:36 ` Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum
2020-11-13 22:26 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon
4 siblings, 0 replies; 6+ messages in thread
From: Michael Baum @ 2020-11-11 7:36 UTC (permalink / raw)
To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable
Bonding adjustment is done only when DEVX_PORT is supported in the
rdma-core.
Some bonding condition was done even when DEVX_PORT is not supported.
Remove it.
Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index c78d56f..ce25108 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1942,6 +1942,7 @@
(list[ns].ifindex,
&list[ns].info);
}
+#ifdef HAVE_MLX5DV_DR_DEVX_PORT
if (!ret && bd >= 0) {
switch (list[ns].info.name_type) {
case MLX5_PHYS_PORT_NAME_TYPE_UPLINK:
@@ -1959,6 +1960,7 @@
}
continue;
}
+#endif
if (!ret && (list[ns].info.representor ^
list[ns].info.master))
ns++;
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH 5/5] common/mlx5: fix flex parser creation error flow
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
` (2 preceding siblings ...)
2020-11-11 7:36 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum
@ 2020-11-11 7:36 ` Michael Baum
2020-11-13 22:26 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon
4 siblings, 0 replies; 6+ messages in thread
From: Michael Baum @ 2020-11-11 7:36 UTC (permalink / raw)
To: dev
Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko,
Michael Baum, stable
From: Michael Baum <michaelba@mellanox.com>
The mlx5_devx_cmd_create_flex_parser function defines a local array
(with constant size) named in, and then allocates a pointer to
mlx5_devx_obj structure by the mlx5_malloc function.
If the allocation fails, the function releases the array in and returns
NULL. However, the array has been defined locally on the stack and the
mlx5_free function is not required to release it.
Remove the call to the mlx5_free function.
Fixes: 66914d19d135 ("common/mlx5: convert control path memory to unified malloc")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 5998c4b..9c1d188 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -530,15 +530,13 @@ struct mlx5_devx_obj *
void *sample = MLX5_ADDR_OF(parse_graph_flex, flex, sample_table);
void *in_arc = MLX5_ADDR_OF(parse_graph_flex, flex, input_arc);
void *out_arc = MLX5_ADDR_OF(parse_graph_flex, flex, output_arc);
- struct mlx5_devx_obj *parse_flex_obj = NULL;
+ struct mlx5_devx_obj *parse_flex_obj = mlx5_malloc
+ (MLX5_MEM_ZERO, sizeof(*parse_flex_obj), 0, SOCKET_ID_ANY);
uint32_t i;
- parse_flex_obj = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*parse_flex_obj), 0,
- SOCKET_ID_ANY);
if (!parse_flex_obj) {
- DRV_LOG(ERR, "Failed to allocate flex parser data");
+ DRV_LOG(ERR, "Failed to allocate flex parser data.");
rte_errno = ENOMEM;
- mlx5_free(in);
return NULL;
}
MLX5_SET(general_obj_in_cmd_hdr, hdr, opcode,
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
` (3 preceding siblings ...)
2020-11-11 7:36 ` [dpdk-dev] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum
@ 2020-11-13 22:26 ` Thomas Monjalon
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2020-11-13 22:26 UTC (permalink / raw)
To: Michael Baum
Cc: dev, Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable, asafp
11/11/2020 08:36, Michael Baum:
> The RSS flow expansion get a memory buffer to fill the new patterns of
> the expanded flows.
> This memory management saves the next address to write into the buffer
> in a dedicated variable.
>
> The calculation for the next address was wrongly also done when all the
> patterns were ready.
>
> Remove it.
>
> Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
> Cc: stable@dpdk.org
>
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
Series applied in next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-11-13 22:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize " Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum
2020-11-11 7:36 ` [dpdk-dev] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum
2020-11-13 22:26 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon
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).