提交 6663cf82 编写于 作者: E Eli Britstein 提交者: David S. Miller

flow_offload: Fix flow action infrastructure

Implementation of macro "flow_action_for_each" introduced in
commit e3ab786b ("flow_offload: add flow action infrastructure")
and used in commit 73867881 ("drivers: net: use flow action
infrastructure") iterated the first item twice and did not reach the
last one. Fix it.

Fixes: e3ab786b ("flow_offload: add flow action infrastructure")
Fixes: 73867881 ("drivers: net: use flow action infrastructure")
Signed-off-by: NEli Britstein <elibr@mellanox.com>
Reviewed-by: NRoi Dayan <roid@mellanox.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Acked-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bd37fdf5
......@@ -171,7 +171,7 @@ static inline bool flow_action_has_entries(const struct flow_action *action)
}
#define flow_action_for_each(__i, __act, __actions) \
for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[__i++])
for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[++__i])
struct flow_rule {
struct flow_match match;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册