diff mbox series

[net-next] net: sched: set the hw_stats_type in pedit loop

Message ID 20200316080325.6513-1-jiri@resnulli.us
State New
Headers show
Series [net-next] net: sched: set the hw_stats_type in pedit loop | expand

Commit Message

Jiri Pirko March 16, 2020, 8:03 a.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

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>
---
 net/sched/cls_api.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 2046102a763e..363264ca2e09 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3614,6 +3614,7 @@  int tc_setup_flow_action(struct flow_action *flow_action,
 				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;