-
Notifications
You must be signed in to change notification settings - Fork 9
Escape from promiscuous mode with packet siphons #743
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: master
Are you sure you want to change the base?
Conversation
Essentially rifles through all packets, and hands anything not directed at OPTE back to the actual illumos pipeline.
@@ -962,19 +963,20 @@ fn clear_xde_underlay() -> Result<NoResp, OpteError> { | |||
}; |
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.
Comment about this whole block: What are we supposed to do if any of these unexpected conditions result in an error being emitted, since we're altering state as part of the attempted tear-down. take()
-ing the underlay
for example. If we emit EBUSY
, then we won't have a path back to re-take()
-ing it, right?
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.
Some of these errors are suggestive of programming errors, but we could do worse than to check all preconditions at the first instance and then proceed (the conditions we've setup, no ports && write lock held
, should ensure nothing can violate those expectations). I'll revisit the logic here in the morning.
This change hangs a callback off the primary MAC client on each underlay device, which gives OPTE primary access to any packets coming into a device in both the interrupt and poll-thread contexts. This allows us to leave promiscuous mode behind, but OPTE is now responsible for handing any unmatched packets back to the actual illumos pipeline.
This change does not unblock all the work that a more systemic fix such as IPD45 and the intended end-state of #62 would get us. We will be in a position where we are able to think about bathcing packets for Viona's benefit in the Rx path from the NIC, but not e.g. Tx or Loopback (as Viona is still hamstrung by the same-flow constraint in
mac_tx
). Moreover, when we get flows reworked we'll be in a far less responsible position for every service on the rack's traffic.Companion change to (read: reliant on) https://github.com/oxidecomputer/stlouis/issues/744.
Quoting from a comment on that stlouis issue, since it's private: