Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 46) sorted by relevance

12

/samples/bpf/
Dparse_varlen.c22 static int tcp(void *data, uint64_t tp_off, void *data_end) in tcp() argument
24 struct tcphdr *tcp = data + tp_off; in tcp()
33 static int udp(void *data, uint64_t tp_off, void *data_end) in udp() argument
35 struct udphdr *udp = data + tp_off; in udp()
51 static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) in parse_ipv4() argument
56 iph = data + nh_off; in parse_ipv4()
65 iph = data + nh_off + ihl_len; in parse_ipv4()
72 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv4()
74 return udp(data, nh_off + ihl_len, data_end); in parse_ipv4()
78 static int parse_ipv6(void *data, uint64_t nh_off, void *data_end) in parse_ipv6() argument
[all …]
Dxdp2_kern.c24 static void swap_src_dst_mac(void *data) in swap_src_dst_mac() argument
26 unsigned short *p = data; in swap_src_dst_mac()
40 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument
42 struct iphdr *iph = data + nh_off; in parse_ipv4()
49 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument
51 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6()
62 void *data = (void *)(long)ctx->data; in xdp_prog1() local
63 struct ethhdr *eth = data; in xdp_prog1()
71 if (data + nh_off > data_end) in xdp_prog1()
80 vhdr = data + nh_off; in xdp_prog1()
[all …]
Dtc_l2_redirect_kern.c62 void *data = (void *)(long)skb->data; in _l2_to_iptun_ingress_forward() local
63 struct eth_hdr *eth = data; in _l2_to_iptun_ingress_forward()
69 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_forward()
78 struct iphdr *iph = data + sizeof(*eth); in _l2_to_iptun_ingress_forward()
80 if (data + sizeof(*eth) + sizeof(*iph) > data_end) in _l2_to_iptun_ingress_forward()
91 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_iptun_ingress_forward()
93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_iptun_ingress_forward()
113 void *data = (void *)(long)skb->data; in _l2_to_iptun_ingress_redirect() local
114 struct eth_hdr *eth = data; in _l2_to_iptun_ingress_redirect()
120 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_redirect()
[all …]
Dxdp1_kern.c24 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument
26 struct iphdr *iph = data + nh_off; in parse_ipv4()
33 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument
35 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6()
46 void *data = (void *)(long)ctx->data; in xdp_prog1() local
47 struct ethhdr *eth = data; in xdp_prog1()
55 if (data + nh_off > data_end) in xdp_prog1()
64 vhdr = data + nh_off; in xdp_prog1()
66 if (data + nh_off > data_end) in xdp_prog1()
74 vhdr = data + nh_off; in xdp_prog1()
[all …]
Dhash_func01.h10 __u32 SuperFastHash (const char *data, int len, __u32 initval) { in SuperFastHash() argument
15 if (len <= 0 || data == NULL) return 0; in SuperFastHash()
23 hash += get16bits (data); in SuperFastHash()
24 tmp = (get16bits (data+2) << 11) ^ hash; in SuperFastHash()
26 data += 2*sizeof (__u16); in SuperFastHash()
32 case 3: hash += get16bits (data); in SuperFastHash()
34 hash ^= ((signed char)data[sizeof (__u16)]) << 18; in SuperFastHash()
37 case 2: hash += get16bits (data); in SuperFastHash()
41 case 1: hash += (signed char)*data; in SuperFastHash()
Dxdp2skb_meta_kern.c35 void *data, *data_end; in _xdp_mark() local
50 data = (void *)(unsigned long)ctx->data; in _xdp_mark()
54 if (meta + 1 > data) in _xdp_mark()
65 void *data = (void *)(unsigned long)ctx->data; in _tc_mark() local
71 if (meta + 1 > data) { in _tc_mark()
Dxdp_adjust_tail_kern.c48 static __always_inline void swap_mac(void *data, struct ethhdr *orig_eth) in swap_mac() argument
52 eth = data; in swap_mac()
76 void *data = (void *)(long)xdp->data; in send_icmp4_too_big() local
79 if (data + (ICMP_TOOBIG_SIZE + headroom) > data_end) in send_icmp4_too_big()
88 orig_eth = data + headroom; in send_icmp4_too_big()
89 swap_mac(data, orig_eth); in send_icmp4_too_big()
91 iph = data + off; in send_icmp4_too_big()
93 icmp_hdr = data + off; in send_icmp4_too_big()
95 orig_iph = data + off; in send_icmp4_too_big()
123 void *data = (void *)(long)xdp->data; in handle_ipv4() local
[all …]
Dxdp_redirect_map.bpf.c41 void *data = (void *)(long)ctx->data; in xdp_redirect_map() local
43 struct ethhdr *eth = data; in xdp_redirect_map()
48 if (data + nh_off > data_end) in xdp_redirect_map()
55 swap_src_dst_mac(data); in xdp_redirect_map()
75 void *data = (void *)(long)ctx->data; in xdp_redirect_map_egress() local
76 struct ethhdr *eth = data; in xdp_redirect_map_egress()
80 if (data + nh_off > data_end) in xdp_redirect_map_egress()
Dparse_simple.c29 void *data = (void *)(long)skb->data; in handle_ingress() local
30 struct eth_hdr *eth = data; in handle_ingress()
31 struct iphdr *iph = data + sizeof(*eth); in handle_ingress()
32 struct udphdr *udp = data + sizeof(*eth) + sizeof(*iph); in handle_ingress()
36 if (data + sizeof(*eth) + sizeof(*iph) + sizeof(*udp) > data_end) in handle_ingress()
Dxdp_redirect_cpu.bpf.c100 void *data = (void *)(long)ctx->data; in get_dest_port_ipv4_udp() local
101 struct iphdr *iph = data + nh_off; in get_dest_port_ipv4_udp()
122 void *data = (void *)(long)ctx->data; in get_proto_ipv4() local
123 struct iphdr *iph = data + nh_off; in get_proto_ipv4()
134 void *data = (void *)(long)ctx->data; in get_proto_ipv6() local
135 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6()
173 void *data = (void *)(long)ctx->data; in xdp_prognum1_touch_data() local
175 struct ethhdr *eth = data; in xdp_prognum1_touch_data()
215 void *data = (void *)(long)ctx->data; in xdp_prognum2_round_robin() local
260 void *data = (void *)(long)ctx->data; in xdp_prognum3_proto_separate() local
[all …]
Dtrace_output_kern.c20 } data; in SYSCALL() local
22 data.pid = bpf_get_current_pid_tgid(); in SYSCALL()
23 data.cookie = 0x12345678; in SYSCALL()
25 bpf_perf_event_output(ctx, &my_map, 0, &data, sizeof(data)); in SYSCALL()
Dxdp_redirect.bpf.c23 void *data = (void *)(long)ctx->data; in xdp_redirect_prog() local
25 struct ethhdr *eth = data; in xdp_redirect_prog()
30 if (data + nh_off > data_end) in xdp_redirect_prog()
38 swap_src_dst_mac(data); in xdp_redirect_prog()
Dxdp_tx_iptunnel_kern.c80 void *data = (void *)(long)xdp->data; in handle_ipv4() local
84 struct iphdr *iph = data + sizeof(struct ethhdr); in handle_ipv4()
115 data = (void *)(long)xdp->data; in handle_ipv4()
118 new_eth = data; in handle_ipv4()
119 iph = data + sizeof(*new_eth); in handle_ipv4()
120 old_eth = data + sizeof(*iph); in handle_ipv4()
155 void *data = (void *)(long)xdp->data; in handle_ipv6() local
159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6()
187 data = (void *)(long)xdp->data; in handle_ipv6()
190 new_eth = data; in handle_ipv6()
[all …]
Dxdp_router_ipv4_kern.c85 static inline void set_src_dst_mac(void *data, void *src, void *dst) in set_src_dst_mac() argument
89 unsigned short *p = data; in set_src_dst_mac()
96 static inline int parse_ipv4(void *data, u64 nh_off, void *data_end, in parse_ipv4() argument
99 struct iphdr *iph = data + nh_off; in parse_ipv4()
113 void *data = (void *)(long)ctx->data; in xdp_router_ipv4_prog() local
116 struct ethhdr *eth = data; in xdp_router_ipv4_prog()
124 if (data + nh_off > data_end) in xdp_router_ipv4_prog()
132 vhdr = data + nh_off; in xdp_router_ipv4_prog()
134 if (data + nh_off > data_end) in xdp_router_ipv4_prog()
144 ipproto = parse_ipv4(data, nh_off, data_end, &src_ip, &dest_ip); in xdp_router_ipv4_prog()
[all …]
Dtest_cgrp2_tc_kern.c44 void *data = (void *)(long)skb->data; in handle_egress() local
45 struct eth_hdr *eth = data; in handle_egress()
46 struct ipv6hdr *ip6h = data + sizeof(*eth); in handle_egress()
53 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in handle_egress()
Dxdp_sample_pkts_kern.c19 void *data = (void *)(long)ctx->data; in xdp_sample_prog() local
27 if (data < data_end) { in xdp_sample_prog()
43 metadata.pkt_len = (u16)(data_end - data); in xdp_sample_prog()
Dxdp_rxq_info_kern.c58 void swap_src_dst_mac(void *data) in swap_src_dst_mac() argument
60 unsigned short *p = data; in swap_src_dst_mac()
78 void *data = (void *)(long)ctx->data; in xdp_prognum0() local
121 struct ethhdr *eth = data; in xdp_prognum0()
134 swap_src_dst_mac(data); in xdp_prognum0()
Dlwt_len_hist_user.c33 uint64_t values[nr_cpus], sum, max_value = 0, data[MAX_INDEX] = {}; in main() local
57 data[next_key] = sum; in main()
68 stars(starstr, data[i - 1], max_value, MAX_STARS); in main()
70 (1l << i) >> 1, (1l << i) - 1, data[i - 1], in main()
Dxdp_redirect_map_multi.bpf.c60 void *data = (void *)(long)ctx->data; in xdp_devmap_prog() local
62 struct ethhdr *eth = data; in xdp_devmap_prog()
67 if (data + nh_off > data_end) in xdp_devmap_prog()
Dxdp_fwd_kern.c46 void *data = (void *)(long)ctx->data; in xdp_fwd_flags() local
48 struct ethhdr *eth = data; in xdp_fwd_flags()
56 if (data + nh_off > data_end) in xdp_fwd_flags()
63 iph = data + nh_off; in xdp_fwd_flags()
83 ip6h = data + nh_off; in xdp_fwd_flags()
/samples/connector/
Ducon.c104 struct cn_msg *data; in main() local
168 data = (struct cn_msg *)buf; in main()
170 data->id.idx = CN_TEST_IDX; in main()
171 data->id.val = CN_TEST_VAL; in main()
172 data->seq = seq++; in main()
173 data->ack = 0; in main()
174 data->len = 0; in main()
178 len = netlink_send(s, data); in main()
181 ulog("%d messages have been sent to %08x.%08x.\n", i, data->id.idx, data->id.val); in main()
222 data = (struct cn_msg *)NLMSG_DATA(reply); in main()
[all …]
Dcn_test.c30 msg->len ? (char *)msg->data : ""); in cn_test_callback()
118 char data[32]; in cn_test_timer_func() local
122 m = kzalloc(sizeof(*m) + sizeof(data), GFP_ATOMIC); in cn_test_timer_func()
127 m->len = sizeof(data); in cn_test_timer_func()
130 scnprintf(data, sizeof(data), "counter = %u", in cn_test_timer_func()
133 memcpy(m + 1, data, m->len); in cn_test_timer_func()
/samples/kprobes/
Dkretprobe_example.c42 struct my_data *data; in entry_handler() local
47 data = (struct my_data *)ri->data; in entry_handler()
48 data->entry_stamp = ktime_get(); in entry_handler()
61 struct my_data *data = (struct my_data *)ri->data; in ret_handler() local
66 delta = ktime_to_ns(ktime_sub(now, data->entry_stamp)); in ret_handler()
/samples/acrn/
Dguest.ld8 .data : { *(.data) }
/samples/uhid/
Duhid-example.c217 if (ev->u.output.data[0] != 0x2) in handle_output()
222 ev->u.output.data[1]); in handle_output()
286 ev.u.input.data[0] = 0x1; in send_event()
288 ev.u.input.data[1] |= 0x1; in send_event()
290 ev.u.input.data[1] |= 0x2; in send_event()
292 ev.u.input.data[1] |= 0x4; in send_event()
294 ev.u.input.data[2] = abs_hor; in send_event()
295 ev.u.input.data[3] = abs_ver; in send_event()
296 ev.u.input.data[4] = wheel; in send_event()

12