* [dpdk-stable] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion @ 2020-11-11 7:36 Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum ` (2 more replies) 0 siblings, 3 replies; 4+ 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] 4+ messages in thread
* [dpdk-stable] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe 2020-11-11 7:36 [dpdk-stable] [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-stable] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum 2020-11-13 22:26 ` [dpdk-stable] [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon 2 siblings, 0 replies; 4+ 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] 4+ messages in thread
* [dpdk-stable] [PATCH 5/5] common/mlx5: fix flex parser creation error flow 2020-11-11 7:36 [dpdk-stable] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [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-stable] [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon 2 siblings, 0 replies; 4+ 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] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion 2020-11-11 7:36 [dpdk-stable] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum @ 2020-11-13 22:26 ` Thomas Monjalon 2 siblings, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2020-11-13 22:26 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-11 7:36 [dpdk-stable] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum 2020-11-11 7:36 ` [dpdk-stable] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum 2020-11-13 22:26 ` [dpdk-stable] [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).