# Re: \[net-next PATCH v10 5/6\] octeontx2-af: CN20K mbox implementation for AF's VF

- From: Paolo Abeni \<pabeni@redhat.com\>
- Date: 2025-02-20 12:06:17 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/02/2935636
- Thread: https://ratatoskr.run/netdev/2025/02/2929387/t.md

```text
On 2/17/25 9:52 AM, Sai Krishna wrote:
> @@ -61,3 +62,49 @@ irqreturn_t cn20k_pfaf_mbox_intr_handler(int irq, void *pf_irq)
>  
>  	return IRQ_HANDLED;
>  }
> +
> +irqreturn_t cn20k_vfaf_mbox_intr_handler(int irq, void *vf_irq)
> +{
> +	struct otx2_nic *vf = vf_irq;
> +	struct otx2_mbox_dev *mdev;
> +	struct otx2_mbox *mbox;
> +	struct mbox_hdr *hdr;
> +	int vf_trig_val;
> +
> +	vf_trig_val = otx2_read64(vf, RVU_VF_INT) & 0x3;
> +	/* Clear the IRQ */
> +	otx2_write64(vf, RVU_VF_INT, vf_trig_val);
> +
> +	/* Read latest mbox data */
> +	smp_rmb();
> +
> +	if (vf_trig_val & BIT_ULL(1)) {

`vf_trig_val` has `int` type, why are casting the mask to unsigned long
long? A similar thing below.

/P

```
