[ofw] Doing queries on subnet every 30 seconds

Fab Tillier ftillier at microsoft.com
Wed Jun 1 10:54:06 PDT 2011


Smith, Stan wrote on Wed, 1 Jun 2011 at 10:05:43

>>>   Your idea of IOC scanning on the bus driver occurrence of
>>> IRP_MN_QUERY_DEVICE_RELATIONS has merit, might you suggest a filter as
>>> there are at least 8 occurrences during a reboot?
>> 
>> Any idea why there are so many?  Are they all of Type=BusRelations?  Do
>> we trigger these by reporting a device relations change (via a call to
>> IoInvaliateDeviceRelations)?
> 
> During boot,  all IRP_MN_QUERY_DEVICE_RELATIONS queries are of the type
> __query_device_relations(): BusRelations for IODEVICE

Queries of device relations to the IODEVICE objects should not result in a sweep.  These are for example queries to the IPoIB device, not the actual HCA.  In this case, the bus driver sees the query because it is the PDO driver for those child devices.

> No log evidence of IoInvalidateDeviceRelation calls?

You'd have to trace it, I wouldn't expect to see it in the trace you showed.   By code inspection, IB_PNP_PORT_ADD event causes a call to IoInvalidateDeviceRelations.

> Not clear as to why there are so many QUERY_DEVICE_RELATIONS, sans one
> per port? In this case a single InfiniHost HCA with 1 connected port of 2.

You have one for the HCA device itself, then one for the IB_PNP_PORT_ADD event for each of the HCA's ports.  Seems like things add up here.  Whether the port is connected or not is irrelevant here, the port exists and is reported to the system.

> Did figure out that 2 IRP_MN_ functions of IRP_MJ_PNP are not handled.
> 
>   IRP_MN_QUERY_LEGACY_BUS_RELATIONS - not clear what the impact is on
> not supporting this?

I think things work as they are, so we don't need to return anything for this...

>   IRP_MN_DEVICE_ENUMERATED - win7 only, appears to signify a PDO is now
> valid to be used in kernel calls requiring a PDO arg; prior to this call said
> routines will bugcheck win7.

Do we ever try to use the PDO before we get this?

>>> An invocation of
>>> 'devcon rescan' invokes 3 separate IRP_MN_QUERY_DEVICE_RELATIONS.
>> 
>> Are these all of the same type (Type=BusRelations)?
> 
> Yes.

If you look at the target, one query goes to the bus, then each IPoIB device receives one too, as you would expect.  Only the one destined for the IB_BUS device should cause an IOC rescan (and the PnP IRP should be pending until the scan completes).

Cheers,
-Fab

> WinDbg console logs attached.
>



More information about the ofw mailing list