Skip to content

Commit

Permalink
net/sched: cls_api: increase max_reclassify_loop
Browse files Browse the repository at this point in the history
modern userspace applications, like OVN, can configure the TC datapath to
"recirculate" packets several times. If more than 4 "recirculation" rules
are configured, packets can be dropped by __tcf_classify().
Changing the maximum number of reclassifications (from 4 to 16) should be
sufficient to prevent drops in most use cases, and guard against loops at
the same time.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Davide Caratti authored and David S. Miller committed May 19, 2021
1 parent 7b16509 commit 05ff843
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ static inline int __tcf_classify(struct sk_buff *skb,
u32 *last_executed_chain)
{
#ifdef CONFIG_NET_CLS_ACT
const int max_reclassify_loop = 4;
const int max_reclassify_loop = 16;
const struct tcf_proto *first_tp;
int limit = 0;

Expand Down

0 comments on commit 05ff843

Please sign in to comment.