Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp588241lqj; Sun, 2 Jun 2024 12:24:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXI+w0Cxupzt7/NupeZXznZ1x/kJp9WS2rD8/+n+TDQsMkG37XkF7rfLJXmZdlqmmsKVkNr8C3ZCI9D8cY4Ee/sckYrptSVdHDiDATi4w== X-Google-Smtp-Source: AGHT+IH2Z+8GmcAjyZ08bN5K/OxFNR+Zw50bULONJJnoXU8Z994ezXnbw+4tE2aKBKS8K+i5Lt0C X-Received: by 2002:a05:6512:3e24:b0:52b:8455:fb1f with SMTP id 2adb3069b0e04-52b895609e6mr7596208e87.10.1717356256073; Sun, 02 Jun 2024 12:24:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717356256; cv=pass; d=google.com; s=arc-20160816; b=LZsYFg6U7lURwx7ZC/HJ5TjSgWJ+RMLucmae46MdiC5o29Osqufid2Eqi04Ji+LDUE 1J7aWwJQiH8+arlaIjHYfTu6pqfPJgvBQXtdclXuq+j4HaxR7uqpVWyGgKuzrYcGSdm2 GZQxU7rB5jtb5SBEX+9a2ucsJE9YmkWv7ILJ3R1oP6YKO2qeZULEeXCJFFPzArL09RUl uK6eGycWFuzCEsAUttgP6UgsaK9XvyhKZWCSuBIQlRvcbNxEiReu7/Gi1n/ZHJ+TjQGz nPPoyBmRJ+IEU5AoNDcTrXOqMZRKdp+rHLWI3viqmU/M+Mulk2Syitfhsj6c4Sk+xl0C s5VQ== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=6Y3tCKTuoMYJ9KLxmz/0pp/IbE4WV30YqEEAEWzotb0=; fh=VKCc/+3uoWvaAOjMPoEc+es5rLk3lLgvTafbIt20MKU=; b=qPDpMLjU761h3l0WgitNJ/chjAV1gPXjKUKgNefs2HSqtqcngD2MJXQ6n/mJ+i99cO L9FKzB4s+6BOIxWZWkTW2RHDdlRFJPpRfpLzDIj4C9FrbiXuznfMC97ROIg0RkLo4awk 6sgt/QHD5/t9XKcpOGyOH1KmmISRXvrwTNG62Mz/8BM7keExBMpV6QlcytFpwb7QyG3y qkVzdVV0QOqMW7Bh0twIoUpaAFOtgxBD7gnvQgrJ/n0LZ6V3kEuEg51YoOc99ztEYAzF M/cD3+yu0JAvGa3iYj677IOlVo/NX3ksYkO3d3gNB6k5e41pU4H2wsbB1ozmiCWkNS5R U+0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=AX5Z4WNR; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-198390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a68c70acabasi157968166b.979.2024.06.02.12.24.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 12:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@fastly.com header.s=google header.b=AX5Z4WNR; arc=pass (i=1 spf=pass spfdomain=fastly.com dkim=pass dkdomain=fastly.com dmarc=pass fromdomain=fastly.com); spf=pass (google.com: domain of linux-kernel+bounces-198390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fastly.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9EC501F21D28 for ; Sun, 2 Jun 2024 19:24:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7ED674267; Sun, 2 Jun 2024 19:24:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="AX5Z4WNR" Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B14F56D1A1 for ; Sun, 2 Jun 2024 19:24:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717356243; cv=none; b=SgRAJ+qDEj0XmDo5Rv+VgbKUee+UcalvZujmuiCXeeREA2Bau6YImSASsbwnUCbdrWPlLSQjKqT8ZrwaaYJMkrIsJqxYFIr/pSah7a8T7GOkn1E0XkGsN9vLBQZlP4zN4P67MWyY3bSp4Zpj2fSkvE8IgQ1EwXVD7LaxnlhjYXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717356243; c=relaxed/simple; bh=qFKsyOePVq/VZ3JIFbqe8V02kL7/ITBZkREWuaoRyFw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ALoQyTXRG1lejlicqKy9UXkR8w5HB6iDlzfhiulqvfkB2afJshPaeAZoY8+gbJbgBFXKGZJZCu3LRIXUaUS9V+wzfPDv+dVHZEBT1ZuEVwU5Hv1kgzKZAYgGa6AOQzilh60zjGYp6q9SYZoQLcT+Dj09laHunXW3FGJSD3YUMRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=AX5Z4WNR; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-70260814b2dso559585b3a.1 for ; Sun, 02 Jun 2024 12:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1717356241; x=1717961041; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=6Y3tCKTuoMYJ9KLxmz/0pp/IbE4WV30YqEEAEWzotb0=; b=AX5Z4WNREqCMtfSZ+OlZ2HJZ7BaehtBof2ksCvqO8Xqr/BF5SFfZJaSyY1Is+O9+z/ b+VFAUiB+FCV8egPkl7M3Ek6A+9K360cdwpK5OKufI+j27+084GgqUzPya4+yTgioGjc cFDz9KBJ2dbSpV+NnVYQt59bFuvIQxpYJee8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717356241; x=1717961041; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6Y3tCKTuoMYJ9KLxmz/0pp/IbE4WV30YqEEAEWzotb0=; b=Mpwcid4rzAfHSxkF5JP5AnD4sIMrbSNn92O4joYXTSKttLKOFxP4qeevo68hDMF0V3 3xihUL5FPbrHi4cYvmFsXCiZzzVgfciFCjlzzDAwdCJddj6m9Bnyvq7n+6mNfwkVuqTp G8mptMh6fZ0MBIZYvKlWss5tilVIxS8D/SWtnHjUgxeqNq8IkLM9KCVIstS6DEmGxNg+ RjZ9gXvzXwjR6FQnKBU/XPt9C1TANyM9Rjt4brKVk3MV091Eigpbw9bhOx+8kIxVTzFi 4r6jK69H39miPnFAOLn2amW9HxsBgeY2TWYLeyOQXabeyxafqK24onyAPpR5UMlT4jN1 Eksg== X-Gm-Message-State: AOJu0Yxi047bCny4SNebFvo2wfDnyvCKDEa0WAaK8cnv7xD3jq2jWruW Xr1l6UbWOLklLzLW9fbVd2/bqOmekFJAnwqwr5sEiLy4/gAEXPxtLJNWQjSO2zE= X-Received: by 2002:a05:6a00:1ca1:b0:702:6658:252b with SMTP id d2e1a72fcca58-702665826f5mr2800463b3a.13.1717356240660; Sun, 02 Jun 2024 12:24:00 -0700 (PDT) Received: from LQ3V64L9R2 (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7024e30820fsm3468032b3a.196.2024.06.02.12.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 12:24:00 -0700 (PDT) Date: Sun, 2 Jun 2024 12:23:57 -0700 From: Joe Damato To: Simon Horman 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: Mail-Followup-To: Joe Damato , Simon Horman , 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" References: <20240529031628.324117-1-jdamato@fastly.com> <20240529031628.324117-2-jdamato@fastly.com> <20240601113557.GE491852@kernel.org> <20240601113913.GA696607@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: <20240601113913.GA696607@kernel.org> On Sat, Jun 01, 2024 at 12:39:13PM +0100, Simon Horman wrote: > 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. Sure, I'll make sure in the next revision to include the second helper in the second patch instead and avoid using "inline" in both cases.