Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2626136lqo; Tue, 14 May 2024 04:51:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWH2BZSf6uyfmLsu1xTD2V7dT4G2cFxK8TQUSlPFkpO91KiOjy2ju7xWzMce67HVKEixWP/ZpaQnKJSeneDeyg/v+Hb0Gq74JZiP2WQxw== X-Google-Smtp-Source: AGHT+IFVwyvSyg8hOJP10Zmom/US9njNpX11H5fYb5sgPYKep6pA2EHcrUT9QGt4qbFte60xnp6i X-Received: by 2002:a05:6402:17d5:b0:574:d098:37af with SMTP id 4fb4d7f45d1cf-574d0983824mr3937878a12.7.1715687482306; Tue, 14 May 2024 04:51:22 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c362899si6103139a12.496.2024.05.14.04.51.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 04:51:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=XzrOM0SW; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-178626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178626-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 113BA1F233B2 for ; Tue, 14 May 2024 11:51:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86B34524BE; Tue, 14 May 2024 11:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XzrOM0SW" 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 B0C892B9B3; Tue, 14 May 2024 11:46:03 +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=1715687163; cv=none; b=F+AASUgAGoOZN9t7YV+Hr7B8za8D0mTQ8+akqs/S1LU65Nb5XKHLI67B00k9q3DzbUgbWayAE2cTZtMiqxkayD7MKJAYnAvcLcO8LOQD4j5i4ZBnU8m6RVTU+B9BiSYt7olQtQ6blw1imsoXezWosCz13FX7XYMrynu1f2E/9Fk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715687163; c=relaxed/simple; bh=vzZi26UYR5VN7UyU7t24xek7Nj49k7x0ToivZqJNoVo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H3UMLCcwja+AS9K8VekUZCGCJu9pJ4eLcXRXZLdivmkeYIbw0x3XWZDFZ84qa/Gaq2yKVqQey2aSWS8FVUcS2VvuiTQY2buVmKwjPprRLf49Pm0yOhR4Yt8IM2Hs/60ePWGUZw0cPasCHkAviUKkMqcQw3exqXPo5AMaPYzXEXY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XzrOM0SW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2394C32782; Tue, 14 May 2024 11:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715687163; bh=vzZi26UYR5VN7UyU7t24xek7Nj49k7x0ToivZqJNoVo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XzrOM0SW5VSxg91KiW8sorRhNb+bQIrAvWQkd0QOx6tW0AH44AI32vzllky6B0xiI e0HitANm3oGvuSAUe1ze5cMHUh/fj9P/Sn5DbcCb9c5EoYGf6W9lYGNY0hI4GG4tDH V3IYcQj0p/Or/a8gX5NJ8IVeeH2oKADthDzj6kxSxLGfWMoj18qRmOtFtZeLcgUowi CDl/8WZcJ4/6uDbA5OkIGEFTpWv5nEAox1RGLUmPWJWSMA8vn98F3w2MLYRozeFd/g ZS/vL/F/UvfPcRDbDQZYSCxdmCGI1dO4iEWkoWx3C/oNNCr2I4PIPgK9F3VEbTtLVu 0rG7FYNQrtSbQ== Date: Tue, 14 May 2024 12:45:58 +0100 From: Simon Horman To: Bharat Bhushan Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , Geethasowjanya Akula , Subbaraya Sundeep Bhatta , Hariprasad Kelam , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , Jerin Jacob , Linu Cherian , "richardcochran@gmail.com" Subject: Re: [EXTERNAL] Re: [net-next,v2 3/8] octeontx2-af: Disable backpressure between CPT and NIX Message-ID: <20240514114558.GG2787@kernel.org> References: <20240513105446.297451-1-bbhushan2@marvell.com> <20240513105446.297451-4-bbhushan2@marvell.com> <20240513161447.GR2787@kernel.org> <20240514104125.GD2787@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: On Tue, May 14, 2024 at 11:26:54AM +0000, Bharat Bhushan wrote: > Please see inline > > > -----Original Message----- > > From: Simon Horman .. > > > > I suspect 1 will have little downside and be easiest to implement. > > > > > > pfc_en is already a field of otx2_nic but under CONFIG_DCB. Will fix by > > adding a wrapper function like: > > > > Thanks. Just to clarify, my first suggestion was to move pfc_en outside of > > CONFIG_DCB in otx2_nic. > > > > > > > > static bool is_pfc_enabled(struct otx2_nic *pfvf) { #ifdef CONFIG_DCB > > > return pfvf->pfc_en ? true : false; > > > > FWIIW, I think this could also be: > > > > return !!pfvf->pfc_en; > > > > > #endif > > > return false; > > > } > > > > Also, I do wonder if the following can work: > > > > return IS_ENABLED(CONFIG_DCB) && pfvf->pfc_en; > > This is required at more than one place, so will keep wrapper function with this condition check. Thanks, sounds good. ..