Repository navigation
fix(net): preserve errno status for receive failures - #27
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
A TCP reset currently arrives from io_uring as
-ECONNRESET, but the receive completion handler replaces it withkUnknownand discards the errno diagnostic. Consumers such as Lavik consequently cannot distinguish an unavailable connection from an unclassified failure.Use
absl::ErrnoToStatusin the shared one-shot/multishot receive error path. Connection resets and aborts becomekUnavailable; other receive errors retain their errno-derived classification and diagnostic message. Orderly EOF remains a successful zero-byte read. Existing cancellation and buffer-exhaustion handling is unchanged, and successful receive processing adds no fields or branches.Add live loopback FIN/RST regressions for ordinary and buffered reads under default and forced one-shot configurations. Read selection uses separate branch-local awaits so GCC 13 propagates the error result correctly.
Validation (run from the Lavik checkout with
LAVIK_BYCORF_SOURCE_DIRpointing to this Bycorf worktree):build_ci/bycorf/bycorf_runtime_tests --gtest_filter=TcpBufferedRead.*PeerCloseStatus: both new regressions failed against the original receive handler.build_ci/bycorf/bycorf_runtime_tests: all 30 tests passed with Clang 18./tmp/lavik-metrics-bycorf-gcc/bycorf_runtime_tests: all 30 tests passed with GCC 13 Debug. The two new tests reproduced the CI failures locally before replacing the conditional-expression awaits with explicit branches.pre-commit run --files src/io/io_uring_backend.cpp include/bycorf/net/tcp_stream.h tests/tcp_buffered_read_test.cpp docs/architecture/networking.md(Bycorf root): passed.git diff --check: passed.The local host rejected provided-buffer-ring setup, so the default configuration fell back to one-shot receives. Actual multishot operation and DPDK/TLS were not separately exercised.
Companion consumer PR: eloqdata/lavik#414.