Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2403297rdb; Thu, 21 Sep 2023 18:55:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESfYmNoAyb2iV621SThz14bO7WqD5NEQICfKm68Fh9f1YzhEbdz2L33iFnLmbnxXXUw3FT X-Received: by 2002:a05:6870:328c:b0:1d6:1c63:d451 with SMTP id q12-20020a056870328c00b001d61c63d451mr6901153oac.18.1695347723070; Thu, 21 Sep 2023 18:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695347723; cv=none; d=google.com; s=arc-20160816; b=joCI2u8IYnGF7O7pmn+uI+Lu7kCd+5WVuvtc/QoOySrLoXiPtus4ohuPhlr2R1zJtU Q7JeiBRM0eh4sChkzubuOSYugo69K368JRISsENXv0fnuJQxrGqcEG0TVYwH4/C2JWT5 KCu1kfdr+ut+0iQRjjwQAZdU2toPCTB/hy5D40ZRTNDbo87FL39SYbmp8nMvvqXx/7vV UMU5hIVgpCTNyPSnw//YPBaqZv0i7svVCUEarvKrm4/vJZdwC4/dM5sxaf4yYCunRSJN AzxD4lYy6cfHxTmczl1y1oZNjSYEp+O1c959CzLY2lfkjZ0cfJvTiUkHoM4SweHID5Nb FwSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4FfisnjYNsOL8cGxpX9K2HnFfkT4nFMBwQIPYmNAGaM=; fh=E75f8n1lmKdky9pyl1B72dl1DbQz48jSmaiYJDhz67E=; b=Iki6n70HqI7NRJY4k6TkAwDru42NEmTWW/NIBy3rYO/ilH2FIwRAhNrFsHfj/stDXF nO/d3WcrUS7CI8iY/qXptcsbx9uwa+Pq5W+M6smcWN9ipHa+W6gvLQ/Zw6m2n33g9HAo I/IW6zFN0jHCAGqBr5tCLHDE7ZTL1Us5XBc1OwztgqCnwrh9uQAo7mFmCZrx6xOcnPb+ SzbXtzopfg+MM/xTIdWJGYocUpA2oukSTEFu5Y5cdj/QEQvDdMlhPzTfCxr+vUbNgvRk G510GlO427J6nZNT2y6p7M+9t2Cf5SX01TN4YlhspVWJlQ9xl0sFk6YLtbtSGcAMoeoI qTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DohyFrj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 1-20020a630101000000b005652a295669si2648010pgb.490.2023.09.21.18.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 18:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DohyFrj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B4ADB80DC40B; Thu, 21 Sep 2023 13:06:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231577AbjIUUFo (ORCPT + 99 others); Thu, 21 Sep 2023 16:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjIUUFc (ORCPT ); Thu, 21 Sep 2023 16:05:32 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 094E74006B for ; Thu, 21 Sep 2023 12:58:40 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-414ba610766so90891cf.0 for ; Thu, 21 Sep 2023 12:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695326319; x=1695931119; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4FfisnjYNsOL8cGxpX9K2HnFfkT4nFMBwQIPYmNAGaM=; b=DohyFrj5ueb5UIv15uZCeZD62asacUfPm4Fwbouisr2CHv2+V4pzfby22+TCYL9O4o LpmEc+ap+fcvDVBqB73CX9ahfdy8fCqJXIOsioTGGUZB666VpC2w5X5qsm94GC0GMHqw 9KLX0aVF1DsLDmfjTJ8wsf8gh+AlhAVCUYLpI1G+9tVJm/lQjwzaX1J88UpXdri/3wkf gyfbiOcbUVwdJ+0WLRTA2UXeXuvHSLi56pv6/v36Qjj+JwPvCxiBfa11aVfqWgQN0GZB LpgHPmSzYAp6zdjFNHqlkZgLS/Vxw916p5s3yKbyRBrCHwSiovUvUb3BvE/eCXtUOhpG gv+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695326319; x=1695931119; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4FfisnjYNsOL8cGxpX9K2HnFfkT4nFMBwQIPYmNAGaM=; b=BxlsM/eMGRF5HGQVfrJ/+oovmhLi+vNTE5g8w1wmxU4AznaSQoeqeDcZSKEfKLxxFt Y/ziXsHb+VhszJcVc6FMHdiFK31fsATN7Os9ECMpybCsAKzKlFCMWGCTVFxzgt73cCNe +kkcpwRZ8++sF5hiS6C48wLbklaceqHgv/0UQkXdLrOjOUWJDYRmo3MeYo6T3QPK5pZN X13yNh1LT/spzpo2hSO7yWPY2Mw/zatcMe/3Ro+OhipYacg8cJwWwZ+E+uIitdAI8llf rVKRslQDbiUBXzgyzXpB6Qlp69ptIfWg59xoKsHqP4jzR99jGtdcQcA2XXAVnc6a80Ov JFFw== X-Gm-Message-State: AOJu0Yy2mSlytrZdb8aG5943dYjogM5zDXWbJ5RAihiMcd0tO67BzEZh ucIuo4Hrw8n+w5Hxp6N8jnW313QePYcwBmxIFXgNQg== X-Received: by 2002:a05:622a:4d1:b0:3de:1aaa:42f5 with SMTP id q17-20020a05622a04d100b003de1aaa42f5mr1926qtx.15.1695326318747; Thu, 21 Sep 2023 12:58:38 -0700 (PDT) MIME-Version: 1.0 References: <20230921194314.1976605-1-i.maximets@ovn.org> In-Reply-To: <20230921194314.1976605-1-i.maximets@ovn.org> From: Eric Dumazet Date: Thu, 21 Sep 2023 21:58:27 +0200 Message-ID: Subject: Re: [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions To: Ilya Maximets Cc: netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Paolo Abeni , linux-kernel@vger.kernel.org, dev@openvswitch.org, Pravin B Shelar , Eelco Chaudron Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:06:01 -0700 (PDT) On Thu, Sep 21, 2023 at 9:42=E2=80=AFPM Ilya Maximets = wrote: > > do_execute_actions() function can be called recursively multiple > times while executing actions that require pipeline forking or > recirculations. It may also be re-entered multiple times if the packet > leaves openvswitch module and re-enters it through a different port. > > Currently, there is a 256-byte array allocated on stack in this > function that is supposed to hold NSH header. Compilers tend to > pre-allocate that space right at the beginning of the function: > > a88: 48 81 ec b0 01 00 00 sub $0x1b0,%rsp > > NSH is not a very common protocol, but the space is allocated on every > recursive call or re-entry multiplying the wasted stack space. > Reviewed-by: Eric Dumazet