Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp980051lqh; Sat, 1 Jun 2024 04:39:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/Ee8BI0c1zFmw/1+mY2v9iCnHLdMeNkmc3ZDSg15RMOD49iuYEcOIR6UvZPQi06joIYC658PE3IniDhFLt1bNBae/B2cpHHf25jIK5w== X-Google-Smtp-Source: AGHT+IHkgCHXjpVDdP5u+rj6imhKfv84lPjmMe3fND99G+dYs4k11JFj82LDz5Cc0nhn7WpqxuVB X-Received: by 2002:a05:6358:e81b:b0:199:806e:6c79 with SMTP id e5c5f4694b2df-19b48c55b3dmr419621855d.5.1717241973287; Sat, 01 Jun 2024 04:39:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717241973; cv=pass; d=google.com; s=arc-20160816; b=onZJLMG8jCUvovuIxYSb5/3a5sQ4QhBsnvA+t7tvRxhxGtp2G+o0lORvNQY8lMzf4T uB6ermK0207OFsupkB43UaNHHqE/sW1nluUSTunihm/dJ7eK1+FUBqe47ZVg5rbWHYVc su9viju1NvjlCE+PtfDvEDBOPIBYP+VenusggBDgTJ6xmENTVdAUeJL1zY2jm4rN2Ppb ayx4Wn65OCviKUnnj6DLy4Lf0sOAzy+8pgl8g+XflHaEbbMOH1nMPrWPsbwbHuCg5rqh k5mQcNMxTHn0TPBG5N71U6HX4Kms8WzDFgEXJQ4RN2evSAeTdTvopJ09SSkqEE6UrwoY V+cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5vJIv5OoPsGijBrRTTjV4YU9nyiNxFpPrc5/uE2bb3I=; fh=Erdz6ue0Vey/5+nPLVn4bHU63GuEE71UOJYS8e9x8WE=; b=fC1kilVyz1kb9z5oE2Ea+dnuGf51xCK58APIWrXUukZuRse1SIASnfG8zsvLJ2DqYI iw8npeZxST1CQ+DEkzN4z2X7/eeHuzsRwOZznD1pbkiqSEO2f0AUioPIDAfAlUykG6b+ u0nD/pFKhjXZbURt2vfDEamwns/tf+qxiRDjm7VGJExQ2/VQKpA5GiFz+/feIY1Ai82W J7m4j95CSZogP1z2PO+ojBuc2enUMXcWfFgS8ftWB8AHFDvBB0JI+Yl/EnoSclS4H2pA CCWG36aPZXvewZtnI7E1mEaGMDCUp0lKX/GNfT31finCfYcvDB1oHl+NxtIJemrkEdeM 8Yfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bd7SFatw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f1815asi409052685a.224.2024.06.01.04.39.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 04:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bd7SFatw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197813-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 01D9B1C20F6C for ; Sat, 1 Jun 2024 11:39:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CF8114F9D1; Sat, 1 Jun 2024 11:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bd7SFatw" 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 BAE8214D711; Sat, 1 Jun 2024 11:39:18 +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=1717241958; cv=none; b=rftGOTlH3xHTW7FrIqwoJscir+kHW3HeIlV4b74t6f4iAQaFds3y4oiC/Zfjt7DgRnty5fdy+TGFQ/FNPPHvtHDLSKmJH+9W4APt6mqdu50jO5CBFPAigRgRs1yWTxHOXJtjzeWBnnWB9Zqt5Y/9WcYiJU6O2RMjjiuyLqQk9CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717241958; c=relaxed/simple; bh=uuwR7hutA7pKITkfIA6u4uSVfOd+C8TZBNZEp+6j+8U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VAMCqS+4jcMuu32ihEbUtWmObD5pVPZ4SN94ROEYow4U1y9qnxwVGUFAsqlUquIbhoxFZJYWTs08T/me19vIXzzG0WXA3cUijWhILAVZXBR0lotrSV6SwTNo5L/EbCOiRarmGNgJRMpJUwf71stfrJHp+567CcKzUZ+K29gmYKo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bd7SFatw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94BBEC116B1; Sat, 1 Jun 2024 11:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717241958; bh=uuwR7hutA7pKITkfIA6u4uSVfOd+C8TZBNZEp+6j+8U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bd7SFatwCvZwT33/Iz8DRCQfeq6XtaH+a5WpGVQptod9swvGOSMbWl6gJCEm6tRuC 2H86BDJTGqAA2d7smut09y5mtu25gUEhVF0V6j/Q80D2joIjMoN8WVFCBd7qoz7f4J qd6V14DeXHR2ZHm1IkDzYLhtNdfyhszVZtZcWYv51mXWjL3O95iRPGBc3C89ie5Fc6 A9ThQxEi47w/N0LOmHR1nkeu/gNMrqRflqDXe0FK6lxHs2O8XGZTJniGvvfLob3cIi x1DugOnkPmhQVUYsGy/V7pIC7GZpdoXrOTVlWAVqdVHVZdm94FxOtjqqSbUei6GJUU ZnLczec4+srQQ== Date: Sat, 1 Jun 2024 12:39:13 +0100 From: Simon Horman To: Joe Damato Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, nalramli@fastly.com, Saeed Mahameed , Tariq Toukan , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:MELLANOX MLX5 core VPI driver" Subject: Re: [RFC net-next v3 1/2] net/mlx5e: Add helpers to calculate txq and ch idx Message-ID: <20240601113913.GA696607@kernel.org> References: <20240529031628.324117-1-jdamato@fastly.com> <20240529031628.324117-2-jdamato@fastly.com> <20240601113557.GE491852@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240601113557.GE491852@kernel.org> On Sat, Jun 01, 2024 at 12:35:57PM +0100, Simon Horman wrote: > On Wed, May 29, 2024 at 03:16:26AM +0000, Joe Damato wrote: > > Add two helpers to: > > > > 1. Compute the txq_ix given a channel and a tc offset (tc_to_txq_ix). > > 2. Compute the channel index and tc offset given a txq_ix > > (txq_ix_to_chtc_ix). > > > > The first helper, tc_to_txq_ix, is used in place of the mathematical > > expressionin mlx5e_open_sqs when txq_ix values are computed. > > > > The second helper, txq_ix_to_chtc_ix, will be used in a following patch. > > Hi Joe, > > I think it would be best to add txq_ix_to_chtc_ix as part of patch that > uses it, because the current arrangement will cause allmodconfigs with > clang-18 and W=1 to fail due to txq_ix_to_chtc_ix being unused. > > ... Sorry, one more thing. Please don't use inline in .c files unless there is a demonstrable reason - f.e. performance - to do so. Rather, let the compiler figure out when to inline functions.