All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Sai Krishna <saikrishnag@marvell.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	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,
	kalesh-anakkur.purayil@broadcom.com
Subject: Re: [net-next PATCH v2 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon
Date: Fri, 1 Nov 2024 10:08:32 +0000	[thread overview]
Message-ID: <20241101100832.GC1838431@kernel.org> (raw)
In-Reply-To: <20241022185410.4036100-2-saikrishnag@marvell.com>

On Wed, Oct 23, 2024 at 12:24:05AM +0530, Sai Krishna wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> Number of RVU PFs on CN20K silicon have increased to 96 from maximum
> of 32 that were supported on earlier silicons. Every RVU PF and VF is
> identified by HW using a 16bit PF_FUNC value. Due to the change in
> Max number of PFs in CN20K, the bit encoding of this PF_FUNC has changed.
> 
> This patch handles the change by exporting PF,VF masks and shifts
> present in mailbox module to all other modules.
> 
> Also moved the NIX AF register offset macros to other files which
> will be posted in coming patches.
> 
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Sai Krishna <saikrishnag@marvell.com>

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
> index 5016ba82e142..938a911cbf1c 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
> @@ -41,10 +41,10 @@
>  #define MAX_CPT_BLKS				2
>  
>  /* PF_FUNC */
> -#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

Hi Subbaraya and Sai,

I see that this is in keeping with the implementation prior to this patch.
But, FWIIW, if FIELD_PREP() and friends were used then I expect the _SHIFT
defines could be removed entirely.

Please consider as a follow-up at some point.

>  
>  #ifdef CONFIG_DEBUG_FS
>  struct dump_ctx {

...

  reply	other threads:[~2024-11-01 10:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 18:54 [net-next PATCH v2 0/6] CN20K silicon with mbox support Sai Krishna
2024-10-22 18:54 ` [net-next PATCH v2 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon Sai Krishna
2024-11-01 10:08   ` Simon Horman [this message]
2024-11-11  9:15     ` Sai Krishna Gajula
2024-10-22 18:54 ` [net-next PATCH v2 2/6] octeontx2-af: CN20k basic mbox operations and structures Sai Krishna
2024-10-22 18:54 ` [net-next PATCH v2 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality Sai Krishna
2024-11-01 10:18   ` Simon Horman
2024-11-11  8:42     ` Sai Krishna Gajula
2024-10-22 18:54 ` [net-next PATCH v2 4/6] octeontx2-pf: CN20K mbox REQ/ACK implementation for NIC PF Sai Krishna
2024-10-29 23:06   ` Jakub Kicinski
2024-11-01  5:50     ` Sai Krishna Gajula
2024-10-22 18:54 ` [net-next PATCH v2 5/6] octeontx2-af: CN20K mbox implementation for AF's VF Sai Krishna
2024-10-22 18:54 ` [net-next PATCH v2 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF Sai Krishna
2024-11-01 10:04   ` Simon Horman
2024-11-12 17:48     ` Sai Krishna Gajula

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=20241101100832.GC1838431@kernel.org \
    --to=horms@kernel.org \
    --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=kuba@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.