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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -1962,7 +1962,9 @@ union bpf_attr { · 1961 unmodified lines | |||
| 1962 | * performed again, if the helper is used in combination with | 1962 | * performed again, if the helper is used in combination with |
| 1963 | * direct packet access. | 1963 | * direct packet access. |
| 1964 | * Return | 1964 | * Return |
| 1965 | * 0 on success, or a negative error in case of failure. | 1965 | * 0 on success, or a negative error in case of failure. Positive |
| 1966 | * error indicates a potential drop or congestion in the target | ||
| 1967 | * device. The particular positive error codes are not defined. | ||
| 1966 | * | 1968 | * |
| 1967 | * u64 bpf_get_current_pid_tgid(void) | 1969 | * u64 bpf_get_current_pid_tgid(void) |
| 1968 | * Description | 1970 | * Description |