Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] The RDMA driver (mana_ib) fails to initialize because it does not 
allocate GIC references for its EQs.
--

commit 9f615e81497dbea890c8df0a9aa9efd643e9a6a7
Author: Long Li <[email protected]>

net: mana: Allocate interrupt context for each EQ when creating vPort

This commit updates the driver to use GIC functions to create a dedicated
interrupt context or acquire a shared interrupt context for each EQ when
setting up a vPort. The caller is now responsible for acquiring and
releasing the GIC reference across the EQ create/destroy lifecycle.

> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c 
> b/drivers/net/ethernet/microsoft/mana/mana_en.c
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c

[ ... ]

> @@ -1684,12 +1690,22 @@ int mana_create_eq(struct mana_port_context *apc)
>               debugfs_create_dir("EQs", apc->mana_port_debugfs);
>  
>       for (i = 0; i < apc->num_queues; i++) {
> -             spec.eq.msix_index = (i + 1) % gc->num_msix_usable;
> +             msi = (i + 1) % gc->num_msix_usable;
> +
> +             gic = mana_gd_get_gic(gc, !gc->msi_sharing, &msi);
> +             if (!gic) {
> +                     err = -ENOMEM;
> +                     goto out;
> +             }
> +             spec.eq.msix_index = msi;

Will this change to the initialization logic break the RDMA driver (mana_ib)?

Since the caller is now required to manually acquire a GIC reference via
mana_gd_get_gic() before creating EQs, and mana_ib hasn't been updated to
do this, won't it trigger a WARN_ON(!gic) inside mana_gd_register_irq() and
fail device initialization?

I noticed this was fixed later in the patch series by commit 'RDMA/mana_ib:
Allocate interrupt contexts on EQs', but could this break bisectability here?

> +
>               err = mana_gd_create_mana_eq(gd, &spec, &apc->eqs[i].eq);

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=5

Reply via email to