Skip to contentSkip to conversation

ebpf: only include in system emulators

PATCH In review Paolo Bonzini 4 participants 8 messages Sep 7, 2021 – Sep 9, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ebpf: only include in system emulators

eBPF files are being included in system emulators, which is useless and also breaks compilation because ebpf/trace-events is only processed if a system emulator is included in the build.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/566

---
 ebpf/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/meson.build +1 -1
index 9cd0635370..2dd0fd8948 100644
@@ -1 +1 @@
-common_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
+softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Paolo Bonzini

eBPF files are being included in system emulators, which is useless and also breaks compilation because ebpf/trace-events is only processed if a system emulator is included in the build.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/566

---
 ebpf/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks.

#3 lore raw
In reply to Paolo Bonzini
Quoted 1 line · Paolo Bonzini

eBPF files are being included in system emulators, which is useless

I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP.

Quoted 3 lines

and
also breaks compilation because ebpf/trace-events is only processed if a system emulator is included in the build.

Andrew, any way to fix this?

Thanks

Quoted 14 lines

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/566

---
  ebpf/meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/meson.build +1 -1
index 9cd0635370..2dd0fd8948 100644
@@ -1 +1 @@
-common_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
+softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
#4 lore raw
Quoted 6 lines · Jason Wang
Quoted 1 line · Paolo Bonzini

eBPF files are being included in system emulators, which is useless

I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP.

Sorry, I meant "user emulators". That should make more sense, they don't have TAP at all.

Paolo

#5 lore raw
Quoted 7 lines · Paolo Bonzini
Quoted 5 lines · Jason Wang
Quoted 1 line · Paolo Bonzini

eBPF files are being included in system emulators, which is useless

Quoted 8 lines
Quoted 2 lines

I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP.

Sorry, I meant "user emulators". That should make more sense, they don't have TAP at all.

Paolo

I see so I've queued this.

Thanks

#6 lore raw
Quoted 9 lines · Jason Wang
Quoted 7 lines · Paolo Bonzini
Quoted 5 lines · Jason Wang
Quoted 1 line · Paolo Bonzini

eBPF files are being included in system emulators, which is useless

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP.

Sorry, I meant "user emulators". That should make more sense, they don't have TAP at all.

I see so I've queued this.

Did you fix the mistake in the commit message ?

thanks
-- PMM

#7 lore raw
Quoted 14 lines · Peter Maydell
Quoted 12 lines · Jason Wang
Quoted 10 lines · Paolo Bonzini
Quoted 7 lines · Jason Wang
Quoted 1 line · Paolo Bonzini

eBPF files are being included in system emulators, which is useless

I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Sorry, I meant "user emulators". That should make more sense, they don't have TAP at all.

I see so I've queued this.

Did you fix the mistake in the commit message ?

Yes.

Thanks

Quoted 4 lines

thanks
-- PMM