Conversation
Dual-stack UDP sockets can send IPv4 packets even though their socket family is IPv6. Do not generate an IPv6 local EMSGSIZE error queue entry for IPv4 or IPv4-mapped destinations. Require an actual native IPv6 destination in the existing error queue helper and pass the resolved send destination on the ordinary output path, including connected sends. Keep native IPv6 error reporting and name-query ABI behavior intact. Extend the existing UDP dunitest suite across socket and packet families, connected and explicit sends, and RECVERR enablement. Verify positive IPv6 error metadata and destination identity as well as empty queues for IPv4 paths and after consumption. The same-deadline timerfd test assumed a single poll must observe every active timer. Poll may legally return a partially ready set. Collect each active descriptor once within one monotonic deadline, preserve cancelled descriptor checks, and require one tick per active timer with no unread ticks left. Use existing fd ownership to clean up assertion failures. Validation: - Reproduced both original gVisor dual-stack PayloadTooBig failures and both new UDP regression failures on the unmodified master kernel. - Linux: UDP dunitest 22/22, timerfd 9/9, same-deadline case 20 iterations, and original gVisor PayloadTooBig 6/6 pass. - Fixed DragonOS QEMU/KVM: UDP 22/22, timerfd 9/9, poll 4/4, alarm 4/4; same-deadline timerfd case passes 30 additional iterations. - Unmodified gVisor UDP loopback binary: 528 passed, 18 existing skips, zero failures; all six PayloadTooBig variants pass. - make kernel, FMT_CHECK=1 make fmt, and diff checks pass. Keep timerfd kernel logic and gVisor reference tests unchanged. Broader IPv4 ICMP error queue and MTU metadata behavior are outside this change. Signed-off-by: longjin <longjin@dragonos.org>
Member
Author
|
@codex review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Address two independent CI failures:
The UDP policy remains in the existing error queue helper. There are no new locks or protocol states, no changes to timerfd kernel scheduling, and no modifications to gVisor reference tests. The correct IPv6 socket name-query ABI is preserved.
Root cause and coverage
PayloadTooBig/2and/5returned an error queue record instead of EAGAIN; the same-deadline timerfd test observed 9 ready descriptors while requiring 16 in one call.Validation
Independent plan, UDP implementation and test reviews found no blocking issues.
Limits
The old timerfd assertion passed ten local baseline iterations; its failure was captured in CI and its assumption is not guaranteed by poll semantics. This change does not claim complete MTU/IPv4 ICMP error queue compatibility. Native IPv6 non-loopback output was reviewed at the code level, not separately exercised end-to-end. Full repository-wide gVisor and dunitest runs are left to CI; existing skips are not counted as passes.