From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92F5C27F732 for ; Thu, 26 Feb 2026 18:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772129755; cv=none; b=Anz049DL1mhgXXQK6gvjFpwtWd9Eoi8we4XVZnPSg8yYup7Q2pKtA14/sS5JDlvvBBlwJ2FcnmQA4sd2YVWFSu4DWEPZK05sQOYnRXWAuMqJ4FyRz0tUzplFNQ6fD+4zRghgJtruhCY7mF8xjsS5ef36WHuGVlpr3nJL5CjF6IU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772129755; c=relaxed/simple; bh=InGfA/MrbxN5QZm/AqMEn8DbQ6shJCSZ7sTJO2WBjXg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FYmHXXf3OjoaqCg8ob/AdfbtrviOhUPhy0O6+nLIqP3ea06SsoBUH7PxyiwM74RuodFiSAI+sS9hMfjz4CtjcMQw2HhqIDJ/Hmx65Yl1LeiRvBPvP/tpld1DY4MxS12RB4u1QYJ9WS69rUIP+y8hzTYUVNpkww671v3a4p4IrtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gRL0LbO/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gRL0LbO/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0CB8C116C6; Thu, 26 Feb 2026 18:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772129755; bh=InGfA/MrbxN5QZm/AqMEn8DbQ6shJCSZ7sTJO2WBjXg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gRL0LbO/9lG0+lmcdHgwB8n1ryhi/Swf63VoLqLAmtI/w6H8cGwgIyWhgf0KGfPTM Dgh/1nYb+xe5Wa07dMTLcfCJQ8fO6mFoG4gKhl1ttbHKEtqUYK/54EyrcS5LjjL6P2 7nStkSVBrXSiN4/gYlObnIBhvK52bq0F9xEkvKK5uMNAw0nI3TZR0iCK/DbnWS20yW +JzLSPof5v1i5ehkKrM8pl/by/6hDW2wSvpfJ3QlzcpErT0A38D+Qlc5jaCNSc0KVB x5o7oc6rICnvF/+U0XrsT8XZ7lvD+kPclV9zPP8zIn88A/23vXOwvXGSaVtenfBt/e iFcNWMuTcMB3Q== Date: Thu, 26 Feb 2026 18:15:51 +0000 From: Simon Horman To: Cheng-Yang Chou Cc: netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, jserv@ccns.ncku.edu.tw, charlie910417@gmail.com Subject: Re: [PATCH 1/1] net/mlx5/core: Allocate ttc_params on heap Message-ID: References: <20260226092857.1583984-1-yphbchou0911@gmail.com> <20260226092857.1583984-2-yphbchou0911@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260226092857.1583984-2-yphbchou0911@gmail.com> On Thu, Feb 26, 2026 at 05:28:55PM +0800, Cheng-Yang Chou wrote: > The ttc_params structure is too large to be allocated on the stack, > triggering warnings for exceeding the 1024-byte frame size limit. > Consuming excessive stack space risks causing stack overflows. > > Allocate the structure dynamically to maintain safe stack boundaries. > > Signed-off-by: Po-Ying Chiu > Signed-off-by: Cheng-Yang Chou > --- > .../net/ethernet/mellanox/mlx5/core/en_rep.c | 15 +++++++++---- > .../net/ethernet/mellanox/mlx5/core/en_tc.c | 15 ++++++++++--- > .../mellanox/mlx5/core/lag/port_sel.c | 22 ++++++++++++++----- > 3 files changed, 39 insertions(+), 13 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c > index 6eec88fa6d10..8e3862f5b563 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c > @@ -966,27 +966,34 @@ static int mlx5e_create_rep_ttc_table(struct mlx5e_priv *priv) > { > struct mlx5e_rep_priv *rpriv = priv->ppriv; > struct mlx5_eswitch_rep *rep = rpriv->rep; > - struct ttc_params ttc_params = {}; > + struct ttc_params *ttc_params; > int err; > > + ttc_params = kzalloc(sizeof(*ttc_params), GFP_KERNEL); > + if (!ttc_params) > + return -ENOMEM; > + Please use tabs (8 characters wide) rather than spaces for indentation throughout this patch. -- pw-bot: changes-requested