Lines Matching refs:attr
25 union bpf_attr attr;
29 /* test different attr.prog_name during BPF_PROG_LOAD */
30 ncopy = name_len < sizeof(attr.prog_name) ?
31 name_len : sizeof(attr.prog_name);
32 bzero(&attr, sizeof(attr));
33 attr.prog_type = BPF_PROG_TYPE_SCHED_CLS;
34 attr.insn_cnt = 2;
35 attr.insns = ptr_to_u64(prog);
36 attr.license = ptr_to_u64("");
37 memcpy(attr.prog_name, tests[i].name, ncopy);
39 fd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
50 /* test different attr.map_name during BPF_MAP_CREATE */
51 ncopy = name_len < sizeof(attr.map_name) ?
52 name_len : sizeof(attr.map_name);
53 bzero(&attr, sizeof(attr));
54 attr.map_type = BPF_MAP_TYPE_ARRAY;
55 attr.key_size = 4;
56 attr.value_size = 4;
57 attr.max_entries = 1;
58 attr.map_flags = 0;
59 memcpy(attr.map_name, tests[i].name, ncopy);
60 fd = syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));