mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
pping: Change default ingress program from XDP to tc
Using the XDP ingress hook requires a newer kernel (needs Toke's patch fixing the verification of global function for BPF_PROG_TYPE_EXT programs) than tc mode, is will likely perform worse than tc if running in generic mode (due to no driver support for XDP). Furthermore, even when XDP works and has driver support, its performance benefit over tc is likely small as the packets are always passed on to the network stack regardless (not creating a fast-path that bypasses the network stack). Therefore, use the tc ingress hook as default instead, and only use XDP if explicitly required by the user (-I/--ingress hook xdp). This partly addresses issue #49, as ePPing should no longer by default get the confusing error message from failing verification if the kernel lacks Toke's verifier patch. Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
This commit is contained in:
@@ -1013,7 +1013,7 @@ int main(int argc, char *argv[])
|
||||
.clean_args = { .cleanup_interval = 1 * NS_PER_SECOND,
|
||||
.valid_thread = false },
|
||||
.object_path = "pping_kern.o",
|
||||
.ingress_prog = PROG_INGRESS_XDP,
|
||||
.ingress_prog = PROG_INGRESS_TC,
|
||||
.egress_prog = PROG_EGRESS_TC,
|
||||
.cleanup_ts_prog = "tsmap_cleanup",
|
||||
.cleanup_flow_prog = "flowmap_cleanup",
|
||||
|
Reference in New Issue
Block a user