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=-12.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 7E9FBC64E8A for ; Thu, 3 Dec 2020 13:44:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D992320709 for ; Thu, 3 Dec 2020 13:44:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D992320709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E496D6B005D; Thu, 3 Dec 2020 08:43:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DD2FC8D0001; Thu, 3 Dec 2020 08:43:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC11F6B0070; Thu, 3 Dec 2020 08:43:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0089.hostedemail.com [216.40.44.89]) by kanga.kvack.org (Postfix) with ESMTP id B3B0E6B005D for ; Thu, 3 Dec 2020 08:43:59 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 78E5482499A8 for ; Thu, 3 Dec 2020 13:43:59 +0000 (UTC) X-FDA: 77552089398.25.rose29_2507392273bc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 4EE871804E3A8 for ; Thu, 3 Dec 2020 13:43:59 +0000 (UTC) X-HE-Tag: rose29_2507392273bc X-Filterd-Recvd-Size: 10542 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Dec 2020 13:43:58 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 03 Dec 2020 05:43:57 -0800 Received: from localhost (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 3 Dec 2020 13:43:53 +0000 Date: Thu, 3 Dec 2020 15:43:50 +0200 From: Ido Schimmel To: kernel test robot CC: , , "Linux Memory Management List" , Jakub Kicinski , Jiri Pirko Subject: Re: [linux-next:master 5737/10502] drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:6360:13: warning: stack frame size of 2064 bytes in function 'mlxsw_sp_router_fib_event_work' Message-ID: <20201203134350.GA1613892@shredder.lan> References: <202012032039.ypla4NJl-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <202012032039.ypla4NJl-lkp@intel.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1607003037; bh=raBSg/Yhyw8o7U6lMNHjSjCgfioFegRcBcS1dZ7IcV0=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:X-Originating-IP: X-ClientProxiedBy; b=qYV20rKAIj2FdqvTi5tdTOTdLXuVVIVpMxVpEaikbvZ5bEKkdfH3kvSZyLcdjZRG0 ELrFmm+Ls9aVUsOFz/6ltH7EtShFeFrmPjPw9YUtOagwZpTAc/7HwJbD21TmobLh+6 JDyam0p+Zsh3W19dhjUGCzsyqfg0Nxg/pSEyo0Qo70UUIfdZXpFCHmshUHMmOMp0N0 KkZWVZl1Lnxtf5km4+4cZRZLncrX5UI40jFXyt7VVOE0z0Cnvrq4hNzJsIRSnTIyGM iI04TmR8Q551VfvLjqexWUkRZzEKTi4DcfdINUqCqQKLjeAlYRTnbxXy1XzF/JdIIX 9/DWxkZ2XFQxA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Dec 03, 2020 at 08:09:46PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: bfd521e1af519bb7096efc845f6a64a7de28c472 > commit: c0351b7c25ffd52408c1297fbe552f185d5aac3f [5737/10502] mlxsw: spectrum_router: Set FIB entry's type based on nexthop group > config: powerpc64-randconfig-r032-20201203 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd) Is this some known issue with clang maybe? On x86 with gcc 10.2.1 I get: 0xffffffff8171c5c00 mlxsw_sp_router_fib_event_work [vmlinux]:592 Enabling a lot of debug options gets us to 944: 0xffffffff82d1eca00 mlxsw_sp_router_fib_event_work [vmlinux]:944 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install powerpc64 cross compiling tool for clang build > # apt-get install binutils-powerpc64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c0351b7c25ffd52408c1297fbe552f185d5aac3f > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout c0351b7c25ffd52408c1297fbe552f185d5aac3f > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:6360:13: warning: stack frame size of 2064 bytes in function 'mlxsw_sp_router_fib_event_work' [-Wframe-larger-than=] > static void mlxsw_sp_router_fib_event_work(struct work_struct *work) > ^ > 1 warning generated. > > vim +/mlxsw_sp_router_fib_event_work +6360 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c > > d42b0965b1d4fe0 Yotam Gigi 2017-09-27 6359 > c1b290d594a12b4 Jiri Pirko 2020-11-10 @6360 static void mlxsw_sp_router_fib_event_work(struct work_struct *work) > c1b290d594a12b4 Jiri Pirko 2020-11-10 6361 { > c1b290d594a12b4 Jiri Pirko 2020-11-10 6362 struct mlxsw_sp_router *router = container_of(work, struct mlxsw_sp_router, fib_event_work); > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6363 struct mlxsw_sp_fib_entry_op_ctx *op_ctx = router->ll_op_ctx; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6364 struct mlxsw_sp *mlxsw_sp = router->mlxsw_sp; > 505cd65c66e8223 Jiri Pirko 2020-11-10 6365 struct mlxsw_sp_fib_event *next_fib_event; > 505cd65c66e8223 Jiri Pirko 2020-11-10 6366 struct mlxsw_sp_fib_event *fib_event; > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6367 int last_family = AF_UNSPEC; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6368 LIST_HEAD(fib_event_queue); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6369 > c1b290d594a12b4 Jiri Pirko 2020-11-10 6370 spin_lock_bh(&router->fib_event_queue_lock); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6371 list_splice_init(&router->fib_event_queue, &fib_event_queue); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6372 spin_unlock_bh(&router->fib_event_queue_lock); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6373 > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6374 /* Router lock is held here to make sure per-instance > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6375 * operation context is not used in between FIB4/6 events > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6376 * processing. > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6377 */ > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6378 mutex_lock(&router->lock); > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6379 mlxsw_sp_fib_entry_op_ctx_clear(op_ctx); > 505cd65c66e8223 Jiri Pirko 2020-11-10 6380 list_for_each_entry_safe(fib_event, next_fib_event, > 505cd65c66e8223 Jiri Pirko 2020-11-10 6381 &fib_event_queue, list) { > 505cd65c66e8223 Jiri Pirko 2020-11-10 6382 /* Check if the next entry in the queue exists and it is > 505cd65c66e8223 Jiri Pirko 2020-11-10 6383 * of the same type (family and event) as the currect one. > 505cd65c66e8223 Jiri Pirko 2020-11-10 6384 * In that case it is permitted to do the bulking > 505cd65c66e8223 Jiri Pirko 2020-11-10 6385 * of multiple FIB entries to a single register write. > 505cd65c66e8223 Jiri Pirko 2020-11-10 6386 */ > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6387 op_ctx->bulk_ok = !list_is_last(&fib_event->list, &fib_event_queue) && > 505cd65c66e8223 Jiri Pirko 2020-11-10 6388 fib_event->family == next_fib_event->family && > 505cd65c66e8223 Jiri Pirko 2020-11-10 6389 fib_event->event == next_fib_event->event; > 505cd65c66e8223 Jiri Pirko 2020-11-10 6390 > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6391 /* In case family of this and the previous entry are different, context > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6392 * reinitialization is going to be needed now, indicate that. > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6393 * Note that since last_family is initialized to AF_UNSPEC, this is always > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6394 * going to happen for the first entry processed in the work. > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6395 */ > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6396 if (fib_event->family != last_family) > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6397 op_ctx->initialized = false; > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6398 > c1b290d594a12b4 Jiri Pirko 2020-11-10 6399 switch (fib_event->family) { > c1b290d594a12b4 Jiri Pirko 2020-11-10 6400 case AF_INET: > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6401 mlxsw_sp_router_fib4_event_process(mlxsw_sp, op_ctx, > 2d5bd7a111ca082 Jiri Pirko 2020-11-10 6402 fib_event); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6403 break; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6404 case AF_INET6: > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6405 mlxsw_sp_router_fib6_event_process(mlxsw_sp, op_ctx, > 2d5bd7a111ca082 Jiri Pirko 2020-11-10 6406 fib_event); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6407 break; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6408 case RTNL_FAMILY_IP6MR: > c1b290d594a12b4 Jiri Pirko 2020-11-10 6409 case RTNL_FAMILY_IPMR: > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6410 /* Unlock here as inside FIBMR the lock is taken again > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6411 * under RTNL. The per-instance operation context > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6412 * is not used by FIBMR. > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6413 */ > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6414 mutex_unlock(&router->lock); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6415 mlxsw_sp_router_fibmr_event_process(mlxsw_sp, > c1b290d594a12b4 Jiri Pirko 2020-11-10 6416 fib_event); > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6417 mutex_lock(&router->lock); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6418 break; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6419 default: > c1b290d594a12b4 Jiri Pirko 2020-11-10 6420 WARN_ON_ONCE(1); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6421 } > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6422 last_family = fib_event->family; > c1b290d594a12b4 Jiri Pirko 2020-11-10 6423 kfree(fib_event); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6424 cond_resched(); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6425 } > ae9ce81aa726efb Jiri Pirko 2020-11-10 6426 WARN_ON_ONCE(!list_empty(&router->ll_op_ctx->fib_entry_priv_list)); > 91d20d71b2f0b1e Jiri Pirko 2020-11-10 6427 mutex_unlock(&router->lock); > c1b290d594a12b4 Jiri Pirko 2020-11-10 6428 } > c1b290d594a12b4 Jiri Pirko 2020-11-10 6429 > > :::::: The code at line 6360 was first introduced by commit > :::::: c1b290d594a12b4ed3b7386947162d5a061900b2 mlxsw: spectrum_router: Introduce FIB event queue instead of separate works > > :::::: TO: Jiri Pirko > :::::: CC: Jakub Kicinski > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org