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:

committed by
David S. Miller

parent
1ee473306a
commit
319a1d1947
@@ -1207,6 +1207,10 @@ int nfp_flower_compile_action(struct nfp_app *app,
|
||||
bool pkt_host = false;
|
||||
u32 csum_updated = 0;
|
||||
|
||||
if (!flow_action_basic_hw_stats_types_check(&flow->rule->action,
|
||||
extack))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ);
|
||||
nfp_flow->meta.act_len = 0;
|
||||
tun_type = NFP_FL_TUNNEL_NONE;
|
||||
|
Reference in New Issue
Block a user