History

bpf: sync bpf.h to tools infrastructure

Pull in updates in BPF helper function description.

Daniel Borkmann committed 7 years ago

Commit 609a2ca1 parent cd48bdd1 file · +7 −4Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+7−4
@@ -1466,8 +1466,8 @@ union bpf_attr { · 1465 unmodified lines
14661466 * If no cookie has been set yet, generate a new cookie. Once
14671467 * generated, the socket cookie remains stable for the life of the
14681468 * socket. This helper can be useful for monitoring per socket
1469− * networking traffic statistics as it provides a unique socket
1470− * identifier per namespace.
1469+ * networking traffic statistics as it provides a global socket
1470+ * identifier that can be assumed unique.
14711471 * Return
14721472 * A 8-byte long non-decreasing number on success, or 0 if the
14731473 * socket field is missing inside *skb*.
@@ -1571,8 +1571,11 @@ union bpf_attr { · 97 unmodified lines
15711571 * but this is only implemented for native XDP (with driver
15721572 * support) as of this writing).
15731573 *
1574− * All values for *flags* are reserved for future usage, and must
1575− * be left at zero.
1574+ * The lower two bits of *flags* are used as the return code if
1575+ * the map lookup fails. This is so that the return value can be
1576+ * one of the XDP program return codes up to XDP_TX, as chosen by
1577+ * the caller. Any higher bits in the *flags* argument must be
1578+ * unset.
15761579 *
15771580 * When used to redirect packets to net devices, this helper
15781581 * provides a high performance increase over **bpf_redirect**\ ().