Fwd: iflib MSI init
shreyank amartya
shreyankfbsd at gmail.com
Fri Mar 8 04:56:00 UTC 2019
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
More information about the freebsd-drivers
mailing list