ocelot_flower: use flow_offload_has_one_action() helper

Instead of directly checking number of action entries, use
flow_offload_has_one_action() helper.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2020-03-07 12:40:12 +01:00 committed by David S. Miller
parent 2514921e72
commit 1ee473306a
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f,
const struct flow_action_entry *a;
int i;
if (f->rule->action.num_entries != 1)
if (!flow_offload_has_one_action(&f->rule->action))
return -EOPNOTSUPP;
flow_action_for_each(i, a, &f->rule->action) {