diff options
| author | Quentin Monnet <quentin.monnet@netronome.com> | 2019-05-10 10:51:25 -0400 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-05-12 19:12:45 -0400 |
| commit | c1fe1e701ee3344c7c9bcb8e14c4b8a40cad019e (patch) | |
| tree | e1151141b5440de59549398513c3bb27ec0ef0b8 | |
| parent | 80867c5e3c0275c7208816faac768a44fa3747be (diff) | |
tools: bpf: synchronise BPF UAPI header with tools
Synchronise the bpf.h header under tools, to report the fixes and
additions recently brought to the documentation for the BPF helpers.
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 145 |
1 files changed, 75 insertions, 70 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 72336bac7573..63e0cf66f01a 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -629,7 +629,7 @@ union bpf_attr { | |||
| 629 | * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ | 629 | * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ |
| 630 | * **->swhash** and *skb*\ **->l4hash** to 0). | 630 | * **->swhash** and *skb*\ **->l4hash** to 0). |
| 631 | * | 631 | * |
| 632 | * A call to this helper is susceptible to change the underlaying | 632 | * A call to this helper is susceptible to change the underlying |
| 633 | * packet buffer. Therefore, at load time, all checks on pointers | 633 | * packet buffer. Therefore, at load time, all checks on pointers |
| 634 | * previously done by the verifier are invalidated and must be | 634 | * previously done by the verifier are invalidated and must be |
| 635 | * performed again, if the helper is used in combination with | 635 | * performed again, if the helper is used in combination with |
| @@ -654,7 +654,7 @@ union bpf_attr { | |||
| 654 | * flexibility and can handle sizes larger than 2 or 4 for the | 654 | * flexibility and can handle sizes larger than 2 or 4 for the |
| 655 | * checksum to update. | 655 | * checksum to update. |
| 656 | * | 656 | * |
| 657 | * A call to this helper is susceptible to change the underlaying | 657 | * A call to this helper is susceptible to change the underlying |
| 658 | * packet buffer. Therefore, at load time, all checks on pointers | 658 | * packet buffer. Therefore, at load time, all checks on pointers |
| 659 | * previously done by the verifier are invalidated and must be | 659 | * previously done by the verifier are invalidated and must be |
| 660 | * performed again, if the helper is used in combination with | 660 | * performed again, if the helper is used in combination with |
| @@ -686,7 +686,7 @@ union bpf_attr { | |||
| 686 | * flexibility and can handle sizes larger than 2 or 4 for the | 686 | * flexibility and can handle sizes larger than 2 or 4 for the |
| 687 | * checksum to update. | 687 | * checksum to update. |
| 688 | * | 688 | * |
| 689 | * A call to this helper is susceptible to change the underlaying | 689 | * A call to this helper is susceptible to change the underlying |
| 690 | * packet buffer. Therefore, at load time, all checks on pointers | 690 | * packet buffer. Therefore, at load time, all checks on pointers |
| 691 | * previously done by the verifier are invalidated and must be | 691 | * previously done by the verifier are invalidated and must be |
| 692 | * performed again, if the helper is used in combination with | 692 | * performed again, if the helper is used in combination with |
| @@ -741,7 +741,7 @@ union bpf_attr { | |||
| 741 | * efficient, but it is handled through an action code where the | 741 | * efficient, but it is handled through an action code where the |
| 742 | * redirection happens only after the eBPF program has returned. | 742 | * redirection happens only after the eBPF program has returned. |
| 743 | * | 743 | * |
| 744 | * A call to this helper is susceptible to change the underlaying | 744 | * A call to this helper is susceptible to change the underlying |
| 745 | * packet buffer. Therefore, at load time, all checks on pointers | 745 | * packet buffer. Therefore, at load time, all checks on pointers |
| 746 | * previously done by the verifier are invalidated and must be | 746 | * previously done by the verifier are invalidated and must be |
| 747 | * performed again, if the helper is used in combination with | 747 | * performed again, if the helper is used in combination with |
| @@ -806,7 +806,7 @@ union bpf_attr { | |||
| 806 | * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to | 806 | * **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to |
| 807 | * be **ETH_P_8021Q**. | 807 | * be **ETH_P_8021Q**. |
| 808 | * | 808 | * |
| 809 | * A call to this helper is susceptible to change the underlaying | 809 | * A call to this helper is susceptible to change the underlying |
| 810 | * packet buffer. Therefore, at load time, all checks on pointers | 810 | * packet buffer. Therefore, at load time, all checks on pointers |
| 811 | * previously done by the verifier are invalidated and must be | 811 | * previously done by the verifier are invalidated and must be |
| 812 | * performed again, if the helper is used in combination with | 812 | * performed again, if the helper is used in combination with |
| @@ -818,7 +818,7 @@ union bpf_attr { | |||
| 818 | * Description | 818 | * Description |
| 819 | * Pop a VLAN header from the packet associated to *skb*. | 819 | * Pop a VLAN header from the packet associated to *skb*. |
| 820 | * | 820 | * |
| 821 | * A call to this helper is susceptible to change the underlaying | 821 | * A call to this helper is susceptible to change the underlying |
| 822 | * packet buffer. Therefore, at load time, all checks on pointers | 822 | * packet buffer. Therefore, at load time, all checks on pointers |
| 823 | * previously done by the verifier are invalidated and must be | 823 | * previously done by the verifier are invalidated and must be |
| 824 | * performed again, if the helper is used in combination with | 824 | * performed again, if the helper is used in combination with |
| @@ -1168,7 +1168,7 @@ union bpf_attr { | |||
| 1168 | * All values for *flags* are reserved for future usage, and must | 1168 | * All values for *flags* are reserved for future usage, and must |
| 1169 | * be left at zero. | 1169 | * be left at zero. |
| 1170 | * | 1170 | * |
| 1171 | * A call to this helper is susceptible to change the underlaying | 1171 | * A call to this helper is susceptible to change the underlying |
| 1172 | * packet buffer. Therefore, at load time, all checks on pointers | 1172 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1173 | * previously done by the verifier are invalidated and must be | 1173 | * previously done by the verifier are invalidated and must be |
| 1174 | * performed again, if the helper is used in combination with | 1174 | * performed again, if the helper is used in combination with |
| @@ -1281,7 +1281,7 @@ union bpf_attr { | |||
| 1281 | * implicitly linearizes, unclones and drops offloads from the | 1281 | * implicitly linearizes, unclones and drops offloads from the |
| 1282 | * *skb*. | 1282 | * *skb*. |
| 1283 | * | 1283 | * |
| 1284 | * A call to this helper is susceptible to change the underlaying | 1284 | * A call to this helper is susceptible to change the underlying |
| 1285 | * packet buffer. Therefore, at load time, all checks on pointers | 1285 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1286 | * previously done by the verifier are invalidated and must be | 1286 | * previously done by the verifier are invalidated and must be |
| 1287 | * performed again, if the helper is used in combination with | 1287 | * performed again, if the helper is used in combination with |
| @@ -1317,7 +1317,7 @@ union bpf_attr { | |||
| 1317 | * **bpf_skb_pull_data()** to effectively unclone the *skb* from | 1317 | * **bpf_skb_pull_data()** to effectively unclone the *skb* from |
| 1318 | * the very beginning in case it is indeed cloned. | 1318 | * the very beginning in case it is indeed cloned. |
| 1319 | * | 1319 | * |
| 1320 | * A call to this helper is susceptible to change the underlaying | 1320 | * A call to this helper is susceptible to change the underlying |
| 1321 | * packet buffer. Therefore, at load time, all checks on pointers | 1321 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1322 | * previously done by the verifier are invalidated and must be | 1322 | * previously done by the verifier are invalidated and must be |
| 1323 | * performed again, if the helper is used in combination with | 1323 | * performed again, if the helper is used in combination with |
| @@ -1369,7 +1369,7 @@ union bpf_attr { | |||
| 1369 | * All values for *flags* are reserved for future usage, and must | 1369 | * All values for *flags* are reserved for future usage, and must |
| 1370 | * be left at zero. | 1370 | * be left at zero. |
| 1371 | * | 1371 | * |
| 1372 | * A call to this helper is susceptible to change the underlaying | 1372 | * A call to this helper is susceptible to change the underlying |
| 1373 | * packet buffer. Therefore, at load time, all checks on pointers | 1373 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1374 | * previously done by the verifier are invalidated and must be | 1374 | * previously done by the verifier are invalidated and must be |
| 1375 | * performed again, if the helper is used in combination with | 1375 | * performed again, if the helper is used in combination with |
| @@ -1384,7 +1384,7 @@ union bpf_attr { | |||
| 1384 | * can be used to prepare the packet for pushing or popping | 1384 | * can be used to prepare the packet for pushing or popping |
| 1385 | * headers. | 1385 | * headers. |
| 1386 | * | 1386 | * |
| 1387 | * A call to this helper is susceptible to change the underlaying | 1387 | * A call to this helper is susceptible to change the underlying |
| 1388 | * packet buffer. Therefore, at load time, all checks on pointers | 1388 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1389 | * previously done by the verifier are invalidated and must be | 1389 | * previously done by the verifier are invalidated and must be |
| 1390 | * performed again, if the helper is used in combination with | 1390 | * performed again, if the helper is used in combination with |
| @@ -1518,20 +1518,20 @@ union bpf_attr { | |||
| 1518 | * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. | 1518 | * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. |
| 1519 | * Adjusting mss in this way is not allowed for datagrams. | 1519 | * Adjusting mss in this way is not allowed for datagrams. |
| 1520 | * | 1520 | * |
| 1521 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 **: | 1521 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**, |
| 1522 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 **: | 1522 | * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**: |
| 1523 | * Any new space is reserved to hold a tunnel header. | 1523 | * Any new space is reserved to hold a tunnel header. |
| 1524 | * Configure skb offsets and other fields accordingly. | 1524 | * Configure skb offsets and other fields accordingly. |
| 1525 | * | 1525 | * |
| 1526 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE **: | 1526 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**, |
| 1527 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP **: | 1527 | * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**: |
| 1528 | * Use with ENCAP_L3 flags to further specify the tunnel type. | 1528 | * Use with ENCAP_L3 flags to further specify the tunnel type. |
| 1529 | * | 1529 | * |
| 1530 | * * **BPF_F_ADJ_ROOM_ENCAP_L2(len) **: | 1530 | * * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*): |
| 1531 | * Use with ENCAP_L3/L4 flags to further specify the tunnel | 1531 | * Use with ENCAP_L3/L4 flags to further specify the tunnel |
| 1532 | * type; **len** is the length of the inner MAC header. | 1532 | * type; *len* is the length of the inner MAC header. |
| 1533 | * | 1533 | * |
| 1534 | * A call to this helper is susceptible to change the underlaying | 1534 | * A call to this helper is susceptible to change the underlying |
| 1535 | * packet buffer. Therefore, at load time, all checks on pointers | 1535 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1536 | * previously done by the verifier are invalidated and must be | 1536 | * previously done by the verifier are invalidated and must be |
| 1537 | * performed again, if the helper is used in combination with | 1537 | * performed again, if the helper is used in combination with |
| @@ -1610,7 +1610,7 @@ union bpf_attr { | |||
| 1610 | * more flexibility as the user is free to store whatever meta | 1610 | * more flexibility as the user is free to store whatever meta |
| 1611 | * data they need. | 1611 | * data they need. |
| 1612 | * | 1612 | * |
| 1613 | * A call to this helper is susceptible to change the underlaying | 1613 | * A call to this helper is susceptible to change the underlying |
| 1614 | * packet buffer. Therefore, at load time, all checks on pointers | 1614 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1615 | * previously done by the verifier are invalidated and must be | 1615 | * previously done by the verifier are invalidated and must be |
| 1616 | * performed again, if the helper is used in combination with | 1616 | * performed again, if the helper is used in combination with |
| @@ -1852,7 +1852,7 @@ union bpf_attr { | |||
| 1852 | * copied if necessary (i.e. if data was not linear and if start | 1852 | * copied if necessary (i.e. if data was not linear and if start |
| 1853 | * and end pointers do not point to the same chunk). | 1853 | * and end pointers do not point to the same chunk). |
| 1854 | * | 1854 | * |
| 1855 | * A call to this helper is susceptible to change the underlaying | 1855 | * A call to this helper is susceptible to change the underlying |
| 1856 | * packet buffer. Therefore, at load time, all checks on pointers | 1856 | * packet buffer. Therefore, at load time, all checks on pointers |
| 1857 | * previously done by the verifier are invalidated and must be | 1857 | * previously done by the verifier are invalidated and must be |
| 1858 | * performed again, if the helper is used in combination with | 1858 | * performed again, if the helper is used in combination with |
| @@ -1886,7 +1886,7 @@ union bpf_attr { | |||
| 1886 | * only | ||
