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:
parent
2514921e72
commit
1ee473306a
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue