Lines Matching refs:skb4
33 static __init int timings_test(struct sk_buff *skb4, struct iphdr *hdr4, in timings_test() argument
51 if (wg_ratelimiter_allow(skb4, &init_net) != in timings_test()
60 if (!wg_ratelimiter_allow(skb4, &init_net)) in timings_test()
97 static __init int capacity_test(struct sk_buff *skb4, struct iphdr *hdr4, in capacity_test() argument
111 if (wg_ratelimiter_allow(skb4, &init_net) != (i != max_entries)) in capacity_test()
123 struct sk_buff *skb4, *skb6 = NULL; in wg_ratelimiter_selftest() local
147 skb4 = alloc_skb(sizeof(struct iphdr), GFP_KERNEL); in wg_ratelimiter_selftest()
148 if (unlikely(!skb4)) in wg_ratelimiter_selftest()
150 skb4->protocol = htons(ETH_P_IP); in wg_ratelimiter_selftest()
151 hdr4 = (struct iphdr *)skb_put(skb4, sizeof(*hdr4)); in wg_ratelimiter_selftest()
153 skb_reset_network_header(skb4); in wg_ratelimiter_selftest()
159 kfree_skb(skb4); in wg_ratelimiter_selftest()
173 ret = timings_test(skb4, hdr4, skb6, hdr6, &test_count); in wg_ratelimiter_selftest()
192 if (capacity_test(skb4, hdr4, &test_count) < 0) { in wg_ratelimiter_selftest()
206 kfree_skb(skb4); in wg_ratelimiter_selftest()