Skip to contentSkip to conversation

net/mlx5: provide correct items to meter sub-policy

PATCH In review Shun Hao 2 participants 2 messages Feb 18, 2022 – Feb 22, 2022 1 message not in the archive Network drivers

lore
Share & tools
lore

Shun Hao

author
#0 lore raw

PATCH 1/1 net/mlx5: provide correct items to meter sub-policy

If meter policy action was RSS, the correct items were not provided for sub-policy creation.

This fixes the issue by providing original items in meter split, so the sub-policy creation gets the correct items.

Fixes 3c481324baf3 ("net/mlx5: fix meter flow direction check")
---
 drivers/net/mlx5/mlx5_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow.c +3 -1
index 179cc3b303..0311f91bf2 100644
@@ -5022,6 +5022,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	uint32_t tag_id = 0;
 	struct rte_flow_item *vlan_item_dst = NULL;
 	const struct rte_flow_item *vlan_item_src = NULL;
+	const struct rte_flow_item *orig_items = items;
 	struct rte_flow_action *hw_mtr_action;
 	struct rte_flow_action *action_pre_head = NULL;
 	int32_t flow_src_port = priv->representor_id;
@@ -5146,7 +5147,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 
 		if (!fm->def_policy) {
 			sub_policy = get_meter_sub_policy(dev, flow, wks,
-							  attr, items, error);
+							  attr, orig_items,
+							  error);
 			if (!sub_policy)
 				return -rte_errno;
 		} else {
Signature · 1 line
2.20.0

A message that is not in the archive (sent off-list or not yet received): BYAPR12MB3078A39A3E0DFC469446DB0FCF3B9@BYAPR12MB3078.namprd12.prod.outlook.com

#2 lore raw

Hi,

Quoted 13 lines

-----Original Message-----
From: Shun Hao <[email protected]>
Sent: Friday, February 18, 2022 9:43 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; [email protected] ; [email protected]
Cc: [email protected] ; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH v1] net/mlx5: provide correct items to meter sub-policy

If meter policy action was RSS, the correct items were not provided for sub- policy creation.

Quoted 8 lines

This fixes the issue by providing original items in meter split, so the sub-policy creation gets the correct items.

Fixes 3c481324baf3 ("net/mlx5: fix meter flow direction check")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh