From patchwork Fri Jan 20 17:01:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Davide Caratti X-Patchwork-Id: 13110233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF2B5C05027 for ; Fri, 20 Jan 2023 17:02:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjATRC5 (ORCPT ); Fri, 20 Jan 2023 12:02:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbjATRC5 (ORCPT ); Fri, 20 Jan 2023 12:02:57 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A55D44ABEC for ; Fri, 20 Jan 2023 09:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674234122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bixlKFajuFSCm4moj8W/iRIzzqUkOwnKVEiWQwEKwj4=; b=dUpureDQtxnnylnvv4h/r75lMWDjYlNm62y1GTvd6UmkuHo3XESZAnd0wTMAmRWU/HqgDY h0HtaqzsHuU2pbCqKIsd22zVsSKOd10QEsBE09zwv3O3bwoZXJA1NhVf8YcdFt9dnSTQ1G cUQTE+lExP+Yv40kZBPkVbxuIxQBdaQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-656-tqa8IWJENZe487jGdaek5w-1; Fri, 20 Jan 2023 12:01:58 -0500 X-MC-Unique: tqa8IWJENZe487jGdaek5w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 759B83814580; Fri, 20 Jan 2023 17:01:58 +0000 (UTC) Received: from dcaratti.users.ipa.redhat.com (ovpn-194-73.brq.redhat.com [10.40.194.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 312A92166B2A; Fri, 20 Jan 2023 17:01:54 +0000 (UTC) From: Davide Caratti To: jhs@mojatatu.com Cc: jiri@resnulli.us, lucien.xin@gmail.com, marcelo.leitner@gmail.com, netdev@vger.kernel.org, pabeni@redhat.com, wizhao@redhat.com, xiyou.wangcong@gmail.com Subject: [PATCH net-next 0/2] net/sched: use the backlog for nested mirred ingress Date: Fri, 20 Jan 2023 18:01:38 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org TC mirred has a protection against excessive stack growth, but that protection doesn't really guarantee the absence of recursion, nor it guards against loops. Patch 1/2 rewords "recursion" to "nesting" to make this more clear. We can leverage on this existing mechanism to prevent TCP / SCTP from doing soft lock-up in some specific scenarios that uses mirred egress->ingress: patch 2 changes mirred so that the networking backlog is used for nested mirred ingress actions. Davide Caratti (2): net/sched: act_mirred: better wording on protection against excessive stack growth act_mirred: use the backlog for nested calls to mirred ingress net/sched/act_mirred.c | 23 ++++++--- .../selftests/net/forwarding/tc_actions.sh | 49 ++++++++++++++++++- 2 files changed, 63 insertions(+), 9 deletions(-)