From ee2f0c99156b13fc692c75b2239bfaeda76a7684 Mon Sep 17 00:00:00 2001 From: Liz Rice Date: Mon, 15 Nov 2021 16:43:51 +0000 Subject: [PATCH] docs: correct typos in BPF.XDP in reference guide --- docs/reference_guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference_guide.md b/docs/reference_guide.md index 9016846f61f7..ad20cfc8a814 100644 --- a/docs/reference_guide.md +++ b/docs/reference_guide.md @@ -1808,7 +1808,7 @@ BPF.attach_raw_socket(bpf_func, ifname) Examples in situ: [search /examples](https://github.com/iovisor/bcc/search?q=attach_raw_socket+path%3Aexamples+language%3Apython&type=Code) ### 9. attach_xdp() -Syntax: ```BPF.attach_xdp(dev="device", fn=b.load_func("fn_name",BPF_XDP), flags)``` +Syntax: ```BPF.attach_xdp(dev="device", fn=b.load_func("fn_name",BPF.XDP), flags)``` Instruments the network driver described by ```dev``` , and then receives the packet, run the BPF function ```fn_name()``` with flags. @@ -1823,7 +1823,7 @@ XDP_FLAGS_HW_MODE = (1 << 3) XDP_FLAGS_REPLACE = (1 << 4) ``` -You can use flags like this ```BPF.attach_xdp(dev="device", fn=b.load_func("fn_name",BPF_XDP), flags=BPF.XDP_FLAGS_UPDATE_IF_NOEXIST)``` +You can use flags like this ```BPF.attach_xdp(dev="device", fn=b.load_func("fn_name",BPF.XDP), flags=BPF.XDP_FLAGS_UPDATE_IF_NOEXIST)``` The default value of flgas is 0. This means if there is no xdp program with `device`, the fn will run with that device. If there is an xdp program running with device, the old program will be replaced with new fn program.