Pull in updates in BPF helper function description.
Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -1466,8 +1466,8 @@ union bpf_attr { · 1465 unmodified lines | ||
| 1466 | 1466 | * If no cookie has been set yet, generate a new cookie. Once |
| 1467 | 1467 | * generated, the socket cookie remains stable for the life of the |
| 1468 | 1468 | * 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. | |
| 1471 | 1471 | * Return |
| 1472 | 1472 | * A 8-byte long non-decreasing number on success, or 0 if the |
| 1473 | 1473 | * socket field is missing inside *skb*. |
| @@ -1571,8 +1571,11 @@ union bpf_attr { · 97 unmodified lines | ||
| 1571 | 1571 | * but this is only implemented for native XDP (with driver |
| 1572 | 1572 | * support) as of this writing). |
| 1573 | 1573 | * |
| 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. | |
| 1576 | 1579 | * |
| 1577 | 1580 | * When used to redirect packets to net devices, this helper |
| 1578 | 1581 | * provides a high performance increase over **bpf_redirect**\ (). |