netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/sched: cls_api: increase max_reclassify_loop
@ 2021-05-19 13:17 Davide Caratti
  2021-05-19 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Davide Caratti @ 2021-05-19 13:17 UTC (permalink / raw)
  To: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller, Jakub Kicinski
  Cc: netdev, Marcelo Ricardo Leitner

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>
---
 net/sched/cls_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 40fbea626dfd..75e3a288a7c8 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -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;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net/sched: cls_api: increase max_reclassify_loop
  2021-05-19 13:17 [PATCH net-next] net/sched: cls_api: increase max_reclassify_loop Davide Caratti
@ 2021-05-19 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-19 20:20 UTC (permalink / raw)
  To: Davide Caratti
  Cc: jhs, xiyou.wangcong, jiri, davem, kuba, netdev, marcelo.leitner

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 19 May 2021 15:17:21 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net/sched: cls_api: increase max_reclassify_loop
    https://git.kernel.org/netdev/net-next/c/05ff8435e505

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 13:17 [PATCH net-next] net/sched: cls_api: increase max_reclassify_loop Davide Caratti
2021-05-19 20:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).