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

Listener inline #1981

Merged
merged 3 commits into from
Dec 8, 2024
Merged

Listener inline #1981

merged 3 commits into from
Dec 8, 2024

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Dec 8, 2024

fixes #

Note that the above format should be used in your git commit comments.
You agree that by submitting a PR, you have read and agreed to our
contributing guidelines.

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 89.94253% with 35 lines in your changes missing coverage. Please review.

Project coverage is 81.81%. Comparing base (5223a14) to head (b6549f7).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/sp/transport/udp/udp.c 88.54% 11 Missing ⚠️
src/core/dialer.c 86.66% 8 Missing ⚠️
src/core/listener.c 85.18% 8 Missing ⚠️
src/core/pipe.c 92.06% 5 Missing ⚠️
src/core/socket.c 96.22% 2 Missing ⚠️
src/sp/transport/socket/sockfd.c 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1981      +/-   ##
==========================================
+ Coverage   81.71%   81.81%   +0.10%     
==========================================
  Files          95       95              
  Lines       24047    24077      +30     
  Branches     3206     3208       +2     
==========================================
+ Hits        19650    19699      +49     
+ Misses       4325     4305      -20     
- Partials       72       73       +1     

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

@gdamore gdamore force-pushed the listener-inline branch 2 times, most recently from 3647319 to 1be753c Compare December 8, 2024 21:33
This is a new transport API, which should make it easier for transports
to rely upon lifetime guarantees made by the common SP framework, thus
eliminating the need for transport specific reference counters, reap
lists, and similar.

The transport declares the size of the object in the ops vector (for
pipe, dialer, or listener), and the framework supplies one allocated
using the associated allocator.

For now these add the pipe object to the socket and endpoint using
linked linked lists.  The plan is to transition those to reference
counts which should be lighter weight and free form locking issues.

The pipe teardown has been moved more fully to the reaper, to avoid
some of the deadlocks that can occur as nni_pipe_close can be called
from almost any context.

For now the old API is retained as well, but the intention is to convert
all the transports and then remove it.
This eliminates the need for separate reap operations, and it
also eliminates a few failure modes, further simplifying the code.

This is the first transport to get this treatment. The others will follow.
This allows us to eliminate some extra reference counting and
reaping related complexity.
@gdamore gdamore merged commit b6549f7 into main Dec 8, 2024
19 checks passed
@gdamore gdamore deleted the listener-inline branch December 8, 2024 22:18
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.

1 participant