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

ecmp feature support #498

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
31 changes: 15 additions & 16 deletions config-intel-e2000.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,31 @@ grpc:
server_port: 51703
num_threads: 10
static_external_macs: []
interfaces:
phyports:
- rep: "enp0s1f0d1"
vsi: 0
- rep: "enp0s1f0d3"
vsi: 1
grpcacc: "enp0s1f0d2"
grpchost: "00:0d:00:03:09:64"
vrfmux: "enp0s1f0d4"
portmux: "enp0s1f0d5"
p4:
enabled: true
representors:
port_mux: "port-mux"
vrf_mux: "vrf-mux"
grpc_acc: "host"
grpc_host: "00:20:00:00:14:48"
phy0_rep: "port0"
phy1_rep: "port1"
config:
p4infofile: /root/p4files/opi_ln.p4info.txt
binfile: /root/p4files/opi_ln.pb.bin
p4infofile: /root/networking.ethernet.acceleration.mev.infra.joint/gw_integration/p4files/evpn_gw.p4info.txt
binfile: /root/networking.ethernet.acceleration.mev.infra.joint/gw_integration/p4files/evpn_gw.pb.bin
linuxfrr:
enabled: true
defaultvtep: "vxlan-vtep"
portmux: "enp0s1f0d5"
vrfmux: "enp0s1f0d4"
ipmtu: 2962
localas: 65011
netlink:
enabled: true
pollinterval: 1
phyports:
- name: "enp0s1f0d1"
vsi: 0
- name: "enp0s1f0d2"
vsi: 1
grddefaultroute: false
enableecmp: true
loglevel:
db: INFO
grpc: INFO
Expand Down
22 changes: 13 additions & 9 deletions pkg/evpn/LinuxVendorModule/intele2000/intelE2000.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,20 +325,24 @@ func handlevrf(objectData *eventbus.ObjectData) {
func disableRpFilter(iface string) {
// Work-around for the observation that sometimes the sysctl -w command did not take effect.
rpFilterDisabled := false
for i := 0; i < 3; i++ {
for i := 0; i < 5; i++ {
rpDisable := fmt.Sprintf("net.ipv4.conf.%s.rp_filter=0", iface)
run([]string{"sysctl", "-w", rpDisable}, false)
time.Sleep(2 * time.Millisecond)
output, errCode := run([]string{"sysctl", "-w", rpDisable}, false)
if errCode != 0 {
log.Printf("Error setting rp_filter: %s\n", output)
continue
}
time.Sleep(200 * time.Millisecond)
rpDisable = fmt.Sprintf("net.ipv4.conf.%s.rp_filter", iface)
CP, err := run([]string{"sysctl", "-n", rpDisable}, false)
if err == 0 && strings.HasPrefix(CP, "0") {
output, errCode = run([]string{"sysctl", "-n", rpDisable}, false)
if errCode == 0 && strings.HasPrefix(output, "0") {
rpFilterDisabled = true
log.Printf("LVM: rpFilterDisabled: %+v\n", rpFilterDisabled)
log.Printf("RP filter disabled on interface %s\n", iface)
break
}
}
if !rpFilterDisabled {
log.Printf("Failed to disable rp_filtering on interface %s\n", iface)
log.Printf("Failed to disable rp_filter on interface %s\n", iface)
}
}

Expand Down Expand Up @@ -417,8 +421,8 @@ func Initialize() {
}
}
}
portMux = config.GlobalConfig.LinuxFrr.PortMux
vrfMux = config.GlobalConfig.LinuxFrr.VrfMux
portMux = config.GlobalConfig.Interfaces.PortMux
vrfMux = config.GlobalConfig.Interfaces.VrfMux
ipMtu = config.GlobalConfig.LinuxFrr.IPMtu
brTenant = "br-tenant"
ctx = context.Background()
Expand Down
Loading
Loading