[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XENNET PATCH 1/2] Report NDIS minor version as expected by OS



Makes sense, I will update to pull Major and Minor from NdisGetVersion()

On Wed, Jul 24, 2024 at 9:06 AM Paul Durrant <xadimgnik@xxxxxxxxx> wrote:
On 09/07/2024 11:48, Owen Smith wrote:
> WHQL requires NDIS minor versions to match the OS under test.
> For Server 2022, this requires NDIS version 6.85 and Server 2025 requires
> NDIS version 6.89.
> In order to build with EWDK 22000, the reported version is echoed from the
> call to NdisGetVersion() without requiring updated headers.
>
> Note: NDIS 6.89 does add support for UDP Receive Segment Coalescing Offload
> (URO), but XenNet does not support this new NDIS feature.
>
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>
> ---
>   src/xennet/miniport.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/xennet/miniport.c b/src/xennet/miniport.c
> index 5dc9858..10717fa 100644
> --- a/src/xennet/miniport.c
> +++ b/src/xennet/miniport.c
> @@ -348,16 +348,16 @@ MiniportRegister(
>           MiniportDriverCharacteristics.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_3;
>           MiniportDriverCharacteristics.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_3;
>   
> -        MiniportDriverCharacteristics.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION; // 6
> -        MiniportDriverCharacteristics.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION; // 85
> +        MiniportDriverCharacteristics.MajorNdisVersion = 6;
> +        MiniportDriverCharacteristics.MinorNdisVersion = (UCHAR)(NdisGetVersion() & 0x00FF);

NdisGetVersion() should also return the 6 as well. I don't think we
should be hardcoding the major and dynamically determining the minor...
either both hardcoded, or neither.

>       } else
>   #endif
>       if (NdisGetVersion() >= NDIS_RUNTIME_VERSION_660) {
>           MiniportDriverCharacteristics.MajorNdisVersion = 6;
>           MiniportDriverCharacteristics.MinorNdisVersion = 60;
>       } else {
> -        MiniportDriverCharacteristics.MajorNdisVersion = NDIS_MINIPORT_MINIMUM_MAJOR_VERSION; // 6
> -        MiniportDriverCharacteristics.MinorNdisVersion = NDIS_MINIPORT_MINIMUM_MINOR_VERSION; // 30
> +        MiniportDriverCharacteristics.MajorNdisVersion = 6;
> +        MiniportDriverCharacteristics.MinorNdisVersion = 30;
>       }
>   
>       MiniportDriverCharacteristics.MajorDriverVersion = MAJOR_VERSION;



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.