-
Notifications
You must be signed in to change notification settings - Fork 375
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
Add support to modify OF table name #2585
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2585 +/- ##
==========================================
+ Coverage 61.18% 61.62% +0.44%
==========================================
Files 284 283 -1
Lines 23494 23625 +131
==========================================
+ Hits 14374 14559 +185
+ Misses 7565 7492 -73
- Partials 1555 1574 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-all |
/test-all |
/test-all |
/test-ipv6-e2e |
/test-ipv6-only-e2e |
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.
BTW, I was thinking could we define variables for each binding.Table, and so needs not to get the table by c.pipeline[id] every time to save a hash table lookup. But did not get a good idea to maintain the binding.Table - name - ID mapping with some clean/simple code.
a877a48
to
f1ea04f
Compare
/test-all |
/test-all |
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. Just several nits.
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 for addressing comments and resolving the multipart reply receive issue in libOpenflow / ofnet
766b38e
to
a656941
Compare
/skip-all Since the change is only for comments but not about logic code, and tests in last round already passed, I skip the tests in this round. |
a656941
to
f9c29af
Compare
/skip-all |
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
@tnqn any follow-up comment?
/test-all |
/test-conformance |
@tnqn Could you help review this PR again? |
// Create openflow.Client to ensure the OVS tables are added into the cache. | ||
bridgeName := "testbr" | ||
bridgeMgmtAddr := binding.GetMgmtAddress(ovsconfig.DefaultOVSRunDir, bridgeName) | ||
openflow.NewClient(bridgeName, bridgeMgmtAddr, ovsconfig.OVSDatapathSystem, true, false, false, false, true) |
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 is this needed when it's not used by any instance below? If this is really needed, it might indicate there is an anti-OOP code in the openflow package where some global variables require some objects to initialize implicitly.
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.
My bad, these code is added to ensure the functions openflow.GetFlowTableName
and openflow.GetFlowTableID
are called correctly after the binding.Table is added into cache ofTableCache
, and the related logic is called in function createOFTable
. To unbreak the code style, I would use function variables in handler.go and use mock functions in the unit test.
/test-all |
1. Use Multipart messages to query OVS table features and modify the table name property if the table is defined in Antrea pipeline 2. Use openflow.Table in the ofClient under pkg/agent/openflow directly, and remove the pipeline map and FlowTables in pipeline.go 3. Remove the typed type TableIDType, and use uint8 for table id directly. Signed-off-by: wenyingd <[email protected]>
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
/test-all |
/test-ipv6-e2e |
1 similar comment
/test-ipv6-e2e |
@wenyingd I will edit the commit message when merging it. Could you make the commit message of other patches wrapped properly following https://github.com/antrea-io/antrea/blob/main/CONTRIBUTING.md#getting-reviewers in the future? |
Use readable name for openflow tables.
Fixes #2617
Signed-off-by: wenyingd [email protected]