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
Bpf iface auto detection #8803
base: master
Are you sure you want to change the base?
Bpf iface auto detection #8803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, it would be good/possible not to introduce the new option, deprecate the l3 regexp and just see of ia device is l3 or l2 and or slave/master in a bond. That would let us exclude device using the pattern that we do not care and we woul dnot need to include bondX inthe patter to include bonds.
felix/config/config_params.go
Outdated
@@ -204,6 +204,7 @@ type Config struct { | |||
BPFForceTrackPacketsFromIfaces []string `config:"iface-filter-slice;docker+"` | |||
BPFDisableGROForIfaces *regexp.Regexp `config:"regexp;"` | |||
BPFExcludeCIDRsFromNAT []string `config:"cidr-list;;"` | |||
BPFInterfaceAutoDetection string `config:"oneof(TCP,Enabled,Disabled);Enabled;non-zero"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BPFInterfaceAutoDetection string `config:"oneof(TCP,Enabled,Disabled);Enabled;non-zero"` | |
BPFInterfaceAutoDetection string `config:"oneof(Enabled,Disabled);Enabled;non-zero"` |
felix/fv/bpf_attach_test.go
Outdated
tc.Felixes[0].Exec("ip", "link", "add", "dummy0", "type", "dummy") | ||
tc.Felixes[0].Exec("ip", "link", "add", "dummy1", "type", "dummy") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if you named these devices eth3 and eth4 or somethign else that could interfere with the regexp?
felix/dataplane/linux/bpf_ep_mgr.go
Outdated
// Check if the interface is bond. If so, update the interface type for | ||
// slaves, master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this comment relates to?
felix/dataplane/linux/bpf_ep_mgr.go
Outdated
|
||
func (m *bpfEndpointManager) autoDetectInterfaceType(intf *net.Interface) IfaceType { | ||
name := intf.Name | ||
if name == "tunl0" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if ipip tunnel has a different name?
felix/dataplane/linux/bpf_ep_mgr.go
Outdated
} | ||
|
||
func isBondIface(name string) bool { | ||
bonding := fmt.Sprintf("/sys/class/net/%s/bonding", name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be queried via netlink?
Description
This PR adds the following
This PR does not handle attaching xdp programs to the bond slaves. Will be done subsequently.
Related issues/PRs
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.