bpf: Fix up bpf_skb_adjust_room helper's skb csum setting
[openwrt/staging/blogic.git] / tools / include / uapi / linux / bpf.h
index b9ed9f14f2a2c12ce1cec672aeacc04820de98e3..3ba2bbbed80c417ffdd136b53133afcf7456386c 100644 (file)
@@ -1635,6 +1635,13 @@ union bpf_attr {
  *             Grow or shrink the room for data in the packet associated to
  *             *skb* by *len_diff*, and according to the selected *mode*.
  *
+ *             By default, the helper will reset any offloaded checksum
+ *             indicator of the skb to CHECKSUM_NONE. This can be avoided
+ *             by the following flag:
+ *
+ *             * **BPF_F_ADJ_ROOM_NO_CSUM_RESET**: Do not reset offloaded
+ *               checksum data of the skb to CHECKSUM_NONE.
+ *
  *             There are two supported modes at this time:
  *
  *             * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
@@ -3433,6 +3440,7 @@ enum {
        BPF_F_ADJ_ROOM_ENCAP_L3_IPV6    = (1ULL << 2),
        BPF_F_ADJ_ROOM_ENCAP_L4_GRE     = (1ULL << 3),
        BPF_F_ADJ_ROOM_ENCAP_L4_UDP     = (1ULL << 4),
+       BPF_F_ADJ_ROOM_NO_CSUM_RESET    = (1ULL << 5),
 };
 
 enum {