mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
flow_offload: check for basic action hw stats type
Introduce flow_action_basic_hw_stats_types_check() helper and use it in drivers. That sanitizes the drivers which do not have support for action HW stats types. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1ee473306a
commit
319a1d1947
12 changed files with 119 additions and 11 deletions
|
@ -865,6 +865,10 @@ static int dsa_slave_add_cls_matchall(struct net_device *dev,
|
|||
if (!flow_offload_has_one_action(&cls->rule->action))
|
||||
return err;
|
||||
|
||||
if (!flow_action_basic_hw_stats_types_check(&cls->rule->action,
|
||||
cls->common.extack))
|
||||
return err;
|
||||
|
||||
act = &cls->rule->action.entries[0];
|
||||
|
||||
if (act->id == FLOW_ACTION_MIRRED && protocol == htons(ETH_P_ALL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue