[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200307114020.8664-3-jiri@resnulli.us>
Date: Sat, 7 Mar 2020 12:40:12 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, saeedm@...lanox.com,
leon@...nel.org, michael.chan@...adcom.com, vishal@...lsio.com,
jeffrey.t.kirsher@...el.com, idosch@...lanox.com,
aelior@...vell.com, peppe.cavallaro@...com,
alexandre.torgue@...com, jhs@...atatu.com,
xiyou.wangcong@...il.com, pablo@...filter.org,
ecree@...arflare.com, mlxsw@...lanox.com
Subject: [patch net-next v4 02/10] ocelot_flower: use flow_offload_has_one_action() helper
From: Jiri Pirko <jiri@...lanox.com>
Instead of directly checking number of action entries, use
flow_offload_has_one_action() helper.
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
Acked-by: Vladimir Oltean <vladimir.oltean@....com>
---
v1->v2:
- new patch
---
drivers/net/ethernet/mscc/ocelot_flower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.21.1
Powered by blists - more mailing lists