From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27702C31E5B for ; Mon, 17 Jun 2019 21:02:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0D552089E for ; Mon, 17 Jun 2019 21:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbfFQVCc (ORCPT ); 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.