Sync include/uapi/linux/bpf.h with tools/ Changes v1->v2: - BPF_F_ADJ_ROOM_MASK moved, no longer in this commit v2->v3: - BPF_F_ADJ_ROOM_ENCAP_L3_MASK moved, no longer in this commit
Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -1478,13 +1478,27 @@ union bpf_attr { · 1477 unmodified lines | |||
| 1478 | * Grow or shrink the room for data in the packet associated to | 1478 | * Grow or shrink the room for data in the packet associated to |
| 1479 | * *skb* by *len_diff*, and according to the selected *mode*. | 1479 | * *skb* by *len_diff*, and according to the selected *mode*. |
| 1480 | * | 1480 | * |
| 1481 | * There is a single supported mode at this time: | 1481 | * There are two supported modes at this time: |
| 1482 | * | ||
| 1483 | * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer | ||
| 1484 | * (room space is added or removed below the layer 2 header). | ||
| 1482 | * | 1485 | * |
| 1483 | * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer | 1486 | * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer |
| 1484 | * (room space is added or removed below the layer 3 header). | 1487 | * (room space is added or removed below the layer 3 header). |
| 1485 | * | 1488 | * |
| 1486 | * All values for *flags* are reserved for future usage, and must | 1489 | * The following flags are supported at this time: |
| 1487 | * be left at zero. | 1490 | * |
| 1491 | * * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size. | ||
| 1492 | * Adjusting mss in this way is not allowed for datagrams. | ||
| 1493 | * | ||
| 1494 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 **: | ||
| 1495 | * * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 **: | ||
| 1496 | * Any new space is reserved to hold a tunnel header. | ||
| 1497 | * Configure skb offsets and other fields accordingly. | ||
| 1498 | * | ||
| 1499 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE **: | ||
| 1500 | * * **BPF_F_ADJ_ROOM_ENCAP_L4_UDP **: | ||
| 1501 | * Use with ENCAP_L3 flags to further specify the tunnel type. | ||
| 1488 | * | 1502 | * |
| 1489 | * A call to this helper is susceptible to change the underlaying | 1503 | * A call to this helper is susceptible to change the underlaying |
| 1490 | * packet buffer. Therefore, at load time, all checks on pointers | 1504 | * packet buffer. Therefore, at load time, all checks on pointers |
| @@ -2624,9 +2638,18 @@ enum bpf_func_id { · 1133 unmodified lines | |||
| 2624 | /* Current network namespace */ | 2638 | /* Current network namespace */ |
| 2625 | #define BPF_F_CURRENT_NETNS (-1L) | 2639 | #define BPF_F_CURRENT_NETNS (-1L) |
| 2626 | 2640 | ||
| 2641 | /* BPF_FUNC_skb_adjust_room flags. */ | ||
| 2642 | #define BPF_F_ADJ_ROOM_FIXED_GSO (1ULL << 0) | ||
| 2643 | |||
| 2644 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 (1ULL << 1) | ||
| 2645 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 (1ULL << 2) | ||
| 2646 | #define BPF_F_ADJ_ROOM_ENCAP_L4_GRE (1ULL << 3) | ||
| 2647 | #define BPF_F_ADJ_ROOM_ENCAP_L4_UDP (1ULL << 4) | ||
| 2648 | |||
| 2627 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ | 2649 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ |
| 2628 | enum bpf_adj_room_mode { | 2650 | enum bpf_adj_room_mode { |
| 2629 | BPF_ADJ_ROOM_NET, | 2651 | BPF_ADJ_ROOM_NET, |
| 2652 | BPF_ADJ_ROOM_MAC, | ||
| 2630 | }; | 2653 | }; |
| 2631 | 2654 | ||
| 2632 | /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */ | 2655 | /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */ |