Date: Tue, 5 Mar 2019 16:41:00 +0530 From: shreyank amartya <shreyankfbsd@gmail.com> To: mmacy@mattmacy.io Cc: freebsd-hackers@freebsd.org Subject: iflib MSI init Message-ID: <CAD9jf8Bg%2B-kroGEiRuHBpaVbjCV-n=zQwE=UtOkcAcHG1AfDpQ@mail.gmail.com>
next 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?CAD9jf8Bg%2B-kroGEiRuHBpaVbjCV-n=zQwE=UtOkcAcHG1AfDpQ>
