Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2983321ybi; Mon, 17 Jun 2019 14:03:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqySTiFEAaUfJ7eDr0S87pIsMR5PPDMGcu7V+GLVpndZLTPaAwWW2w2U5GV1uggEvTwLYeBO X-Received: by 2002:a17:902:848c:: with SMTP id c12mr108295168plo.17.1560805382325; Mon, 17 Jun 2019 14:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560805382; cv=none; d=google.com; s=arc-20160816; b=EhKkRo+sGnj2dXaXxInxCzu4B+ymkJ2935iDMlKPNFbitvMHrQTnuNrYdCrVh2q78S 0EAPDfTjAwyMeCqfpSQ8v5wZtFIRDcVAHOejh6srUySerpEfI4TjaYdLHWQFjM2cVGcc sICss/nJ4xd5Pyw5FPPespXWO4IlyGTXoDEeLFaDWSjVHh+90xONKvf3FjCAaRcLd1GX tcK4G1FrKziJSoc16HDDW+UegzkykjFmbyNhTriPs9amHxfgZnXvR/SnL7Gc7AP1Wnhw 7Vd7BUxRe8h/4XSp/s/VJTQ9ESNHH9FJSiOas3/3CHBM4Ck24CDb1OajGlwj9NfsuBMm 34Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=pk7C/mXtxkAKGDjV2/cf8XEcLeMtmCVaSw4m7gkmAq0=; b=Jwn2q8gLnZfAsuIwn9IQwXfjb2lnqYdtaGQRVeC/opruas/7fBFQn5HdJwxLEyRWIp WZFLxtI+9BAfrWYujkUs6NoIrFcr5EfvAvZlBHZPMALOBaaqy4k1rC2TsJDVBx8XzPgR Udw/1OovJYIzP2wdfKHaddclomCHHCr1txfAvu2/r5L+Sw4UKFVVPj28ur4n6qUu/Q6o 4idFoVBgcbg2tV7IuclIE1Y8vYQPdfXSplJ8Vyq+Ksqb2JZEpvQRw4FQCHwmu3Wa3YBy uPX5XUJzd4+D0qLawkbW7iJGLVBG63tWvXz82wQhGTsGk9mGGydvqcrJvEkNgGHhmTH2 S0WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si7082121pga.149.2019.06.17.14.02.47; Mon, 17 Jun 2019 14:03:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726898AbfFQVCc (ORCPT + 99 others); Mon, 17 Jun 2019 17:02:32 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:38280 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbfFQVCc (ORCPT ); Mon, 17 Jun 2019 17:02:32 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1A7631513979F; Mon, 17 Jun 2019 14:02:31 -0700 (PDT) Date: Mon, 17 Jun 2019 14:02:30 -0700 (PDT) Message-Id: <20190617.140230.537297372523260104.davem@davemloft.net> To: arnd@arndb.de Cc: saeedm@mellanox.com, leon@kernel.org, ozsh@mellanox.com, paulb@mellanox.com, elibr@mellanox.com, markb@mellanox.com, ogerlitz@mellanox.com, maorg@mellanox.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create From: David Miller In-Reply-To: <20190617110855.2085326-1-arnd@arndb.de> References: <20190617110855.2085326-1-arnd@arndb.de> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 17 Jun 2019 14:02:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Mon, 17 Jun 2019 13:08:22 +0200 > Putting an empty 'mlx5_flow_spec' structure on the stack is a bit > wasteful and causes a warning on 32-bit architectures when building > with clang -fsanitize-coverage: > > drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c: In function 'mlx5_eswitch_termtbl_create': > drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c:90:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > Since the structure is never written to, we can statically allocate > it to avoid the stack usage. To be on the safe side, mark all > subsequent function arguments that we pass it into as 'const' > as well. > > Fixes: 10caabdaad5a ("net/mlx5e: Use termination table for VLAN push actions") > Signed-off-by: Arnd Bergmann Saeed, once Arnd fixes the reverse christmas tree issue, I assume you will take this in via your tree? Thanks.