-
Notifications
You must be signed in to change notification settings - Fork 5.4k
IoHandle: add interfaceName() method #18531
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
Changes from 2 commits
27851a9
0cd8429
d21195d
be38d7b
f2827f1
ce6f9ab
2dafddd
c7f4d19
4243b7b
7372a08
1e2d2c3
5948098
5ea99e6
98b6896
09939e0
7bac749
c6175b6
6edc2ff
8f3464c
6ed79e2
89c9f15
40e3e1e
58cb9e4
75ed9b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,7 @@ class IoHandleImpl final : public Network::IoHandle, | |
|
|
||
| Api::SysCallIntResult shutdown(int how) override; | ||
| absl::optional<std::chrono::milliseconds> lastRoundTripTime() override { return absl::nullopt; } | ||
| absl::optional<std::string> interfaceName() override { return absl::nullopt; } | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @florincoras @rojkov I believe the same implementation that I wrote (above) for the IoSocketHandleImpl would work here. Do you think it would be worth it to move the implementation to the virtual class? Given that the implementation is based on
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The virtual class is supposed to be just an interface enforcing concrete implementations at compile-time like this trivial stub. Otherwise there's a chance of calling a suboptimal implementation (which e.g. checks os syscall availability first). And in this particular case it could be even an error if something called a user space handle's But I agree the implementation should be shared somehow where it makes sense. In #19082 I'll need the same code. Even more to that - I need the same implementation for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed with @rojkov. It won't also work for vcl because the interfaces are in another user space process (vpp), so not available via syscalls. The idea might not be too bright but one could argue that there should've been a syscall to get a socket's
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rojkov @florincoras thanks for your thoughtful responses. It makes sense to me. I also realize how little experience I have of this line of work. If you dont think that the current addition to the interface is egregious, do you all mind if I implement here as is and let you all handle this when/if you tackle moving localAddress() and peerAddress around?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't, I'm fine with it as it is for now. |
||
|
|
||
| void setWatermarks(uint32_t watermark) { pending_received_data_.setWatermarks(watermark); } | ||
| void onBelowLowWatermark() { | ||
|
|
||
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.
Will this change based on the other other PR?
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.
Yep. This will change to use the other PR (#18513) and prevent the ifdefs and direct syscalls.
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.
The windows failure can also be solved with ^.