Commit 1ee47330 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

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: default avatarJiri Pirko <jiri@mellanox.com>
Acked-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2514921e
...@@ -14,7 +14,7 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f, ...@@ -14,7 +14,7 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f,
const struct flow_action_entry *a; const struct flow_action_entry *a;
int i; int i;
if (f->rule->action.num_entries != 1) if (!flow_offload_has_one_action(&f->rule->action))
return -EOPNOTSUPP; return -EOPNOTSUPP;
flow_action_for_each(i, a, &f->rule->action) { flow_action_for_each(i, a, &f->rule->action) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment