Page MenuHomeFreeBSD

Fix em(4) tx interrupt routing
ClosedPublic

Authored by pkelsey on Feb 3 2019, 12:21 AM.

Details

Summary

In em_if_msix_intr_assign(), the tx msix index is currently computed modulo the number of tx queues instead of modulo the number of rx queues (the intent that was supposed to be implemented here is to map the tx queues to the vectors allocated to the rx queues as iflib uses a combined tx/rx interrupt approach). This fixes the issue.

I didn't encounter a problem operationally, this is just something that stood out while I was doing some reading. I believe this could only cause operational issues in the case where the number of tx queues configured is greater than the number of rx queues configured (tx events would be missed on all tx queues above the number of rx queues, assuming the hardware isn't willing and able to object to the routing of interrupts to unassigned MSI-X vectors during init).

The conversion of '(i % adapter->tx_num_queues)' to 'i' in the eims computations is because taking the modulus of the loop index by the loop limit is pointless and just makes the code harder to read.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pkelsey created this revision.Feb 3 2019, 12:21 AM
marius accepted this revision.Feb 3 2019, 7:48 AM
This revision is now accepted and ready to land.Feb 3 2019, 7:48 AM
erj accepted this revision.Feb 7 2019, 8:17 PM
This revision was automatically updated to reflect the committed changes.