-
Notifications
You must be signed in to change notification settings - Fork 4
Fix spelling errors and incorrect property assignments in SdnDiag.Server.psm1 #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ver.psm1 Co-authored-by: arudell <18577812+arudell@users.noreply.github.com>
| # update the OffLoadStateDetails properties | ||
| 'NVGRE LSO Offload Enabled' { $object.PortState.LsoV2Supported = $propertyValue} | ||
| 'NVGRE LSO Offload Enabled' { $object.OffloadState.LsoV2Supported = $propertyValue} | ||
| 'NVGRE RSS Enabled' { $object.PortState.RssSupported = $propertyValue } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't these other lines with $object.PortState... have to be updated too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR corrects spelling errors and property assignment bugs in the SdnDiag.Server.psm1 module that prevented VM NIC statistics and VFP port state data from being correctly populated during diagnostic data collection.
Changes:
- Fixed spelling error in VFP output filename from 'unifiied' to 'unified'
- Corrected property assignments to match class definitions for VM NIC statistics
- Fixed OffloadState property assignment for LSO V2 support flag
Comments suppressed due to low confidence (1)
src/modules/SdnDiag.Server.psm1:2241
- These property assignments reference $object.PortState but should reference $object.OffloadState. Based on the VfpPortState class definition (line 164), OffloadState is the property that contains the OffLoadStateDetails instance. The properties RssSupported, TransmitChecksumOffloadSupported, ReceiveChecksumOffloadSupported, VmqSupported, LsoV2SupportedVxlan, RssSupportedVxlan, TransmitChecksumOffloadSupportedVxlan, ReceiveChecksumOffloadSupportedVxlan, VmqSupportedVxlan, and InnerMacVmqEnabled are all defined in the OffLoadStateDetails class (lines 174-182), not as direct members of VfpPortState. Line 2231 correctly uses $object.OffloadState.LsoV2Supported, but these subsequent lines were not updated consistently.
'NVGRE RSS Enabled' { $object.PortState.RssSupported = $propertyValue }
'NVGRE Transmit Checksum Offload Enabled' { $object.PortState.TransmitChecksumOffloadSupported = $propertyValue }
'NVGRE Receive Checksum Offload Enabled' { $object.PortState.ReceiveChecksumOffloadSupported = $propertyValue }
'NVGRE VMQ Enabled' { $object.PortState.VmqSupported = $propertyValue }
'VXLAN LSO Offload Enabled' { $object.PortState.LsoV2SupportedVxlan = $propertyValue }
'VXLAN RSS Enabled' { $object.PortState.RssSupportedVxlan = $propertyValue }
'VXLAN Transmit Checksum Offload Enabled' { $object.PortState.TransmitChecksumOffloadSupportedVxlan = $propertyValue }
'VXLAN Receive Checksum Offload Enabled' { $object.PortState.ReceiveChecksumOffloadSupportedVxlan = $propertyValue }
'VXLAN VMQ Enabled' { $object.PortState.VmqSupportedVxlan = $propertyValue }
'Inner MAC VMQ Enabled' { $object.PortState.InnerMacVmqEnabled = $propertyValue }
Description
Corrects 5 issues in
SdnDiag.Server.psm1where property assignments referenced non-existent class members or contained typos:vfpctrl_list_unifiied_flow→vfpctrl_list_unified_flow(line 408)SendBufferAllocationCountnow correctly assigned (wasSendBufferAllocationSize) for 'Send Buffer Allocation Count' metric (line 2421)InsufficientRndisOperations(wasInsufficientRndisOperationsBuffers) per class at line 234 (line 2430)QuotaExceeded(wasQuotaExceededErrors) per class at line 235 (line 2431)$object.OffloadState.LsoV2Supported(was$object.PortState.LsoV2Supported) per class at line 164 (line 2231)These changes ensure VM NIC statistics and VFP port state are correctly populated when collected.
Change type
Checklist:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.