-
Notifications
You must be signed in to change notification settings - Fork 386
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
Implement traffic control interfaces via OVS #3580
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3580 +/- ##
==========================================
- Coverage 64.58% 63.70% -0.89%
==========================================
Files 278 278
Lines 39517 39604 +87
==========================================
- Hits 25523 25229 -294
- Misses 12011 12428 +417
+ Partials 1983 1947 -36
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8a55b2f
to
9f6ca48
Compare
9f6ca48
to
edea083
Compare
Before merging this PR, issue #3583 should be fixed. |
edea083
to
96d01ca
Compare
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.
Please add commit message to describe the change.
2f28158
to
b8c30d6
Compare
1333d66
to
e630e13
Compare
365f341
to
db3e5f6
Compare
844ae80
to
177c38d
Compare
04d3598
to
bde339f
Compare
fd7c42c
to
276ffde
Compare
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 overall
276ffde
to
2d6c412
Compare
Action().OutputToRegField(TrafficControlTargetOFPortField). | ||
Done(), | ||
// This generates the flow to output the packets to be redirected to the target traffic control port. | ||
L2ForwardingOutTable.ofTable.BuildFlow(priorityHigh+1). |
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.
Question: A packet is either mirrored or redirected, but not both mirrored and redirected?
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.
A packet should be either mirrored or redirected.
cacheKey := fmt.Sprintf("tc_%s", name) | ||
c.replayMutex.RLock() | ||
defer c.replayMutex.RUnlock() | ||
return c.modifyFlows(c.featurePodConnectivity.tcCachedFlows, cacheKey, flows) |
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.
Using modifyFlows, it might delete the original tc flows which are not included in the flows
generated by this call. I think your target is to append these flows in the cache but not overwrite?
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.
Since a traffic rule could be updated, the original tc flows should be deleted and new flows should be installed. Flows in the cache should be also overwritten.
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.
So do you mean InstallTrafficControlMarkFlows
is called for both add and update case? And UninstallTrafficControlMarkFlows
is called only when delete the tc configuration?
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.
Yes
Cookie(f.cookieAllocator.Request(f.category).Raw()). | ||
MatchInPort(returnOFPort). | ||
Action().LoadRegMark(FromTCReturnRegMark). | ||
Action().GotoStage(stageRouting). |
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.
Why not go to stageSwitching since the dst MAC in the packet is set before output to the redirected port?
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 update the comments here
// trafficControlReturnClassifierFlow generates the flow to mark the packets from traffic control return port and forward
// the packets to stageRouting directly. Note that, for the packets which are originally to be output to a tunnel port,
// value of NXM_NX_TUN_IPV4_DST for the returned packets needs to be loaded in stageRouting.
Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
2d6c412
to
e984e42
Compare
/test-all-features-conformance |
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, thanks
/test-ipv6-e2e |
/test-ipv6-only-conformance |
/test-ipv6-e2e |
tested the PR with a network analyzer and both mirroring and redirecting worked as expected, merging it. |
Thanks for testing and merging this. |
Signed-off-by: Hongliang Liu lhongliang@vmware.com
For #3324