Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp978967lqh; Sat, 1 Jun 2024 04:36:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMhSBLBBH7RxhUIb1Yc8Lz+4SjP/CMEZsw097sElyKGVyJ/o0HdCQAVZU+ulVPBeqjDZ2d7vUy+YRH2XaKxeKaLng/ib7G5kibnuXyag== X-Google-Smtp-Source: AGHT+IEE3A09cc9SJVSCRjP/Kg/enK1dEghrqfGYpTHk5MaMVnY4TmNDCE6Lb9fHBpddFXCAIUnm X-Received: by 2002:a05:6a20:6a0c:b0:1af:f817:7c38 with SMTP id adf61e73a8af0-1b26f1c4cc1mr5634410637.25.1717241776881; Sat, 01 Jun 2024 04:36:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717241776; cv=pass; d=google.com; s=arc-20160816; b=KLElSKCR5rg2wgU6Co2gdH3HXFGSXyequocjkYhs+I63+2DL+VKlSQCi+ctUc5a088 cgMtkSvt/Wjzuazp2NhXsFNaSVsd0pUutD+4ye3kYrd9OQD/cBDsCRjsWAqz4kKmlDTg 5scm3swAwj49DzI5LSYWvgty479oaOwY7xTeiTa4re1FaVjoof15EsA4gkOeWlFuM8cu oqtaJGKieEILA1CBmaydbaGaqCx69MTHw4r8ngVZNJ9xXRYqSWkwveLpRaTWY6t7L5ba J+Mw9Va7qjtd0j445hmwQXiq/qsv7cqtc9X101hKSUCwB2Yr7AWHa4j20MI2Dogh9H6P 3Bdw== 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=TUpv2hBlSwpqh4FxE2jc3b/HsaKzyKgL05JkZtTa3s0=; fh=Erdz6ue0Vey/5+nPLVn4bHU63GuEE71UOJYS8e9x8WE=; b=ZyTi/6SCM75TsphsLI2MQrji9fd62fCcJ9WbSz16cpxbJu1fGPcNmvcFIed4PrDxXE C16AZUzL6xGkdloq87FL/Sn26y+T2gTBt4enApF/g5w2jVsahJKBHphUkTjRYyEG+Q71 zzP5hxLk7Fb0iiYM9AQoYQZRhrhapiv8DiDpXGeBzqJTg3aZak0NN+yU4URKUHiEFGDB oqa1+1CG29ZSsZQUJ4LzLL6ryaRgCLahwZbHN3X8W79bK+KtU1+mja304aO4EcoP4d1b gT/aBSdcjlYSUmZNPSxLpHzB3hwQU/QUyXKFYCycmkB55a/BjRkqCIGVaoLVuqyLduAm M00Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gzj36iIF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-702503a2433si2007024b3a.173.2024.06.01.04.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 04:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gzj36iIF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197811-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D226B281685 for ; Sat, 1 Jun 2024 11:36:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F2A014E2E7; Sat, 1 Jun 2024 11:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gzj36iIF" 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 7BF47335A7; Sat, 1 Jun 2024 11:36:02 +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=1717241762; cv=none; b=Nf7yjwUP6YQaanub/hnnLIeo+R9f99LQfOSTkeO6UEfaf/gMixOoVpE31i+ZE9X1J12H9baox9kb0ipGWjkFarCuqp6jkUlReMFVC/Hx6oQsZscXRIrVN7S5GBo1BAdoXWkjgM0SgWdvtzEi39xIBhACqmhKy/UQKnOV+DdcDIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717241762; c=relaxed/simple; bh=kpQf4gwEeOOzDfhWhhcG3oI1znrd4vE/jJPK+EcV08I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uXtM+Hn4RHtV+qSYixDK48x/Vw5QBdSSguF5dxi4fc2qgmEnbYeCe/PlrN5mgt1wdk30LRDfo7/qTz/c3/2S/RJkKpGEAVUCHuLUtEcPOcyOThjjGyr5aZ0MC13GAZqH3epj86GUZQwsMBd3wjCXO+BZMNaQhHKgzG+1dnWYB0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzj36iIF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66135C116B1; Sat, 1 Jun 2024 11:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717241762; bh=kpQf4gwEeOOzDfhWhhcG3oI1znrd4vE/jJPK+EcV08I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gzj36iIF2LvyS7Kv7+EL84VyeI6zM2JaoVBShSc4JqtM8sFYhlxcx0KUbWYikYebQ kQHucV5qqOknsjNo2DRtp8y44jNhLyDoXX5Tqh0ZDOATy6DLSWeOFEscMrIutOCkhq VkxP0kAuj9FJ+Lj+BErd1LWQD5TVNapB4zls0XCC16an1emBni6tZdToA+bcdJl1kQ R09XGLRF3mXBTTZ/N/Zkh99tY0JV+LtFiSKmRu2OnM83b0aExNwB5i5XdLWHGPgUBt zfFGV+2qNdmLYuqpG0fM4GamTMjYi6sN/iAe6xPID701LvsT5DwQLOCSwHVoUZEyeC yb12Et9/B2rdA== Date: Sat, 1 Jun 2024 12:35:57 +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: <20240601113557.GE491852@kernel.org> References: <20240529031628.324117-1-jdamato@fastly.com> <20240529031628.324117-2-jdamato@fastly.com> 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: <20240529031628.324117-2-jdamato@fastly.com> 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. ...