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

Improve multicast performace #1137

Merged
merged 2 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/images/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN dpkg -i /usr/src/python3-openvswitch*.deb /usr/src/libopenvswitch*.deb
RUN cd /usr/src/ && git clone -b branch-21.06 --depth=1 https://github.com/ovn-org/ovn.git && \
cd ovn && \
curl -s https://github.com/kubeovn/ovn/commit/e24734913d25c0bffdf1cfd79e14ef43d01e1019.patch | git apply && \
curl -s https://github.com/kubeovn/ovn/commit/eee4ace8a3dd00f0a067fed0f0cabee46a29aa54.patch | git apply && \
curl -s https://github.com/kubeovn/ovn/commit/8f4e4868377afb5e980856755b9f6394f8b649e2.patch | git apply && \
sed -i 's/OVN/ovn/g' debian/changelog && \
rm -rf .git && \
./boot.sh && \
Expand Down
2 changes: 0 additions & 2 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ HW_OFFLOAD=${HW_OFFLOAD:-false}
ENABLE_LB=${ENABLE_LB:-true}
ENABLE_NP=${ENABLE_NP:-true}
ENABLE_EXTERNAL_VPC=${ENABLE_EXTERNAL_VPC:-true}
MULTICAST_PRIVILEGED=${MULTICAST_PRIVILEGED:-false}
# The nic to support container network can be a nic name or a group of regex
# separated by comma, if empty will use the nic that the default route use
IFACE=${IFACE:-}
Expand Down Expand Up @@ -1886,7 +1885,6 @@ spec:
- --enable-lb=$ENABLE_LB
- --enable-np=$ENABLE_NP
- --enable-external-vpc=$ENABLE_EXTERNAL_VPC
- --multicast-privileged=$MULTICAST_PRIVILEGED
- --logtostderr=false
- --alsologtostderr=true
- --log_file=/var/log/kube-ovn/kube-ovn-controller.log
Expand Down
5 changes: 0 additions & 5 deletions pkg/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ type Configuration struct {
EnableLb bool
EnableNP bool
EnableExternalVpc bool

MulticastPrivileged bool
}

// ParseFlags parses cmd args then init kubeclient and conf
Expand Down Expand Up @@ -113,8 +111,6 @@ func ParseFlags() (*Configuration, error) {
argEnableLb = pflag.Bool("enable-lb", true, "Enable load balancer")
argEnableNP = pflag.Bool("enable-np", true, "Enable network policy support")
argEnableExternalVpc = pflag.Bool("enable-external-vpc", true, "Enable external vpc support")

argMulticastPrivileged = pflag.Bool("multicast-privileged", false, "Move broadcast/multicast flows to table ls_in_pre_lb in logical switches' ingress pipeline to improve broadcast/multicast performace (default false)")
)

klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
Expand Down Expand Up @@ -168,7 +164,6 @@ func ParseFlags() (*Configuration, error) {
EnableLb: *argEnableLb,
EnableNP: *argEnableNP,
EnableExternalVpc: *argEnableExternalVpc,
MulticastPrivileged: *argMulticastPrivileged,
}

if config.NetworkType == util.NetworkTypeVlan && config.DefaultHostInterface == "" {
Expand Down
4 changes: 0 additions & 4 deletions pkg/controller/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import (
)

func (c *Controller) InitOVN() error {
if err := c.ovnClient.SetMulticastPrivileged(c.config.MulticastPrivileged); err != nil {
return err
}

if err := c.initClusterRouter(); err != nil {
klog.Errorf("init cluster router failed: %v", err)
return err
Expand Down
7 changes: 0 additions & 7 deletions pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ func (c Client) SetUseCtInvMatch() error {
return nil
}

func (c Client) SetMulticastPrivileged(enabled bool) error {
if _, err := c.ovnNbCommand("set", "NB_Global", ".", fmt.Sprintf("options:mcast_privileged=%v", enabled)); err != nil {
return fmt.Errorf("failed to set NB_Global option mcast_privileged to %v: %v", enabled, err)
}
return nil
}

func (c Client) SetICAutoRoute(enable bool, blackList []string) error {
if enable {
if _, err := c.ovnNbCommand("set", "NB_Global", ".", "options:ic-route-adv=true", "options:ic-route-learn=true", fmt.Sprintf("options:ic-route-blacklist=%s", strings.Join(blackList, ","))); err != nil {
Expand Down
2 changes: 0 additions & 2 deletions yamls/kube-ovn-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ spec:
- --pod-nic-type=veth-pair
- --enable-lb=true
- --enable-np=true
- --enable-external-vpc=true
- --multicast-privileged=false
env:
- name: ENABLE_SSL
value: "false"
Expand Down
2 changes: 0 additions & 2 deletions yamls/kube-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ spec:
- --default-logical-gateway=false
- --default-exclude-ips=
- --node-switch-cidr=100.64.0.0/16
- --node-switch-gateway=100.64.0.1
- --service-cluster-ip-range=10.96.0.0/12
- --network-type=geneve
- --default-interface-name=
Expand All @@ -58,7 +57,6 @@ spec:
- --enable-lb=true
- --enable-np=true
- --enable-external-vpc=true
- --multicast-privileged=false
env:
- name: ENABLE_SSL
value: "false"
Expand Down