提交 1ee47330 编写于 作者: J Jiri Pirko 提交者: 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: NJiri Pirko <jiri@mellanox.com>
Acked-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册