netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sai Krishna <saikrishnag@marvell.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sgoutham@marvell.com>, <gakula@marvell.com>,
	<lcherian@marvell.com>, <jerinj@marvell.com>,
	<hkelam@marvell.com>, <sbhatta@marvell.com>,
	<andrew+netdev@lunn.ch>, <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [net-next PATCH v5 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon
Date: Sat, 7 Dec 2024 18:38:24 -0800	[thread overview]
Message-ID: <20241207183824.4a306105@kernel.org> (raw)
In-Reply-To: <20241204140821.1858263-2-saikrishnag@marvell.com>

On Wed, 4 Dec 2024 19:38:16 +0530 Sai Krishna wrote:
> -#define RVU_PFVF_PF_SHIFT	10
> -#define RVU_PFVF_PF_MASK	0x3F
> -#define RVU_PFVF_FUNC_SHIFT	0
> -#define RVU_PFVF_FUNC_MASK	0x3FF
> +#define RVU_PFVF_PF_SHIFT	rvu_pcifunc_pf_shift
> +#define RVU_PFVF_PF_MASK	rvu_pcifunc_pf_mask
> +#define RVU_PFVF_FUNC_SHIFT	rvu_pcifunc_func_shift
> +#define RVU_PFVF_FUNC_MASK	rvu_pcifunc_func_mask

Why do you maintain these defines? Looks like an unnecessary
indirection.

Given these are simple mask and shift values they probably have trivial
users. Start by adding helpers which perform the conversions using
those, then you can more easily update constants.

  reply	other threads:[~2024-12-08  2:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 14:08 [net-next PATCH v5 0/6] CN20K silicon with mbox support Sai Krishna
2024-12-04 14:08 ` [net-next PATCH v5 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon Sai Krishna
2024-12-08  2:38   ` Jakub Kicinski [this message]
     [not found]     ` <CO1PR18MB466694B5C67641606838782BA13C2@CO1PR18MB4666.namprd18.prod.outlook.com>
2024-12-09  9:09       ` [EXTERNAL] " Subbaraya Sundeep Bhatta
2024-12-09 21:25         ` Jakub Kicinski
     [not found]           ` <CO1PR18MB46664C4F8AA71F0FF2A98A68A13D2@CO1PR18MB4666.namprd18.prod.outlook.com>
     [not found]             ` <CO1PR18MB46669A23447A3A954AB5C219A13D2@CO1PR18MB4666.namprd18.prod.outlook.com>
2024-12-10 13:55               ` Subbaraya Sundeep Bhatta
2024-12-04 14:08 ` [net-next PATCH v5 2/6] octeontx2-af: CN20k basic mbox operations and structures Sai Krishna
2024-12-08  2:41   ` Jakub Kicinski
2024-12-09  9:26     ` Sai Krishna Gajula
2024-12-04 14:08 ` [net-next PATCH v5 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality Sai Krishna
2024-12-04 14:08 ` [net-next PATCH v5 4/6] octeontx2-pf: CN20K mbox REQ/ACK implementation for NIC PF Sai Krishna
2024-12-04 14:08 ` [net-next PATCH v5 5/6] octeontx2-af: CN20K mbox implementation for AF's VF Sai Krishna
2024-12-04 14:08 ` [net-next PATCH v5 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF Sai Krishna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241207183824.4a306105@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saikrishnag@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).