Commit b16fc097 authored by Tobias Klauser's avatar Tobias Klauser Committed by Alexei Starovoitov

bpf: Fix two typos in uapi/linux/bpf.h

Also remove trailing whitespaces in bpf_skb_get_tunnel_key example code.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200821133642.18870-1-tklauser@distanz.ch
parent c210773d
...@@ -767,7 +767,7 @@ union bpf_attr { ...@@ -767,7 +767,7 @@ union bpf_attr {
* *
* Also, note that **bpf_trace_printk**\ () is slow, and should * Also, note that **bpf_trace_printk**\ () is slow, and should
* only be used for debugging purposes. For this reason, a notice * only be used for debugging purposes. For this reason, a notice
* bloc (spanning several lines) is printed to kernel logs and * block (spanning several lines) is printed to kernel logs and
* states that the helper should not be used "for production use" * states that the helper should not be used "for production use"
* the first time this helper is used (or more precisely, when * the first time this helper is used (or more precisely, when
* **trace_printk**\ () buffers are allocated). For passing values * **trace_printk**\ () buffers are allocated). For passing values
...@@ -1033,14 +1033,14 @@ union bpf_attr { ...@@ -1033,14 +1033,14 @@ union bpf_attr {
* *
* int ret; * int ret;
* struct bpf_tunnel_key key = {}; * struct bpf_tunnel_key key = {};
* *
* ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);
* if (ret < 0) * if (ret < 0)
* return TC_ACT_SHOT; // drop packet * return TC_ACT_SHOT; // drop packet
* *
* if (key.remote_ipv4 != 0x0a000001) * if (key.remote_ipv4 != 0x0a000001)
* return TC_ACT_SHOT; // drop packet * return TC_ACT_SHOT; // drop packet
* *
* return TC_ACT_OK; // accept packet * return TC_ACT_OK; // accept packet
* *
* This interface can also be used with all encapsulation devices * This interface can also be used with all encapsulation devices
...@@ -1147,7 +1147,7 @@ union bpf_attr { ...@@ -1147,7 +1147,7 @@ union bpf_attr {
* Description * Description
* Retrieve the realm or the route, that is to say the * Retrieve the realm or the route, that is to say the
* **tclassid** field of the destination for the *skb*. The * **tclassid** field of the destination for the *skb*. The
* indentifier retrieved is a user-provided tag, similar to the * identifier retrieved is a user-provided tag, similar to the
* one used with the net_cls cgroup (see description for * one used with the net_cls cgroup (see description for
* **bpf_get_cgroup_classid**\ () helper), but here this tag is * **bpf_get_cgroup_classid**\ () helper), but here this tag is
* held by a route (a destination entry), not by a task. * held by a route (a destination entry), not by a task.
......
...@@ -767,7 +767,7 @@ union bpf_attr { ...@@ -767,7 +767,7 @@ union bpf_attr {
* *
* Also, note that **bpf_trace_printk**\ () is slow, and should * Also, note that **bpf_trace_printk**\ () is slow, and should
* only be used for debugging purposes. For this reason, a notice * only be used for debugging purposes. For this reason, a notice
* bloc (spanning several lines) is printed to kernel logs and * block (spanning several lines) is printed to kernel logs and
* states that the helper should not be used "for production use" * states that the helper should not be used "for production use"
* the first time this helper is used (or more precisely, when * the first time this helper is used (or more precisely, when
* **trace_printk**\ () buffers are allocated). For passing values * **trace_printk**\ () buffers are allocated). For passing values
...@@ -1033,14 +1033,14 @@ union bpf_attr { ...@@ -1033,14 +1033,14 @@ union bpf_attr {
* *
* int ret; * int ret;
* struct bpf_tunnel_key key = {}; * struct bpf_tunnel_key key = {};
* *
* ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);
* if (ret < 0) * if (ret < 0)
* return TC_ACT_SHOT; // drop packet * return TC_ACT_SHOT; // drop packet
* *
* if (key.remote_ipv4 != 0x0a000001) * if (key.remote_ipv4 != 0x0a000001)
* return TC_ACT_SHOT; // drop packet * return TC_ACT_SHOT; // drop packet
* *
* return TC_ACT_OK; // accept packet * return TC_ACT_OK; // accept packet
* *
* This interface can also be used with all encapsulation devices * This interface can also be used with all encapsulation devices
...@@ -1147,7 +1147,7 @@ union bpf_attr { ...@@ -1147,7 +1147,7 @@ union bpf_attr {
* Description * Description
* Retrieve the realm or the route, that is to say the * Retrieve the realm or the route, that is to say the
* **tclassid** field of the destination for the *skb*. The * **tclassid** field of the destination for the *skb*. The
* indentifier retrieved is a user-provided tag, similar to the * identifier retrieved is a user-provided tag, similar to the
* one used with the net_cls cgroup (see description for * one used with the net_cls cgroup (see description for
* **bpf_get_cgroup_classid**\ () helper), but here this tag is * **bpf_get_cgroup_classid**\ () helper), but here this tag is
* held by a route (a destination entry), not by a task. * held by a route (a destination entry), not by a task.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment