Changing MSI-X affinity at runtime using NdisMConfigMSIXTableEntry

Hello everyone,

I have an NDIS driver, and I am attempting to change an MSI-X processor affinity at runtime when I receive a new RSS indirection table. I’ve been attempting to follow this documentation. In my test environment I have 4 vCPUs, where CPU0 and CPU2 are eligible for RSS. Prior to my change I have 3 MSI-X entries (1 for tx, 1 for rx, 1 for management), with affinity CPU0, CPU0, and all CPUs respectively.

  1. In MiniportFilterResourceRequirements I have updated the IO_RESOURCE_REQUIREMENTS_LIST to insert another IO_RESOURCE_DESCRIPTOR with an unused RSS processor, CPU2.

  2. I’ve verified that NdisMRegisterInterruptEx is returning me 4 MessageInfo entries now, with the first 3 being the standard ones and the 4th being the resource I added.

  3. I’m now trying (just in testing) to swap the second MessageInfo affinity with the fourth MessageInfo affinity which I added (CPU0 → CPU2).

This is where I’m stuck getting NDIS_STATUS_INVALID_PARAMETER, but no error logging that I can find. It’s unclear to me what the TableEntry and MessageNumber parameters are supposed to be, but I would have assumed they were the index in my MSI-X resource array, so to swap the 4th and the 2nd I have:

TableEntry = 3, MessageNumber = 1 (I also tried the inverse)

This appears wrong, anyone have any experience with this?

Cheers,
David