Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2019 10:25:47 +0530
From:      shreyank amartya <shreyankfbsd@gmail.com>
To:        freebsd-drivers@freebsd.org
Subject:   Fwd: iflib MSI init
Message-ID:  <CAD9jf8Cocf7OhTrRELoQX=V9qe-vwBBheuQHNNxKLEa-KxJ5tw@mail.gmail.com>
In-Reply-To: <CAD9jf8Bg%2B-kroGEiRuHBpaVbjCV-n=zQwE=UtOkcAcHG1AfDpQ@mail.gmail.com>
References:  <CAD9jf8Bg%2B-kroGEiRuHBpaVbjCV-n=zQwE=UtOkcAcHG1AfDpQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I'm trying to initialize a network interface using iflib. While configuring
MSI interrupts for the device, the number of vectors returned by the
pci_msi_count is 32 (max supported) in my case due to which the condition
(vectors == 1) fails and as a result legacy mode is selected. Is this
intentional? In which case, how can I make sure number of MSI vectors is 1?

/sys/net/iflib.c

   6126 msi:
   6127         vectors = pci_msi_count(dev);
   6128         scctx->isc_nrxqsets = 1;
   6129         scctx->isc_ntxqsets = 1;
   6130         scctx->isc_vectors = vectors;
   6131         if (vectors == 1 && pci_alloc_msi(dev, &vectors) == 0) {
   6132                 device_printf(dev,"Using an MSI interrupt\n");
   6133                 scctx->isc_intr = IFLIB_INTR_MSI;
   6134         } else {
   6135                 scctx->isc_vectors = 1;
   6136                 device_printf(dev,"Using a Legacy interrupt\n");
   6137                 scctx->isc_intr = IFLIB_INTR_LEGACY;
   6138         }
   6139
   6140         return (vectors);



Thanks
Shreyank Amartya



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD9jf8Cocf7OhTrRELoQX=V9qe-vwBBheuQHNNxKLEa-KxJ5tw>