Skip to content

Conversation

@makubacki
Copy link
Member

Description

EfiDhcp4Start() would spin forever if DhcpSb->IoStatus is not updated from EFI_ALREADY_STARTED.

This change captures the poll status (instead of ignoring it) and break out on failures so scenarios like unplug/media-loss return an error instead of hanging.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • PXE boot with USB NIC disconnected during boot

Integration Instructions

  • N/A

@makubacki makubacki self-assigned this Dec 11, 2025
`EfiDhcp4Start()` would spin forever if `DhcpSb->IoStatus` is not
updated from `EFI_ALREADY_STARTED`.

This change captures the poll status (instead of ignoring it) and
break out on failures so scenarios like unplug/media-loss return an
error instead of hanging.

Signed-off-by: Michael Kubacki <[email protected]>
@makubacki makubacki force-pushed the networkpkg_dhcp4dxe_udp_poll_break branch from a3f22d4 to d39e686 Compare December 11, 2025 23:37
@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202502@860256e). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/202502   #1595   +/-   ##
================================================
  Coverage                  ?   0.55%           
================================================
  Files                     ?     165           
  Lines                     ?   71951           
  Branches                  ?    1750           
================================================
  Hits                      ?     402           
  Misses                    ?   71542           
  Partials                  ?       7           
Flag Coverage Δ
NetworkPkg 0.55% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

DhcpSb->UdpIo->Protocol.Udp4->Poll (DhcpSb->UdpIo->Protocol.Udp4);
// MU_CHANGE [BEGIN] - Add Udp4 Polling break support
Status = DhcpSb->UdpIo->Protocol.Udp4->Poll (DhcpSb->UdpIo->Protocol.Udp4);
if (EFI_ERROR (Status)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention to catch things like EFI_DEIVCE_ERROR? Should this have an exception for EFI_TIMEOUT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the goal is to use the Poll() return code to prevent the system from hanging in the loop if polling encounters an error. I'll check if an exception for EFI_TIMEOUT should be added.

@cfernald cfernald self-requested a review December 12, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants