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.
Rename datapath callback types for transport generalization #6070
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
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Rename datapath callback types for transport generalization #6070
Changes from all commits
7e5fd3bcb073b4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
If we're claiming this is more abstracted, should we also rename the variables from Udp/Tcp? Or is that out of scope for now / forever?
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.
It makes sense to do it here.
I first did a big research replace and reverted it because for most instances,
UdpCallbacksis actually specifically about UDP, but this definition is generic.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.
From a naming perspective, I'd follow the BSD socket types, since their abstraction is about as good as any:
DGRAM_CALLBACKS for a datapath built upon SOCK_DGRAM semantics
STREAM_CALLBACKS for a datapath built upon SOCK_STREAM semantics instead of CONN_CALLBACKS
This is imperfect, for sure, but should be most intuitive as long as our set of datapath models roughly align with BSD socket semantics.
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.
I considered STREAM, but what hold me is that for RDMA, for instance, we have a connection-oriented, reliable, datagram-oriented protocol, but not a stream.
If you think STREAM is more intuitive and is worth the slight over-use, I'm ok going with it.
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.
Generally agree it would be best to do a comprehensive refactor.
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.
I'll fix the comments, in most places.
In that one specifically, "UDP handlers" is accurate, because we are in a specific datapath that deals with UDP (while from the core layer point of view, it shouldn't matter)
Uh oh!
There was an error while loading. Please reload this page.