-
Notifications
You must be signed in to change notification settings - Fork 387
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
[multicast] fix the issue multicast does not work if antreaPolicy is disabled #3807
Conversation
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.
Code change looks good to me, please create an issue to link this fix.
In the commit message, Multicast doesn't use a different register, but use a different register bit to mark the packet is for Multicast purpose. |
Codecov Report
@@ Coverage Diff @@
## main #3807 +/- ##
==========================================
+ Coverage 63.38% 64.96% +1.57%
==========================================
Files 280 280
Lines 39750 39750
==========================================
+ Hits 25197 25825 +628
+ Misses 12593 11937 -656
- Partials 1960 1988 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f469b75
to
a2553c5
Compare
cmd/antrea-agent/agent.go
Outdated
@@ -638,7 +638,8 @@ func run(o *Options) error { | |||
if features.DefaultFeatureGate.Enabled(features.Traceflow) { | |||
packetInReasons = append(packetInReasons, uint8(openflow.PacketInReasonTF)) | |||
} | |||
if features.DefaultFeatureGate.Enabled(features.AntreaPolicy) { | |||
if features.DefaultFeatureGate.Enabled(features.AntreaPolicy) || | |||
features.DefaultFeatureGate.Enabled(features.Multicast) { |
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 think a more proper fix is to remove the first argument of StartPacketInHandler
and just get the reasons from the keys of c.packetInHandlers
to avoid all the redundancy and inconsistency.
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.
@wenyingd @hongliangl does the above way work?
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 think a more proper fix is to remove the first argument of StartPacketInHandler and just get the reasons from the keys of c.packetInHandlers to avoid all the redundancy and inconsistency.
I prefer this way.
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, it looks better. updated
…disabled Currently, packetIn reason only supports 0 and 1. There is no more available packetIn reasons as traceflow and antreaPolicy use both. Multicast reuses packetIn reason with antreaPolicy, and uses a different register bit to indicate the real reason. There is no queue for packetIn reason 'PacketInReasonNP' if antreaPloicy is disabled. And multicast will not work then. This patch fixes antrea-io#3808 Signed-off-by: Bin Liu <biliu@vmware.com>
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 |
Currently, packetIn reason only supports 0 and 1. There is no more available packetIn reasons
as traceflow and antreaPolicy use both. Multicast reuses packetIn reason with antreaPolicy, and
uses different register bit to indicate the real reason. There is no queue for packetIn reason
'PacketInReasonNP' if antreaPloicy is disabled. And multicast will not work then.
This patch fixes #3808