Re: Multiple MSI-X interrupts for mpr

From: Slawa Olhovchenkov <slw_at_zxy.spb.ru>
Date: Fri, 03 Oct 2025 16:05:30 UTC
On Fri, Oct 03, 2025 at 09:55:00AM -0600, scott@treasuremountain.us wrote:

> Yes it’s possible, and I had a multi-queue branch in GitHub at one time.  Just increasing the number of messages won’t help anything, you need to then enable multiple I/O dispatch and completion queues.

Is this branch available now?

> Scott
> 
> 
> > On Oct 3, 2025, at 9:28 AM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
> > 
> > Currently mpr driver don't allow to utilize multiple MSI-X interrupt.
> > Is possible to enable this by remove `msgs = min(msgs, 1);` line?
> > 
> > sys/dev/mpr/mpr_pci.c:
> > 
> > int
> > mpr_pci_alloc_interrupts(struct mpr_softc *sc)
> > {
> >        device_t dev;
> >        int error, msgs;
> > 
> >        dev = sc->mpr_dev;
> >        error = 0;
> >        msgs = 0;
> > 
> >        if (sc->disable_msix == 0) {
> >                msgs = pci_msix_count(dev);
> >                mpr_dprint(sc, MPR_INIT, "Counted %d MSI-X
> >                messages\n", msgs);
> >                msgs = min(msgs, sc->max_msix);
> >                msgs = min(msgs, MPR_MSIX_MAX);
> >                msgs = min(msgs, 1);    /* XXX */
> >                if (msgs != 0) {
> >                        mpr_dprint(sc, MPR_INIT, "Attempting to
> >                allocate %d "
> >                            "MSI-X messages\n", msgs);
> >                        error = mpr_alloc_msix(sc, msgs);
> >                }
> >        }
> > 
> > 
>