Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 231) sorted by relevance

12345678910

/tools/testing/selftests/net/
Dip_defrag.c135 int offset, bool ipv6) in send_fragment() argument
139 int payload_offset = offset > 0 ? offset - UDP_HLEN : 0; in send_fragment()
143 if (offset == 0) { in send_fragment()
159 if (payload_len - payload_offset <= max_frag_len && offset > 0) { in send_fragment()
162 fraghdr->ip6f_offlg = htons(offset); in send_fragment()
165 fraghdr->ip6f_offlg = htons(offset | IP6_MF); in send_fragment()
168 if (offset == 0) in send_fragment()
177 if (payload_len - payload_offset <= max_frag_len && offset > 0) { in send_fragment()
180 iphdr->ip_off = htons(offset / 8); in send_fragment()
183 iphdr->ip_off = htons(offset / 8 | IP4_MF); in send_fragment()
[all …]
/tools/include/asm-generic/bitops/
Dfind.h24 unsigned long offset) in find_next_bit() argument
29 if (unlikely(offset >= size)) in find_next_bit()
32 val = *addr & GENMASK(size - 1, offset); in find_next_bit()
36 return _find_next_bit(addr, NULL, size, offset, 0UL, 0); in find_next_bit()
54 unsigned long offset) in find_next_and_bit() argument
59 if (unlikely(offset >= size)) in find_next_and_bit()
62 val = *addr1 & *addr2 & GENMASK(size - 1, offset); in find_next_and_bit()
66 return _find_next_bit(addr1, addr2, size, offset, 0UL, 0); in find_next_and_bit()
82 unsigned long offset) in find_next_zero_bit() argument
87 if (unlikely(offset >= size)) in find_next_zero_bit()
[all …]
/tools/power/acpi/os_specific/service_layers/
Dosunixmap.c66 acpi_physical_address offset; in acpi_os_map_memory() local
79 offset = where % page_size; in acpi_os_map_memory()
83 mapped_memory = mmap(NULL, (length + offset), PROT_READ, MMAP_FLAGS, in acpi_os_map_memory()
84 fd, (where - offset)); in acpi_os_map_memory()
92 return (ACPI_CAST8(mapped_memory + offset)); in acpi_os_map_memory()
111 acpi_physical_address offset; in acpi_os_unmap_memory() local
115 offset = ACPI_TO_INTEGER(where) % page_size; in acpi_os_unmap_memory()
116 munmap((u8 *)where - offset, (length + offset)); in acpi_os_unmap_memory()
/tools/testing/selftests/bpf/progs/
Dtest_xdp_adjust_tail_grow.c11 int offset = 0; in _xdp_adjust_tail_grow() local
17 offset = 4096; /* test too large offset */ in _xdp_adjust_tail_grow()
19 offset = 40; in _xdp_adjust_tail_grow()
21 offset = 128; in _xdp_adjust_tail_grow()
23 offset = 4096 - 256 - 320 - data_len; /* Max tail grow 3520 */ in _xdp_adjust_tail_grow()
28 if (bpf_xdp_adjust_tail(xdp, offset)) in _xdp_adjust_tail_grow()
Dtest_xdp_adjust_tail_shrink.c17 int offset = 0; in _xdp_adjust_tail_shrink() local
20 offset = 256; /* shrink too much */ in _xdp_adjust_tail_shrink()
22 offset = 20; in _xdp_adjust_tail_shrink()
23 if (bpf_xdp_adjust_tail(xdp, 0 - offset)) in _xdp_adjust_tail_shrink()
Dtest_xdp_vlan.c60 __u8 offset; in parse_eth_frame() local
62 offset = sizeof(*eth); in parse_eth_frame()
64 if ((void *)eth + offset + (2*sizeof(struct _vlan_hdr)) > data_end) in parse_eth_frame()
74 vlan_hdr = (void *)eth + offset; in parse_eth_frame()
75 pkt->vlan_outer_offset = offset; in parse_eth_frame()
79 offset += sizeof(*vlan_hdr); in parse_eth_frame()
87 vlan_hdr = (void *)eth + offset; in parse_eth_frame()
88 pkt->vlan_inner_offset = offset; in parse_eth_frame()
92 offset += sizeof(*vlan_hdr); in parse_eth_frame()
96 pkt->l3_offset = offset; in parse_eth_frame()
/tools/objtool/include/objtool/
Delf.h54 unsigned long offset; member
75 unsigned long offset; member
116 static inline u32 sec_offset_hash(struct section *sec, unsigned long offset) in sec_offset_hash() argument
120 offset &= OFFSET_STRIDE_MASK; in sec_offset_hash()
122 ol = offset; in sec_offset_hash()
123 oh = (offset >> 16) >> 16; in sec_offset_hash()
132 return sec_offset_hash(reloc->sec, reloc->offset); in reloc_hash()
138 int elf_add_reloc(struct elf *elf, struct section *sec, unsigned long offset,
141 unsigned long offset, unsigned int type,
145 unsigned long offset, unsigned int len,
[all …]
Dwarn.h18 static inline char *offstr(struct section *sec, unsigned long offset) in offstr() argument
24 func = find_func_containing(sec, offset); in offstr()
27 name_off = offset - func->offset; in offstr()
30 name_off = offset; in offstr()
48 #define WARN_FUNC(format, sec, offset, ...) \ argument
50 char *_str = offstr(sec, offset); \
58 char *_str = offstr(_insn->sec, _insn->offset); \
/tools/perf/ui/browsers/
Dheader.c19 unsigned long offset = (unsigned long)browser->priv; in ui_browser__argv_write() local
21 if (offset >= strlen(str)) in ui_browser__argv_write()
24 str = str + offset; in ui_browser__argv_write()
35 unsigned long offset; in list_menu__run() local
51 offset = (unsigned long)menu->priv; in list_menu__run()
52 offset += 10; in list_menu__run()
53 menu->priv = (void *)offset; in list_menu__run()
56 offset = (unsigned long)menu->priv; in list_menu__run()
57 if (offset >= 10) in list_menu__run()
58 offset -= 10; in list_menu__run()
[all …]
/tools/testing/selftests/powerpc/stringloops/
Dmemcmp.c40 unsigned long offset, size; in test_one() local
42 for (offset = 0; offset < max_offset; offset++) { in test_one()
43 for (size = size_start; size < (max_size - offset); size++) { in test_one()
47 y = memcmp(s1+offset, s2+offset, size); in test_one()
48 x = test_memcmp(s1+offset, s2+offset, size); in test_one()
52 … printf("memcmp returned %d, should have returned %d (offset %ld size %ld)\n", x, y, offset, size); in test_one()
54 for (i = offset; i < offset+size; i++) in test_one()
58 for (i = offset; i < offset+size; i++) in test_one()
66 offset, size, s1, s2, vmx_count); in test_one()
Dstrlen.c17 unsigned long offset; in test_one() local
19 for (offset = 0; offset < SIZE; offset++) { in test_one()
23 y = strlen(s + offset); in test_one()
24 x = test_strlen(s + offset); in test_one()
27 printf("strlen() returned %d, should have returned %d (%p offset %ld)\n", x, y, s, offset); in test_one()
29 for (i = offset; i < SIZE; i++) in test_one()
/tools/testing/selftests/timens/
Dtimens.c35 time_t offset; member
90 static int test_gettime(clockid_t clock_index, bool raw_syscall, time_t offset) in test_gettime() argument
113 child_ts_new.tv_sec = parent_ts_old.tv_sec + offset; in test_gettime()
153 time_t offset; in main() local
169 offset = TEN_DAYS_IN_SEC + i * 1000; in main()
170 clocks[i].offset = offset; in main()
171 if (_settime(clocks[i].id, offset)) in main()
177 offset = clocks[clocks[i].off_id].offset; in main()
179 offset = clocks[i].offset; in main()
180 ret |= test_gettime(i, true, offset); in main()
[all …]
/tools/objtool/
Dcheck.c38 struct section *sec, unsigned long offset) in find_insn() argument
42 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { in find_insn()
43 if (insn->sec == sec && insn->offset == offset) in find_insn()
78 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func()
93 for (insn = find_insn(file, func->sec, func->offset); \
98 for (insn = find_insn(file, sym->sec, sym->offset); \
101 insn->offset < sym->offset + sym->len; \
107 insn->sec == sym->sec && insn->offset >= sym->offset; \
201 insn = find_insn(file, func->sec, func->offset); in __dead_end_function()
357 unsigned long offset; in decode_instructions() local
[all …]
Dspecial.c65 *off = reloc->sym->offset + reloc->addend; in reloc_to_sec_off()
73 unsigned long offset; in get_alt_entry() local
75 offset = idx * entry->size; in get_alt_entry()
81 alt->orig_len = *(unsigned char *)(sec->data->d_buf + offset + in get_alt_entry()
83 alt->new_len = *(unsigned char *)(sec->data->d_buf + offset + in get_alt_entry()
91 offset + in get_alt_entry()
96 orig_reloc = find_reloc_by_dest(elf, sec, offset + entry->orig); in get_alt_entry()
98 WARN_FUNC("can't find orig reloc", sec, offset + entry->orig); in get_alt_entry()
105 new_reloc = find_reloc_by_dest(elf, sec, offset + entry->new); in get_alt_entry()
108 sec, offset + entry->new); in get_alt_entry()
[all …]
/tools/testing/nvdimm/
Dpmem-dax.c13 resource_size_t offset = PFN_PHYS(pgoff) + pmem->data_offset; in __pmem_direct_access() local
23 if (get_nfit_res(pmem->phys_addr + offset)) { in __pmem_direct_access()
27 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access()
28 page = vmalloc_to_page(pmem->virt_addr + offset); in __pmem_direct_access()
38 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access()
40 *pfn = phys_to_pfn_t(pmem->phys_addr + offset, pmem->pfn_flags); in __pmem_direct_access()
48 return PHYS_PFN(pmem->size - pmem->pfn_pad - offset); in __pmem_direct_access()
/tools/testing/selftests/sparc64/drivers/
Dadi-test.c209 int buf_sz, unsigned long offset) in pread_adi() argument
215 cur_offset = offset; in pread_adi()
233 bytes_read, offset); in pread_adi()
235 DEBUG_PRINT_L4("\t\t0x%lx\t%d\n", offset + i, buf[i]); in pread_adi()
264 int buf_sz, unsigned long offset) in pwrite_adi() argument
270 cur_offset = offset; in pwrite_adi()
292 bytes_written, buf_sz, offset); in pwrite_adi()
297 static off_t seek_adi(int fd, off_t offset, int whence) in seek_adi() argument
303 ret = lseek(fd, offset, whence); in seek_adi()
323 loff_t offset; in test0_prpw_aligned_1byte() local
[all …]
/tools/perf/util/
Ds390-sample-raw.c48 size_t len = sample->raw_size, offset = 0; in s390_cpumcfdg_testctr() local
55 while (offset < len) { in s390_cpumcfdg_testctr()
56 cep = (struct cf_ctrset_entry *)(buf + offset); in s390_cpumcfdg_testctr()
62 if (!ctrset_valid(&ce) || offset + ctrset_size(&ce) > len) { in s390_cpumcfdg_testctr()
72 if (len - offset - sizeof(*te) == 4) in s390_cpumcfdg_testctr()
74 pr_err("Invalid counter set entry at %zd\n", offset); in s390_cpumcfdg_testctr()
77 offset += ctrset_size(&ce); in s390_cpumcfdg_testctr()
83 static void s390_cpumcfdg_dumptrail(const char *color, size_t offset, in s390_cpumcfdg_dumptrail() argument
103 offset, te.clock_base ? 'T' : ' ', in s390_cpumcfdg_dumptrail()
158 size_t i, len = sample->raw_size, offset = 0; in s390_cpumcfdg_dump() local
[all …]
Dtrace-event-parse.c16 int *offset, int *size, const char *type) in get_common_field() argument
31 *offset = field->offset; in get_common_field()
35 return tep_read_number(pevent, context->event_data + *offset, *size); in get_common_field()
40 static int offset; in common_lock_depth() local
44 ret = get_common_field(context, &size, &offset, in common_lock_depth()
54 static int offset; in common_flags() local
58 ret = get_common_field(context, &size, &offset, in common_flags()
68 static int offset; in common_pc() local
72 ret = get_common_field(context, &size, &offset, in common_pc()
/tools/perf/arch/x86/util/
Ddwarf-regs.c39 int offset; member
42 #define REG_OFFSET_END {.name = NULL, .offset = 0}
45 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
46 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1}
48 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1}
49 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
113 return roff->offset; in regs_query_register_offset()
/tools/io_uring/
Dio_uring-cp.c29 off_t first_offset, offset; member
77 io_uring_prep_readv(sqe, infd, &data->iov, 1, data->offset); in queue_prepped()
79 io_uring_prep_writev(sqe, outfd, &data->iov, 1, data->offset); in queue_prepped()
84 static int queue_read(struct io_uring *ring, off_t size, off_t offset) in queue_read() argument
100 data->offset = data->first_offset = offset; in queue_read()
106 io_uring_prep_readv(sqe, infd, &data->iov, 1, offset); in queue_read()
114 data->offset = data->first_offset; in queue_write()
127 off_t write_left, offset; in copy_file() local
131 writes = reads = offset = 0; in copy_file()
150 if (queue_read(ring, this_size, offset)) in copy_file()
[all …]
Dliburing.h110 off_t offset) in io_uring_prep_rw() argument
115 sqe->off = offset; in io_uring_prep_rw()
122 unsigned nr_vecs, off_t offset) in io_uring_prep_readv() argument
124 io_uring_prep_rw(IORING_OP_READV, sqe, fd, iovecs, nr_vecs, offset); in io_uring_prep_readv()
129 off_t offset) in io_uring_prep_read_fixed() argument
131 io_uring_prep_rw(IORING_OP_READ_FIXED, sqe, fd, buf, nbytes, offset); in io_uring_prep_read_fixed()
136 unsigned nr_vecs, off_t offset) in io_uring_prep_writev() argument
138 io_uring_prep_rw(IORING_OP_WRITEV, sqe, fd, iovecs, nr_vecs, offset); in io_uring_prep_writev()
143 off_t offset) in io_uring_prep_write_fixed() argument
145 io_uring_prep_rw(IORING_OP_WRITE_FIXED, sqe, fd, buf, nbytes, offset); in io_uring_prep_write_fixed()
/tools/bpf/bpftool/Documentation/
Dbpftool-perf.rst34 The attachment point for k[ret]probe is either symbol name and offset,
36 The attachment point for u[ret]probe is the file name and the file offset.
52 pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
53 pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
55 pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
62 [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
63 … {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
65 {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
/tools/testing/nvdimm/test/
Diomap.c65 static void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size, in __nfit_test_ioremap() argument
68 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __nfit_test_ioremap()
71 return (void __iomem *) nfit_res->buf + offset in __nfit_test_ioremap()
73 return fallback_fn(offset, size); in __nfit_test_ioremap()
77 resource_size_t offset, unsigned long size) in __wrap_devm_ioremap() argument
79 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __wrap_devm_ioremap()
82 return (void __iomem *) nfit_res->buf + offset in __wrap_devm_ioremap()
84 return devm_ioremap(dev, offset, size); in __wrap_devm_ioremap()
88 void *__wrap_devm_memremap(struct device *dev, resource_size_t offset, in __wrap_devm_memremap() argument
91 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __wrap_devm_memremap()
[all …]
/tools/testing/selftests/memfd/
Dfuse_mnt.c48 off_t offset, in memfd_readdir() argument
78 off_t offset, in memfd_read() argument
89 if (offset < len) { in memfd_read()
90 if (offset + size > len) in memfd_read()
91 size = len - offset; in memfd_read()
93 memcpy(buf, memfd_content + offset, size); in memfd_read()
/tools/testing/selftests/rseq/
Dparam_test.c301 intptr_t offset; member
318 intptr_t offset; member
552 long offset; in this_cpu_list_pop() local
558 offset = offsetof(struct percpu_list_node, next); in this_cpu_list_pop()
561 offset, load, cpu); in this_cpu_list_pop()
696 intptr_t offset; in this_cpu_buffer_push() local
700 offset = RSEQ_READ_ONCE(buffer->c[cpu].offset); in this_cpu_buffer_push()
701 if (offset == buffer->c[cpu].buflen) in this_cpu_buffer_push()
704 targetptr_spec = (intptr_t *)&buffer->c[cpu].array[offset]; in this_cpu_buffer_push()
705 newval_final = offset + 1; in this_cpu_buffer_push()
[all …]

12345678910