Skip to content
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

vsock: try epoll_modify before epoll_register in recv_pkt #506

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

ikicha
Copy link
Contributor

@ikicha ikicha commented Oct 27, 2023

Summary of the PR

The problem: vhost-device vsock failed to send "large" packet from guest to host
How to fix: in this context, epoll listener can be already registered via other TX event, so let it try epoll_modify first to avoid 'silent' failure which possibly drops packets.

Fixes #494

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@stsquad
Copy link
Collaborator

stsquad commented Oct 27, 2023

@ikicha this breaks the existing tests which makes me think this isn't the right approach.

@ikicha ikicha force-pushed the large_pkt_drop branch 2 times, most recently from aa37219 to f8c4a0b Compare October 27, 2023 11:00
@ikicha ikicha changed the title [vsock] try epoll_modify before epoll_register in recv_pkt vsock: try epoll_modify before epoll_register in recv_pkt Oct 27, 2023
in this context, epoll listener can be already registered via other TX
event, so let it try epoll_modify first to avoid 'silent' failure which
possibly drops packets.

Signed-off-by: Jeongik Cha <jeongik@google.com>
like recv_pkt, added log for epoll_register error instead of panic
Signed-off-by: Jeongik Cha <jeongik@google.com>
@vireshk vireshk enabled auto-merge (rebase) October 31, 2023 08:18
@vireshk vireshk merged commit 6d0f7f6 into rust-vmm:main Oct 31, 2023
2 checks passed
@ikicha ikicha deleted the large_pkt_drop branch October 31, 2023 14:38
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.

[vsock] tx/rx hungup after large packet is delivered
4 participants