Lines Matching refs:skb
27 static inline int throttle_flow(struct __sk_buff *skb) in throttle_flow() argument
31 uint64_t delay_ns = ((uint64_t)skb->len) * NS_PER_SEC / in throttle_flow()
39 tstamp = skb->tstamp; in throttle_flow()
56 bpf_skb_ecn_set_ce(skb); in throttle_flow()
60 skb->tstamp = next_tstamp; in throttle_flow()
65 static inline int handle_tcp(struct __sk_buff *skb, struct tcphdr *tcp) in handle_tcp() argument
67 void *data_end = (void *)(long)skb->data_end; in handle_tcp()
74 return throttle_flow(skb); in handle_tcp()
79 static inline int handle_ipv4(struct __sk_buff *skb) in handle_ipv4() argument
81 void *data_end = (void *)(long)skb->data_end; in handle_ipv4()
82 void *data = (void *)(long)skb->data; in handle_ipv4()
97 return handle_tcp(skb, (struct tcphdr *)(((void *)iph) + ihl)); in handle_ipv4()
102 SEC("cls_test") int tc_prog(struct __sk_buff *skb) in tc_prog() argument
104 if (skb->protocol == bpf_htons(ETH_P_IP)) in tc_prog()
105 return handle_ipv4(skb); in tc_prog()