Skip to contentSkip to conversation

net/mlx5: fix SWS meter state initialization

PATCH In review Gregory Etelson 2 participants 3 messages Oct 27, 2024 – Oct 28, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix SWS meter state initialization

The PMD uses METER state variable to monitor ASO object availability.

The patch updates SWS meter object state.

Fixes 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")
---
 drivers/net/mlx5/mlx5_flow_meter.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_meter.c +2 -0
index 19d8607070..c605597662 100644
@@ -1914,6 +1914,7 @@ mlx5_flow_meter_action_modify(struct mlx5_priv *priv,
 	if (sh->meter_aso_en) {
 		fm->is_enable = !!is_enable;
 		aso_mtr = container_of(fm, struct mlx5_aso_mtr, fm);
+		aso_mtr->state = ASO_METER_WAIT;
 		ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE,
 						   aso_mtr, &priv->mtr_bulk,
 						   NULL, true);
@@ -2165,6 +2166,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	/* If ASO meter supported, update ASO flow meter by wqe. */
 	if (priv->sh->meter_aso_en) {
 		aso_mtr = container_of(fm, struct mlx5_aso_mtr, fm);
+		aso_mtr->state = ASO_METER_WAIT;
 		ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE,
 						   aso_mtr, &priv->mtr_bulk, NULL, true);
 		if (ret)
Signature · 1 line
2.43.0
Acked-by Dariusz Sosnowski on v1 1/1
#1 lore raw

Hi,

From: Gregory Etelson <[email protected]>
Sent: Sunday, October 27, 2024 5:31 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; [email protected]; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix SWS meter state initialization

The PMD uses METER state variable to monitor ASO object availability.

The patch updates SWS meter object state.

Fixes 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

Acked-by Dariusz Sosnowski on v1 1/1
#2 lore raw
In reply to Gregory Etelson

Hi,

From: Gregory Etelson <[email protected]>
Sent: Sunday, October 27, 2024 5:31 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; [email protected]; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix SWS meter state initialization

The PMD uses METER state variable to monitor ASO object availability.

The patch updates SWS meter object state.

Fixes 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh