History

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.

Stanislav Fomichev committed 3 years ago

Commit 7cb779a1 parent 94589642 files · +6 −2Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+3−1
@@ -1962,7 +1962,9 @@ union bpf_attr { · 1961 unmodified lines
19621962 * performed again, if the helper is used in combination with
19631963 * direct packet access.
19641964 * 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.
19661968 *
19671969 * u64 bpf_get_current_pid_tgid(void)
19681970 * Description

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t