Skip to content

Commit 56ce097

Browse files
jrfastabdavem330
authored andcommitted
net: comment fixes against BPF devmap helper calls
Update BPF comments to accurately reflect XDP usage. Fixes: 97f91a7 ("bpf: add bpf_redirect_map helper routine") Reported-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8f75222 commit 56ce097

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

include/uapi/linux/bpf.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,20 @@ union bpf_attr {
345345
* int bpf_redirect(ifindex, flags)
346346
* redirect to another netdev
347347
* @ifindex: ifindex of the net device
348-
* @flags: bit 0 - if set, redirect to ingress instead of egress
349-
* other bits - reserved
350-
* Return: TC_ACT_REDIRECT
351-
* int bpf_redirect_map(key, map, flags)
348+
* @flags:
349+
* cls_bpf:
350+
* bit 0 - if set, redirect to ingress instead of egress
351+
* other bits - reserved
352+
* xdp_bpf:
353+
* all bits - reserved
354+
* Return: cls_bpf: TC_ACT_REDIRECT on success or TC_ACT_SHOT on error
355+
* xdp_bfp: XDP_REDIRECT on success or XDP_ABORT on error
356+
* int bpf_redirect_map(map, key, flags)
352357
* redirect to endpoint in map
358+
* @map: pointer to dev map
353359
* @key: index in map to lookup
354-
* @map: fd of map to do lookup in
355360
* @flags: --
361+
* Return: XDP_REDIRECT on success or XDP_ABORT on error
356362
*
357363
* u32 bpf_get_route_realm(skb)
358364
* retrieve a dst's tclassid

0 commit comments

Comments
 (0)