All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix entry size in HWS construct data ipool
@ 2022-06-02 11:39 Michael Baum
  2022-06-05 15:07 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Baum @ 2022-06-02 11:39 UTC (permalink / raw)
  To: dev
  Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, suanmingm, stable

The mlx5_action_construct_data structure memory is managed by ipool
named acts_ipool.

The size of one entry in this ipool is mistakenly defined as size of
rte_flow_hw structure.
This size is used to reset in the allocated part. When the size is
incorrect it resets memory that does not belong to it.

This patch defines the correct size.

Fixes: f13fab23922b ("net/mlx5: add flow jump action")
Cc: suanmingm@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 2c2bd0feef..12498794a5 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -2044,7 +2044,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
 	struct mlx5_hw_q_job *job = NULL;
 	uint32_t mem_size, i, j;
 	struct mlx5_indexed_pool_config cfg = {
-		.size = sizeof(struct rte_flow_hw),
+		.size = sizeof(struct mlx5_action_construct_data),
 		.trunk_size = 4096,
 		.need_lock = 1,
 		.release_mem_en = !!priv->sh->config.reclaim_mode,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/mlx5: fix entry size in HWS construct data ipool
  2022-06-02 11:39 [PATCH] net/mlx5: fix entry size in HWS construct data ipool Michael Baum
@ 2022-06-05 15:07 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2022-06-05 15:07 UTC (permalink / raw)
  To: Michael Baum, dev; +Cc: Matan Azrad, Slava Ovsiienko, Suanming Mou, stable

Hi,

> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> Sent: Thursday, June 2, 2022 2:39 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Suanming Mou <suanmingm@nvidia.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix entry size in HWS construct data ipool
> 
> The mlx5_action_construct_data structure memory is managed by ipool
> named acts_ipool.
> 
> The size of one entry in this ipool is mistakenly defined as size of
> rte_flow_hw structure.
> This size is used to reset in the allocated part. When the size is incorrect it
> resets memory that does not belong to it.
> 
> This patch defines the correct size.
> 
> Fixes: f13fab23922b ("net/mlx5: add flow jump action")
> Cc: suanmingm@nvidia.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-05 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 11:39 [PATCH] net/mlx5: fix entry size in HWS construct data ipool Michael Baum
2022-06-05 15:07 ` Raslan Darawsheh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.