aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2021-05-19 15:17:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-19 09:44:40 +0200
commit1b832bd77799dc20884ecfea06100433c82d69d3 (patch)
treef19d98b2b565c506dea9cb8190acfde240aee180
parent6ceb0182b087e64b754e3bfbcb4d71d2a51cb052 (diff)
downloadkernel_replicant_linux-1b832bd77799dc20884ecfea06100433c82d69d3.tar.gz
kernel_replicant_linux-1b832bd77799dc20884ecfea06100433c82d69d3.tar.bz2
kernel_replicant_linux-1b832bd77799dc20884ecfea06100433c82d69d3.zip
net/sched: cls_api: increase max_reclassify_loop
[ Upstream commit 05ff8435e50569a0a6b95e5ceaea43696e8827ab ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--net/sched/cls_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index a281da07bb1d..30090794b791 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1532,7 +1532,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;