Skip to content
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] Multicast group auto-discovery #2652

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

wenyingd
Copy link
Contributor

@wenyingd wenyingd commented Aug 26, 2021

  1. Use packetIn/packetOut to collect IGMP membership report and detect
    Multicast group.

  2. Add an OpenFlow entry for each Multicast group in which local Pods
    have joined to forward the packet normally and output it to
    antrea-gw0.

  3. Output the Multicast traffic to antrea-gw0 if no local Pods have
    joined the target Multicast group.

Signed-off-by: wenyingd wenyingd@vmware.com

@wenyingd wenyingd changed the title [WIP][Multicast] Multicast client auto-discovery [Multicast] Multicast group auto-discovery Aug 26, 2021
@lgtm-com
Copy link

lgtm-com bot commented Aug 26, 2021

This pull request introduces 1 alert when merging 8ac0b68 into f40b4ec - view on LGTM.com

new alerts:

  • 1 for Missing error check

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2021

Codecov Report

Merging #2652 (54d9b75) into main (2fcec4a) will decrease coverage by 0.41%.
The diff coverage is 37.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2652      +/-   ##
==========================================
- Coverage   60.85%   60.43%   -0.42%     
==========================================
  Files         295      297       +2     
  Lines       24897    25279     +382     
==========================================
+ Hits        15150    15278     +128     
- Misses       8096     8330     +234     
- Partials     1651     1671      +20     
Flag Coverage Δ
kind-e2e-tests 46.97% <3.68%> (-0.70%) ⬇️
unit-tests 40.30% <37.22%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/interfacestore/types.go 72.72% <ø> (ø)
pkg/agent/openflow/client.go 54.65% <0.00%> (-3.11%) ⬇️
pkg/apiserver/handlers/featuregates/handler.go 76.00% <ø> (ø)
pkg/features/antrea_features.go 16.66% <ø> (ø)
pkg/ovs/openflow/ofctrl_builder.go 59.21% <0.00%> (-0.55%) ⬇️
pkg/ovs/openflow/ofctrl_packetout.go 79.60% <0.00%> (-6.05%) ⬇️
pkg/agent/multicast/mcast_discovery.go 14.06% <14.06%> (ø)
pkg/agent/interfacestore/interface_cache.go 75.43% <25.00%> (-5.94%) ⬇️
pkg/agent/openflow/pipeline.go 72.91% <25.64%> (-1.45%) ⬇️
pkg/agent/multicast/mcast_controller.go 71.24% <71.24%> (ø)
... and 13 more

@lgtm-com
Copy link

lgtm-com bot commented Aug 27, 2021

This pull request introduces 1 alert when merging 9f4a43e into 04619b6 - view on LGTM.com

new alerts:

  • 1 for Missing error check

@wenyingd wenyingd force-pushed the multicast_autodiscovery branch 2 times, most recently from 8ce22df to 7742ef9 Compare August 30, 2021 02:54
@lgtm-com
Copy link

lgtm-com bot commented Aug 30, 2021

This pull request introduces 1 alert when merging 7742ef9 into d8d70ac - view on LGTM.com

new alerts:

  • 1 for Missing error check

@lgtm-com
Copy link

lgtm-com bot commented Sep 1, 2021

This pull request introduces 1 alert when merging b21ade3 into bfa1bc4 - view on LGTM.com

new alerts:

  • 1 for Missing error check

@lgtm-com
Copy link

lgtm-com bot commented Sep 2, 2021

This pull request introduces 1 alert when merging dc64ca9 into dded211 - view on LGTM.com

new alerts:

  • 1 for Missing error check

@wenyingd wenyingd force-pushed the multicast_autodiscovery branch 3 times, most recently from 38fc4c6 to dccac0e Compare September 2, 2021 09:16
pkg/agent/controller/multicast/mcast_controller.go Outdated Show resolved Hide resolved
const (
groupJoin eventType = iota
groupLeave

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why the query version is 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IGMP3 is now the main version for IGMP, so I use it as the default setting. Do you think we should send IGMP messages with all versions?

pkg/agent/controller/multicast/mcast_discovery.go Outdated Show resolved Hide resolved
@wenyingd
Copy link
Contributor Author

wenyingd commented Dec 8, 2021

/test-all
/test-windows-all
/test-ipv6-all
/test-ipv6-only-all

tnqn
tnqn previously approved these changes Dec 8, 2021
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn
Copy link
Member

tnqn commented Dec 8, 2021

/test-integration
/test-conformance

@tnqn
Copy link
Member

tnqn commented Dec 8, 2021

@jianjuns do you have more comments?

}
status := obj.(*GroupMemberStatus)
if c.groupHasInstalled(groupKey) {
status.mutex.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would mind explaining why you need lock and unlock here? I don't think it is necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two goroutines to operate the groupCache, one is this one to install/uninstall flows or routing entries, and the other is to receive the GroupMemberEvent. If not lock the entry, a race might exist that we find a group is stale and before removing the flows/routing entries in worker, the other goroutine get a new membership report, but worker deletes the entry.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your explaination

@wenyingd
Copy link
Contributor Author

/test-all

@ceclinux
Copy link
Contributor

LGTM

@wenyingd
Copy link
Contributor Author

/test-e2e
/skip-windows-all
/skip-windows-proxyall-e2e
/skip-ipv6-all

@wenyingd
Copy link
Contributor Author

/test-e2e

1 similar comment
@XinShuYang
Copy link
Contributor

/test-e2e

1. Use packetIn/packetOut to collect IGMP membership report and detect
   Multicast group.

2. Add an OpenFlow entry for each Multicast group in which local Pods
   have joined to forward the packet normally and output it to
   antrea-gw0.

3. Output the Multicast traffic to antrea-gw0 if no local Pods have
   joined the target Multicast group.

Signed-off-by: wenyingd <wenyingd@vmware.com>
@wenyingd
Copy link
Contributor Author

/test-integration
/test-all

@wenyingd
Copy link
Contributor Author

/test-windows-all
/test-ipv6-only-all
/test-ipv6-all

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn tnqn added this to the Antrea v1.5 release milestone Jan 4, 2022
@tnqn
Copy link
Member

tnqn commented Jan 5, 2022

Due to jenkins testbed issue, I have ran the required checks manually and the results are good.

@tnqn tnqn merged commit 6903eea into antrea-io:main Jan 5, 2022
bangqipropel pushed a commit to bangqipropel/antrea that referenced this pull request Jan 19, 2022
1. Use packetIn/packetOut to collect IGMP membership report and detect
   Multicast group.

2. Add an OpenFlow entry for each Multicast group in which local Pods
   have joined to forward the packet normally and output it to
   antrea-gw0.

3. Output the Multicast traffic to antrea-gw0 if no local Pods have
   joined the target Multicast group.

Signed-off-by: wenyingd <wenyingd@vmware.com>
@wenyingd wenyingd deleted the multicast_autodiscovery branch June 13, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants