summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-03-07 14:40:12 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-09 07:07:47 +0300
commit1ee473306a28ae685e4a368f3cb212ce1fc1b0fe (patch)
treeeb4efa98e9dd1e4d59feec69d94615b08e3097c5
parent2514921e72472806b059316122f232c0bbdaf1a1 (diff)
downloadlinux-1ee473306a28ae685e4a368f3cb212ce1fc1b0fe.tar.xz
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>
-rw-r--r--drivers/net/ethernet/mscc/ocelot_flower.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_flower.c b/drivers/net/ethernet/mscc/ocelot_flower.c
index 8993dadf063c..8986f209e981 100644
--- a/drivers/net/ethernet/mscc/ocelot_flower.c
+++ b/drivers/net/ethernet/mscc/ocelot_flower.c
@@ -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) {