diff options
author | Pedro Tammela <pctammela@mojatatu.com> | 2023-12-29 16:26:41 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-04 05:36:24 +0300 |
commit | c2a67de9bb543394aee869d1c68b5fbcd8a89dcb (patch) | |
tree | 13ed7c2136ecf358b3e7bc6a61b740ce8ca07b79 /net/sched/act_connmark.c | |
parent | d3d344a1ca69d8fb2413e29e6400f3ad58a05c06 (diff) | |
download | linux-c2a67de9bb543394aee869d1c68b5fbcd8a89dcb.tar.xz |
net/sched: introduce ACT_P_BOUND return code
Bound actions always return '0' and as of today we rely on '0'
being returned in order to properly skip bound actions in
tcf_idr_insert_many. In order to further improve maintainability,
introduce the ACT_P_BOUND return code.
Actions are updated to return 'ACT_P_BOUND' instead of plain '0'.
tcf_idr_insert_many is then updated to check for 'ACT_P_BOUND'.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/20231229132642.1489088-1-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/act_connmark.c')
-rw-r--r-- | net/sched/act_connmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c index 0d7aee8933c5..f8762756657d 100644 --- a/net/sched/act_connmark.c +++ b/net/sched/act_connmark.c @@ -146,7 +146,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla, } else if (ret > 0) { ci = to_connmark(*a); if (bind) { - err = 0; + err = ACT_P_BOUND; goto out_free; } if (!(flags & TCA_ACT_FLAGS_REPLACE)) { |