summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2023-09-11 12:47:30 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2023-09-11 22:29:19 +0200
commit7cb779a6867fea00b4209bcf6de2f178a743247d (patch)
tree98f3ee67f16f9909d4ed588d5198daa30240bb89 /include
parent9458964a6da621873a92f7cf03242c020799ecd3 (diff)
downloadlinux-stable-7cb779a6867fea00b4209bcf6de2f178a743247d.tar.gz
linux-stable-7cb779a6867fea00b4209bcf6de2f178a743247d.tar.bz2
linux-stable-7cb779a6867fea00b4209bcf6de2f178a743247d.zip
bpf: Clarify error expectations from bpf_clone_redirect
Commit 151e887d8ff9 ("veth: Fixing transmit return status for dropped packets") exposed the fact that bpf_clone_redirect is capable of returning raw NET_XMIT_XXX return codes. This is in the conflict with its UAPI doc which says the following: "0 on success, or a negative error in case of failure." Update the UAPI to reflect the fact that bpf_clone_redirect can return positive error numbers, but don't explicitly define their meaning. Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20230911194731.286342-1-sdf@google.com
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/bpf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 8790b3962e4b..0448700890f7 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1962,7 +1962,9 @@ union bpf_attr {
* performed again, if the helper is used in combination with
* direct packet access.
* Return
- * 0 on success, or a negative error in case of failure.
+ * 0 on success, or a negative error in case of failure. Positive
+ * error indicates a potential drop or congestion in the target
+ * device. The particular positive error codes are not defined.
*
* u64 bpf_get_current_pid_tgid(void)
* Description