From: Shun Hao Date: Fri, 18 Feb 2022 07:43:08 +0000 (+0200) Subject: net/mlx5: fix meter sub-policy creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=94112badf6f579ac76e96bda3b015ffee95a2c68;p=dpdk.git net/mlx5: fix meter sub-policy creation 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") Cc: stable@dpdk.org Signed-off-by: Shun Hao Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 5b5b00cc3e..1c3f648491 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5021,6 +5021,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; @@ -5145,7 +5146,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 {