Subject: Re: [net-next PATCH v2 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality

From: Simon Horman <[email-masked]>
Date: Fri, 1 Nov 2024 10:18:48 +0000

On Wed, Oct 23, 2024 at 12:24:07AM +0530, Sai Krishna wrote:
> This implementation uses separate trigger interrupts for request,
> response MBOX messages against using trigger message data in CN10K.
> This patch adds support for basic mbox implementation for CN20K
> from AF side.
> 
> Signed-off-by: Sunil Kovvuri Goutham <[email-masked]>
> Signed-off-by: Sai Krishna <[email-masked]>

...

>  #endif /* CN20K_API_H */
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/mbox_init.c b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/mbox_init.c
> index 0e128013a03f..0c1ea6923043 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/mbox_init.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/mbox_init.c
> @@ -13,6 +13,137 @@
>  #include "reg.h"
>  #include "api.h"
>  
> +/* CN20K mbox PFx => AF irq handler */
> +static irqreturn_t cn20k_mbox_pf_common_intr_handler(int irq, void *rvu_irq)
> +{
> +	struct rvu_irq_data *rvu_irq_data = (struct rvu_irq_data *)rvu_irq;

Hi Sunil and Sai,

A minor nit from my side: I general there is no need to explicitly cast a
pointer to or from void *, and in Networking code it is preferred not to.

	struct rvu_irq_data *rvu_irq_data = rvu_irq;

> +	struct rvu *rvu = rvu_irq_data->rvu;
> +	u64 intr;
> +

...