Skip to contentSkip to conversation

net/mlx5: fix job flow memory calculation

PATCH In review Suanming Mou 2 participants 2 messages Nov 9, 2023 – Nov 12, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix job flow memory calculation

The upd_flow is the final object in the memory layout.

This commit adjusts the new job memory start from upd_flow.

Fixes 63296851fadb ("net/mlx5: support flow rule update")
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +1 -2
index deb0be05fb..d512889682 100644
@@ -9088,8 +9088,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
 					    &priv->hw_q[nb_q_updated];
 		else
 			priv->hw_q[i].job = (struct mlx5_hw_q_job **)
-				&job[_queue_attr[i - 1]->size - 1].items
-				 [MLX5_HW_MAX_ITEMS];
+				&job[_queue_attr[i - 1]->size - 1].upd_flow[1];
 		job = (struct mlx5_hw_q_job *)
 		      &priv->hw_q[i].job[_queue_attr[i]->size];
 		mhdr_cmd = (struct mlx5_modification_cmd *)
Signature · 1 line
2.34.1
#1 lore raw

Hi,

Quoted 9 lines

-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Thursday, November 9, 2023 10:12 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Dariusz Sosnowski <[email protected]>
Subject: [PATCH] net/mlx5: fix job flow memory calculation

Quoted 8 lines

The upd_flow is the final object in the memory layout.

This commit adjusts the new job memory start from upd_flow.

Fixes 63296851fadb ("net/mlx5: support flow rule update")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh