Page MenuHomeFreeBSD

Avoid enabling MSI-X if MSI-X is disabled globally.
ClosedPublic

Authored by shurd on Oct 26 2017, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 9:35 PM
Unknown Object (File)
Dec 20 2023, 5:38 AM
Unknown Object (File)
Dec 14 2023, 1:12 AM
Unknown Object (File)
Nov 25 2023, 4:08 PM
Unknown Object (File)
Nov 23 2023, 3:10 PM
Unknown Object (File)
Nov 22 2023, 9:53 AM
Unknown Object (File)
Nov 19 2023, 9:37 AM
Unknown Object (File)
Nov 16 2023, 6:27 AM
Subscribers

Details

Summary

It was reported on the community call that with
hw.pci.enable_msix=0, iflib would enable MSI-X on the device and attempt
to use it, which caused issues. Test the sysctl explicitly and do not
enable MSI-X if it's disabled globally.

Test Plan

Have reporter test, test for regressions on physical and
virtual systems.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 26 2017, 11:33 PM
This revision was automatically updated to reflect the committed changes.

Is this really better than just exposing whatever variable hw.pci.enable_msix corresponds to?

In D12805#266524, @cem wrote:

Is this really better than just exposing whatever variable hw.pci.enable_msix corresponds to?

It's certainly less intrusive. Until I understand exactly why iflib is rewriting PCIM_MSIXCTRL_MSIX_ENABLE in the PCI config register (the comment points to virtualized environments), I want to keep it simple to delete this change if I end up deleting the call to pci_write_config().