Skip to content

Commit

Permalink
Merge pull request #1137 from kubeovn/feat/multicast
Browse files Browse the repository at this point in the history
Improve multicast performace
  • Loading branch information
zhangzujian authored Dec 3, 2021
2 parents 4499505 + fac6c72 commit 90f62fd
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 23 deletions.
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

0 comments on commit 90f62fd

Please sign in to comment.