-
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
Openflow1.5 integration #3770
Openflow1.5 integration #3770
Conversation
5710470
to
59fcd61
Compare
693b0bd
to
297bcd0
Compare
Codecov Report
@@ Coverage Diff @@
## main #3770 +/- ##
==========================================
+ Coverage 64.47% 65.89% +1.42%
==========================================
Files 294 307 +13
Lines 44391 44515 +124
==========================================
+ Hits 28622 29335 +713
+ Misses 13441 12811 -630
- Partials 2328 2369 +41
*This pull request uses carry forward flags. Click here to find out more.
|
24f4364
to
3860144
Compare
/test-ipv6-only-e2e |
This pull request introduces 1 alert when merging 3860144 into 6d3036b - view on LGTM.com new alerts:
|
62b6b8b
to
dde9b04
Compare
/test-all |
/test-ipv6-only-e2e |
/test-windows-all |
/test-all |
/test-windows-all |
/test-all |
/test-all |
/test-all |
/test-ipv6-e2e |
/test-all |
b310c36
to
8808794
Compare
/test-all |
/test-all |
/test-all |
/test-all |
pkg/ovs/openflow/ofctrl_action.go
Outdated
binary.BigEndian.PutUint32(maskBytes[:], mask) | ||
pktMarkField.Mask = util.NewBuffer(maskBytes[:]) | ||
valueData = valueData << rng.Offset() | ||
} | ||
binary.BigEndian.PutUint32(valueBytes[:], valueData) |
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 meant why we create new slices with [:]
so many times, but now I see valueBytes
and maskBytes
are arrays.
Since the method mainly use slices, should it just declare slices in the beginning, instead of declaring arrays and keep creating slices from it?
valueBytes := make([]byte, 4)
maskBytes := make([]byte, 4)
pkg/ovs/openflow/ofctrl_packetout.go
Outdated
@@ -319,6 +332,9 @@ func (b *ofPacketOutBuilder) Done() *ofctrl.PacketOut { | |||
klog.Errorf("Invalid PacketOutBuilder: IP header and IPv6 header are not allowed to exist at the same time") | |||
return nil | |||
} | |||
if b.pktOut.InPort == 0 { | |||
b.pktOut.InPort = openflow15.P_CONTROLLER |
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.
Doesn't ofnet set it when it's 0?
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.
Originally ofnet does not have set default value in the case Inport
is 0. So I added the logic in antrea code. But with the final code, ofnet uses openflow15.P_CONTROLLER
in this case. I removed this code in antrea with my latest update.
1. Consume messages defined in OpenFlow1.5 2. Use set_field instead of load, and use copy_field instead of move 3. The type of PacketIn.Data and PacketOut.Data is changed to Buffer in libOpenflow, so a conversion from Buffer to Ethernet is needed in both logic and tests 4. Parse matches set NXM_NX_REGX via message OXM_CLASS_PACKET_REGS in packetIn message. xreg (64bit) is used in OpenFlow1.5 in PacketIn to provide OVS register settings, a convention from xreg to reg (32bit) is used in functions. 5. Meter works as an Action instead of Instruction in OpenFlow1.5. So Antrea needs to apply MeterAction if the meter id is expected to be consumed in flow actions. Signed-off-by: wenyingd <wenyingd@vmware.com>
/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
/test-flexible-ipam-e2e |
/test-integration |
/test-ipv6-only-all |
/skip-integration tested manually |
/test-ipv6-e2e |
/test-ipv6-only-all |
/test-ipv6-only-conformance |
/test-ipv6-only-e2e |
1 similar comment
/test-ipv6-only-e2e |
"OXM_CLASS_PACKET_REGS" is used in OpenFlow1.5 instead. OVS 64bit xreg is actually used in
this mesage. A convension from OVS 32bit reg to 64bit xreg is needed when trying to identify
the match settings.
of the original "Ethernet". A type cast is needed to parse or set Ethernet packet in these two
messages.
Signed-off-by: wenyingd wenyingd@vmware.com