Blob Blame History Raw
From: Jiri Pirko <jiri@mellanox.com>
Date: Mon, 16 Mar 2020 09:03:25 +0100
Subject: net: sched: set the hw_stats_type in pedit loop
Patch-mainline: v5.7-rc1
Git-commit: 74522e7baae2561870ea8ddf09dc6a126458cd7b
References: jsc#SLE-15172

For a single pedit action, multiple offload entries may be used. Set the
hw_stats_type to all of them.

Fixes: 44f865801741 ("sched: act: allow user to specify type of HW stats for a filter")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/sched/cls_api.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3536,6 +3536,7 @@ int tc_setup_flow_action(struct flow_act
 				entry->mangle.val = tcf_pedit_val(act, k);
 				entry->mangle.offset = tcf_pedit_offset(act, k);
 				entry = &flow_action->entries[++j];
+				entry->hw_stats_type = act->hw_stats_type;
 			}
 		} else if (is_tcf_csum(act)) {
 			entry->id = FLOW_ACTION_CSUM;