Skip to content

Commit

Permalink
Fix FV build
Browse files Browse the repository at this point in the history
  • Loading branch information
sridhartigera committed May 28, 2024
1 parent d968b55 commit 2532a34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions felix/fv/bpf_attach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var _ = infrastructure.DatastoreDescribe("_BPF-SAFE_ Felix bpf reattach object",
tc.Felixes[0].Exec("ifconfig", "eth20", "up")

Eventually(getBPFNet, "15s", "1s").Should(ContainElements("eth10", "eth20"))
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHost, map[string]uint32{"eth10": ifstate.FlgIPv4Ready | ifstate.FlgHost, "eth20": ifstate.FlgIPv4Ready | ifstate.FlgHost})
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHEP, map[string]uint32{"eth10": ifstate.FlgIPv4Ready | ifstate.FlgHEP, "eth20": ifstate.FlgIPv4Ready | ifstate.FlgHEP})

By("Creating a bond interface and eth10, eth20 to the bond")
tc.Felixes[0].Exec("ip", "link", "add", "bond0", "type", "bond", "mode", "802.3ad")
Expand All @@ -136,20 +136,20 @@ var _ = infrastructure.DatastoreDescribe("_BPF-SAFE_ Felix bpf reattach object",
time.Sleep(0 * time.Second)
Eventually(getBPFNet, "15s", "1s").Should(ContainElement("bond0"))
Eventually(getBPFNet, "15s", "1s").ShouldNot(ContainElements("eth10", "eth20"))
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHost, map[string]uint32{"bond0": ifstate.FlgIPv4Ready | ifstate.FlgBond})
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHEP, map[string]uint32{"bond0": ifstate.FlgIPv4Ready | ifstate.FlgBond})

By("Removing eth10 from bond")
tc.Felixes[0].Exec("ip", "link", "set", "eth10", "nomaster")
tc.Felixes[0].Exec("ifconfig", "eth10", "up")
Eventually(getBPFNet, "15s", "1s").ShouldNot(ContainElement("eth20"))
Eventually(getBPFNet, "15s", "1s").Should(ContainElements("bond0", "eth10"))
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHost, map[string]uint32{"bond0": ifstate.FlgIPv4Ready | ifstate.FlgBond, "eth10": ifstate.FlgIPv4Ready | ifstate.FlgHost})
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHEP, map[string]uint32{"bond0": ifstate.FlgIPv4Ready | ifstate.FlgBond, "eth10": ifstate.FlgIPv4Ready | ifstate.FlgHEP})

By("Removing eth20 from bond")
tc.Felixes[0].Exec("ip", "link", "set", "eth20", "nomaster")
tc.Felixes[0].Exec("ifconfig", "eth20", "up")
Eventually(getBPFNet, "15s", "1s").Should(ContainElements("bond0", "eth10", "eth20"))
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHost, map[string]uint32{"eth10": ifstate.FlgIPv4Ready | ifstate.FlgHost, "eth20": ifstate.FlgIPv4Ready | ifstate.FlgHost})
ensureRightIFStateFlags(tc.Felixes[0], ifstate.FlgIPv4Ready|ifstate.FlgHEP, map[string]uint32{"eth10": ifstate.FlgIPv4Ready | ifstate.FlgHEP, "eth20": ifstate.FlgIPv4Ready | ifstate.FlgHEP})

By("Creating a bond interface which does match BPFDataIfacePattern")
tc.Felixes[0].Exec("ip", "link", "add", "foo0", "type", "bond", "mode", "802.3ad")
Expand Down
2 changes: 1 addition & 1 deletion felix/fv/bpf_dual_stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func removeIPv6Address(k8sClient *kubernetes.Clientset, felix *infrastructure.Fe

func ensureRightIFStateFlags(felix *infrastructure.Felix, ready uint32, additionalInterfaces map[string]uint32) {
expectedIfacesToFlags := map[string]uint32{
"eth0": ifstate.FlgHost | ready,
"eth0": ifstate.FlgHEP | ready,
}

if additionalInterfaces != nil {
Expand Down

0 comments on commit 2532a34

Please sign in to comment.