Skip to content

Add select interface support #899

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

Merged
merged 7 commits into from
Jun 11, 2025

Conversation

liujinhui-job
Copy link
Contributor

Added select function support to partially implement the select interface. This requires modifying the ff_kernel_max_fd value to ensure TCP/UDP sockets using the userspace protocol stack don't start from FD 1024, since select has FD number limitations due to its bitmask implementation.we implemented a fast bit polling approach that.

  1. Separates kernel FDs and ff_fds in readfds/writefds/exceptfds
    2.Calls their respective select interfaces
    3.Merges the results before returning to userspace
    The current first version only guarantees basic functionality works. We observe memcpy operations being used in the process, and will investigate potential optimizations for this part later.

@jfb8856606 jfb8856606 merged commit 515b916 into F-Stack:dev Jun 11, 2025
1 check passed
@liujinhui-job liujinhui-job deleted the add-select-support branch June 17, 2025 14:05
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.

2 participants