Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp626953pxv; Thu, 15 Jul 2021 11:54:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqCGm+KjxpIiCLqfAzM6qIyBH1XseQUuO2Jc2PRXfGXExcXrz9a9VYlv/PyIzQ0CSSotFb X-Received: by 2002:a05:6e02:1bc1:: with SMTP id x1mr3593569ilv.33.1626375248563; Thu, 15 Jul 2021 11:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375248; cv=none; d=google.com; s=arc-20160816; b=D2eG6md2Bkpu6c3qhh7bfPt5Xp1zcIBDK8lmXLnOfaJtA1T31OW9chVljUmViBj5tn F5DpHAsmhLyAnX1BFYP5BxSsne6Zo8/yAveLr8JKFO+O/6vKzr9mB7ljTm9ot6yDMt2/ vx8u3V9kgS6yKWbxexpNnktOwDuQM9l8A7tzq0AW1NlG1i7RKxVyytWblCimCtHachY1 9f4rOX7z+IeQBYjdo6vnVBylL3mN9RlUnY818NeDMjwyOds4VhKs6LfM/+Me+A+xB4ew tdqmhaKjru98LrxvIkFWPN+YTPgNX7bB/4NC59aLqrdRofwYscyDr5AGUe6gXkdBDPsr oHvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=06/JJxsfPF3HXi3KSmaYaXMEB7ut18pCZ6Q4u6v8v5M=; b=1BjPRU3lLqM7THHdmzttubV85Dt4vNgIBJGP51QIAJ0ChVD5FaF9570mTfepjwesU5 iURIvsvdrQd1zmj3N3QWJYLwUnuBTjQr0NuOToItcr5pEZF5xWdDd0wZnhH9Cu79oXQl jFgGtHc+X4YfMq5hpc0MBjb58n4zJXNd04ny2DHDkydthwHUWu7Y74OD6UNlVjpJSzjM JwCoPs4ARMwbMgwp9nefjnkkuoNs5v+oZNmmObNIpMLM+pW9p84BztKGrW51oJFrjpJz nfPJszPBXjuUQuhshjEtZxz1NdE+cjdF3ByI0prWl6CwYa3IpVLeo+mlctCTqznuD6U3 NvWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CTlN8Kc3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si9053636jaj.25.2021.07.15.11.53.55; Thu, 15 Jul 2021 11:54:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CTlN8Kc3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241553AbhGOSy2 (ORCPT + 99 others); Thu, 15 Jul 2021 14:54:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:53496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237917AbhGOSue (ORCPT ); Thu, 15 Jul 2021 14:50:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAA78613E0; Thu, 15 Jul 2021 18:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626374861; bh=vC2jNN6lJLLT6eGljA0ccjhw4SGacE5QaRnNIflnTyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CTlN8Kc3Cy7i/S1rT3AN5N20P9tZmQ5x5xNuDbPYhp2kEKJsR2zboJ0pqJfHvtFP5 H/63pmqUuV3NCh24Or56fqOkTyItdLUpnaByAWULTpKcaO+YWJg1LTtGUCERX+CZGu TCVZHVcu5jBDVgfHN31jQleUZBqkPZKqY0xEnmdw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Davide Caratti , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 022/215] net/sched: cls_api: increase max_reclassify_loop Date: Thu, 15 Jul 2021 20:36:34 +0200 Message-Id: <20210715182602.772139924@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davide Caratti [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 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; -- 2.30.2