-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support listener events #304
Merged
Merged
Conversation
This file contains 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
matttbe
force-pushed
the
listening-events
branch
from
October 8, 2024 18:07
2b85aa2
to
86fb98a
Compare
Merged
Pull Request Test Coverage Report for Build 11252856342Details
💛 - Coveralls |
These events have been added to the upstream kernel a while ago, see commit f8c9dfbd875b ("mptcp: add pm listener events") in the kernel. To better explain why these events are useful, better to quote [1]: MPTCP for Linux, when not using the in-kernel PM, depends on the userspace PM to create extra listening sockets before announcing addresses and ports. Let's call these "PM listeners". With the existing MPTCP netlink events, a userspace PM can create PM listeners at startup time, or in response to an incoming connection. Creating sockets in response to connections is not optimal: ADD_ADDRs can't be sent until the sockets are created and listen()ed, and if all connections are closed then it may not be clear to the userspace PM daemon that PM listener sockets should be cleaned up. With the addition of MPTCP netlink events for listening socket close & create, PM listening sockets can be managed based on application activity. These new events are then now handled by mptcpd, and plugins can be notified via two new hooks: - listener_created(laddr, pm) - listener_closed(laddr, pm) Link: multipath-tcp/mptcp_net-next#313 [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Just to serve as an example, similar to what is done for other events like ADD_ADDR, RM_ADDR, and MP_PRIO. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Just the structure to be able to test the new hooks. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Adding new hooks, checking the laddr value -- similar to what is done when a new connection is created -- and incrementing the linked counter, like the other hooks. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Tests 1 and 2 are imitating the server side: a new listening socket is created. Not in the other ones, imitating the client side. Also validate the null plugin. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
force-pushed
the
listening-events
branch
from
October 9, 2024 10:11
86fb98a
to
8d975d7
Compare
matttbe
added a commit
to matttbe/mptcpd
that referenced
this pull request
Oct 9, 2024
The API has been modified: only new items have been added, see PR multipath-tcp#297 and multipath-tcp#304. It is then required to increase CURRENT and AGE, according to libtool's documentation. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
ossama-othman
approved these changes
Oct 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
matttbe
added a commit
that referenced
this pull request
Oct 26, 2024
The API has been modified: only new items have been added, see PR #297 and #304. It is then required to increase CURRENT and AGE, according to libtool's documentation. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
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.
These events have been added to the upstream kernel a while ago, see commit f8c9dfbd875b ("mptcp: add pm listener events") in the kernel.
To better explain why these events are useful, better to quote the feature request:
These new events are then now handled by mptcpd, and plugins can be notified via two new hooks:
listener_created(laddr, pm)
listener_closed(laddr, pm)
Note that without this PR, many entries are visible in the logs mentioning these events are not supported each time a new listener socket is created (maybe it would be better to display this warning only once, but that's a different issue):
Closes #284