[LSF/MM/BPF TOPIC] BPF unit testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BPF Unit Testing
================

Unit tests are very important before deploying the application
to production. For BPF, bpf_prog_test_run() subcommand
is designed for unit testing. User provides input data
(e.g., packet) and input context, the bpf program will
be executed in the kernel, and potentially modified
packet and context are returned to the user space
for checking. Currently, certain bpf
programs with __sk_buff contexts, xdp programs and
flow dissector programs are supported.

For better BPF unit testing, firstly, we really want
bpf_prog_test_run() to support all program types.
Secondly, the current verification for only returning packets
and contexts may not be enough. If the bpf program modifies
a particular kernel data structure field, user may want to
verify it is indeed changed without modifying
bpf programs. Lastly, We may have some bpf helpers
hard to support, e.g., bpf_redirect.

We would like to discuss the above three issues so
bpf unit testing can become much better.

-- Yonghong




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux