]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
uapi: bpf add set_ce
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 19 Mar 2019 17:37:55 +0000 (10:37 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 19 Mar 2019 17:37:55 +0000 (10:37 -0700)
New api from upstream.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h

index b7b748f15da107d6a637f0c7ed79d8ca06652cbe..a857878ff28777ca8430eee8d38de1341d92d5a7 100644 (file)
@@ -2359,6 +2359,13 @@ union bpf_attr {
  *     Return
  *             A **struct bpf_tcp_sock** pointer on success, or NULL in
  *             case of failure.
+ *
+ * int bpf_skb_ecn_set_ce(struct sk_buf *skb)
+ *     Description
+ *             Sets ECN of IP header to ce (congestion encountered) if
+ *             current value is ect (ECN capable). Works with IPv6 and IPv4.
+ *     Return
+ *             1 if set, 0 if not set.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -2457,7 +2464,8 @@ union bpf_attr {
        FN(spin_lock),                  \
        FN(spin_unlock),                \
        FN(sk_fullsock),                \
-       FN(tcp_sock),
+       FN(tcp_sock),                   \
+       FN(skb_ecn_set_ce),
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -2813,6 +2821,8 @@ struct bpf_prog_info {
        __u32 jited_line_info_rec_size;
        __u32 nr_prog_tags;
        __aligned_u64 prog_tags;
+       __u64 run_time_ns;
+       __u64 run_cnt;
 } __attribute__((aligned(8)));
 
 struct bpf_map_info {