-
Notifications
You must be signed in to change notification settings - Fork 38
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
Enable support for ebpf program type tracepoints #389
Enable support for ebpf program type tracepoints #389
Conversation
7f01386
to
e0f8d49
Compare
Signed-off-by: Santhosh Fernandes <[email protected]>
e0f8d49
to
668f371
Compare
Signed-off-by: sferna1 <[email protected]>
c47e52b
to
9fbfa4b
Compare
Dependent on PR l3af-project/l3af-arch#113 |
.github/workflows/ci-e2e.yaml
Outdated
@@ -33,7 +33,7 @@ jobs: | |||
- name: Prep | |||
run: | | |||
sudo cp -r /home/runner/work/l3afd/l3afd /root | |||
sudo git clone https://github.com/l3af-project/l3af-arch.git /root/l3af-arch | |||
sudo git clone -b sanfern-e2e-add-probes https://github.com/sanfern/l3af-arch.git /root/l3af-arch |
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.
Please revert back once PR113 approved
kf/bpf.go
Outdated
@@ -81,9 +81,6 @@ func NewBpfProgram(ctx context.Context, program models.BPFProgram, conf *config. | |||
progMapFilePath = filepath.Join(conf.BpfMapDefaultPath, ifaceName, program.MapName) | |||
} else if program.ProgType == models.TCType { | |||
progMapFilePath = filepath.Join(conf.BpfMapDefaultPath, models.TCMapPinPath, ifaceName, program.MapName) | |||
} else { | |||
log.Error().Msgf("unsupported program type - %s", program.ProgType) | |||
return nil | |||
} |
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.
Is it suppose to add another check for the ProgType for tracepoints and keep the else for the type not supported?
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.
I agree, we should have an explicit list of types we support
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.
This block is for defining the progMapFilePath
for pinning, when we were not supporting probe types. We wanted to explicitly throw errors for other than prog types of tc or xdp. Since we are supporting probes, we don't need prog maps and also we are not chaining. We don't want to error out here in case of probes.
kf/bpf.go
Outdated
@@ -81,9 +81,6 @@ func NewBpfProgram(ctx context.Context, program models.BPFProgram, conf *config. | |||
progMapFilePath = filepath.Join(conf.BpfMapDefaultPath, ifaceName, program.MapName) | |||
} else if program.ProgType == models.TCType { | |||
progMapFilePath = filepath.Join(conf.BpfMapDefaultPath, models.TCMapPinPath, ifaceName, program.MapName) | |||
} else { | |||
log.Error().Msgf("unsupported program type - %s", program.ProgType) | |||
return nil | |||
} |
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.
I agree, we should have an explicit list of types we support
033a13c
to
116af47
Compare
Signed-off-by: sferna1 <[email protected]>
116af47
to
a793619
Compare
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.
LGTM
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.
Looks good
Enable support for ebpf program type Tracepoints.
Issue #404