@@ -328,6 +328,15 @@ MpOpenConfiguration(
328328 return Status ;
329329}
330330
331+ static
332+ VOID
333+ MpInitializeOffload (
334+ _Inout_ ADAPTER_OFFLOAD * Offload
335+ )
336+ {
337+ Offload -> GsoMaxOffloadSize = MAX_GSO_SIZE ;
338+ }
339+
331340static
332341NDIS_STATUS
333342MpReadConfiguration (
@@ -345,6 +354,8 @@ MpReadConfiguration(
345354 Adapter -> MtuSize = FNMP_DEFAULT_MTU - ETH_HDR_LEN ;
346355 Adapter -> CurrentLookAhead = 0 ;
347356 Adapter -> CurrentPacketFilter = 0 ;
357+ MpInitializeOffload (& Adapter -> OffloadCapabilities );
358+ MpInitializeOffload (& Adapter -> OffloadConfig );
348359
349360 Adapter -> RssEnabled = 0 ;
350361 TRY_READ_INT_CONFIGURATION (ConfigHandle , & RegRSS , & Adapter -> RssEnabled );
@@ -452,28 +463,28 @@ MpFillOffload(
452463
453464 if (AdapterOffload -> LsoV2IPv4 ) {
454465 Offload -> LsoV2 .IPv4 .Encapsulation = Encapsulation ;
455- Offload -> LsoV2 .IPv4 .MaxOffLoadSize = MAX_GSO_SIZE ;
466+ Offload -> LsoV2 .IPv4 .MaxOffLoadSize = AdapterOffload -> GsoMaxOffloadSize ;
456467 Offload -> LsoV2 .IPv4 .MinSegmentCount = MIN_GSO_SEG_COUNT ;
457468 }
458469
459470 if (AdapterOffload -> LsoV2IPv6 ) {
460471 Offload -> LsoV2 .IPv6 .Encapsulation = Encapsulation ;
461- Offload -> LsoV2 .IPv6 .MaxOffLoadSize = MAX_GSO_SIZE ;
472+ Offload -> LsoV2 .IPv6 .MaxOffLoadSize = AdapterOffload -> GsoMaxOffloadSize ;
462473 Offload -> LsoV2 .IPv6 .MinSegmentCount = MIN_GSO_SEG_COUNT ;
463474 Offload -> LsoV2 .IPv6 .IpExtensionHeadersSupported = NDIS_OFFLOAD_SUPPORTED ;
464475 Offload -> LsoV2 .IPv6 .TcpOptionsSupported = NDIS_OFFLOAD_SUPPORTED ;
465476 }
466477
467478 if (AdapterOffload -> UsoIPv4 ) {
468479 Offload -> UdpSegmentation .IPv4 .Encapsulation = Encapsulation ;
469- Offload -> UdpSegmentation .IPv4 .MaxOffLoadSize = MAX_GSO_SIZE ;
480+ Offload -> UdpSegmentation .IPv4 .MaxOffLoadSize = AdapterOffload -> GsoMaxOffloadSize ;
470481 Offload -> UdpSegmentation .IPv4 .MinSegmentCount = MIN_GSO_SEG_COUNT ;
471482 Offload -> UdpSegmentation .IPv4 .SubMssFinalSegmentSupported = NDIS_OFFLOAD_SUPPORTED ;
472483 }
473484
474485 if (AdapterOffload -> UsoIPv6 ) {
475486 Offload -> UdpSegmentation .IPv6 .Encapsulation = Encapsulation ;
476- Offload -> UdpSegmentation .IPv6 .MaxOffLoadSize = MAX_GSO_SIZE ;
487+ Offload -> UdpSegmentation .IPv6 .MaxOffLoadSize = AdapterOffload -> GsoMaxOffloadSize ;
477488 Offload -> UdpSegmentation .IPv6 .MinSegmentCount = MIN_GSO_SEG_COUNT ;
478489 Offload -> UdpSegmentation .IPv6 .IpExtensionHeadersSupported = NDIS_OFFLOAD_SUPPORTED ;
479490 Offload -> UdpSegmentation .IPv6 .SubMssFinalSegmentSupported = NDIS_OFFLOAD_SUPPORTED ;
0 commit comments