kata-containers / packaging

Kata Containers version 1.x packaging (for version 2.x see https://github.com/kata-containers/kata-containers).
https://katacontainers.io/
Apache License 2.0
119 stars 92 forks source link

add BPF related kernel config #1171

Closed pwang7 closed 3 years ago

pwang7 commented 3 years ago

add BPF related kernel config flags, so that people can run BPF with customized kernel in Kata

devimc commented 3 years ago

thanks @pwang7 - Could you please elaborate on your commit message? why we need this and what are you fixing? take a look to this https://github.com/kata-containers/community/blob/master/CONTRIBUTING.md#examples

I wonder what could be the performance impact of this change

/test-qemu-metrics /test-metrics

devimc commented 3 years ago

/test-ubuntu-qemu-metrics

pwang7 commented 3 years ago

what

@devimc Thanks for your reply!

This PR is to enable BPF related features in kernel, when building a customized kernel for Kata.

Without these BPF related features enabled in kernel, many BPF programs cannot run in Kata, such as using BPF for tracing, network filtering, etc.

The main purpose of this PR is to facilitate BPF developers to run their BPF code in Kata. Since BPF is of active development in kernel community, and many BPF related new features require very recent kernel 5.8+. With this PR to enable BPF features in kernel, it's easy to run and test BPF programs in Kata with multiple customized new kernel versions. Otherwise BPF developers have to install multiple kernel versions to their dev machines and switch to different kernels by reboot.

devimc commented 3 years ago

Thanks @pwang7

The main purpose of this PR is to facilitate BPF developers to run their BPF code in Kata. Since BPF is of active development in kernel community, and many BPF related new features require very recent kernel 5.8+. With this PR to enable BPF features in kernel, it's easy to run and test BPF programs in Kata with multiple customized new kernel versions. Otherwise BPF developers have to install multiple kernel versions to their dev machines and switch to different kernels by reboot.

That makes sense, but since not all users/developers may need BPF, it should be optional. would you mind reworking your pull request to make BPF optional? It would be great if you can add an option (--bpf) to build-kernel.sh to enable it. Take a look to this PR https://github.com/kata-containers/packaging/pull/938/files - it can help you as reference.

Thanks

pwang7 commented 3 years ago

Thanks @pwang7

The main purpose of this PR is to facilitate BPF developers to run their BPF code in Kata. Since BPF is of active development in kernel community, and many BPF related new features require very recent kernel 5.8+. With this PR to enable BPF features in kernel, it's easy to run and test BPF programs in Kata with multiple customized new kernel versions. Otherwise BPF developers have to install multiple kernel versions to their dev machines and switch to different kernels by reboot.

That makes sense, but since not all users/developers may need BPF, it should be optional. would you mind reworking your pull request to make BPF optional? It would be great if you can add an option (--bpf) to build-kernel.sh to enable it. Take a look to this PR https://github.com/kata-containers/packaging/pull/938/files - it can help you as reference.

Thanks

Just updated according to your suggestion, please review.

pwang7 commented 3 years ago

Thanks @pwang7.

@jodh-intel Just updated according to your review comments.

devimc commented 3 years ago

/test

devimc commented 3 years ago

/AzurePipelines run

azure-pipelines[bot] commented 3 years ago
Azure Pipelines successfully started running 2 pipeline(s).
pwang7 commented 3 years ago

thanks @pwang7 - could you please update your commit message?, it needs a fixes #NNNN and a body, see https://github.com/kata-containers/community/blob/master/CONTRIBUTING.md#examples

Do I need to file an issue first? Since I don't have issue number now.

devimc commented 3 years ago

Do I need to file an issue first? Since I don't have issue number now.

yes, please

pwang7 commented 3 years ago

Do I need to file an issue first? Since I don't have issue number now.

yes, please

Updated.

devimc commented 3 years ago

/test

devimc commented 3 years ago

/AzurePipelines run

azure-pipelines[bot] commented 3 years ago
Azure Pipelines successfully started running 2 pipeline(s).