-
Notifications
You must be signed in to change notification settings - Fork 4.7k
OVS parsing improvements #17878
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
OVS parsing improvements #17878
Conversation
Rename "ParseForDelete" to "ParseForFilter" (since it's about parsing flow descriptions that are being used as filters, not specifically about deleting), and fix up the logic around default values in ParseForAdd vs ParseForFilter. (Among other things, this fixes the code so that you can match on table=0, priority=0, or cookie=0.)
5742d7e
to
ae697ea
Compare
Nice |
/retest |
getPodDetailsBySandboxID() was written to have the list of flows passed into it, for ease of testing. But that requires the caller to know what flows it is looking for, and anyway, ovsController is already mockable anyway so we can test the function just as easily as an ovsController method.
ae697ea
to
e32c9c3
Compare
/retest |
1 similar comment
/retest |
@dcbw PTAL |
/approve but not reviewed |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, pravisankar, smarterclayton The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue. |
The more-complicated version of #17313. This takes advantage of the fact that "ovs-ofctl dump-flows" lets you pass a filter, so rather than getting back the whole list of flows and parsing each one, we can just ask for a much smaller set of flows to begin with.
In particular:
DumpFlows("table=%d", ruleVersionTable)
and get back only the single flow we're looking forDumpFlows("table=20,arp")
and only get back the flows that might be the one we're looking for. (You can't match on theactions
field, so there's no way to request only the flow that has the specificnote
that we're looking for. We could store the first 4 bytes of the sandbox ID in the cookie and then add that to the filter, I guess, but this code doesn't get run much anyway...)