| /tools/testing/selftests/bpf/ |
| D | ip_check_defrag_frags.h | 9 static uint8_t frag_0[] = { 16 static uint8_t frag_1[] = { 23 static uint8_t frag_2[] = { 28 static uint8_t frag6_0[] = { 38 static uint8_t frag6_1[] = { 48 static uint8_t frag6_2[] = {
|
| D | test_tag.c | 78 static int hex2bin(uint8_t *dst, const char *src, size_t count) in hex2bin() 91 static void tag_from_fdinfo(int fd_prog, uint8_t *tag, uint32_t len) in tag_from_fdinfo() 114 static void tag_from_alg(int insns, uint8_t *tag, uint32_t len) in tag_from_alg() 144 static void tag_dump(const char *prefix, uint8_t *tag, uint32_t len) in tag_dump() 154 static void tag_exit_report(int insns, int fd_map, uint8_t *ftag, in tag_exit_report() 155 uint8_t *atag, uint32_t len) in tag_exit_report() 171 uint8_t ftag[8], atag[sizeof(ftag)]; in do_test()
|
| D | test_lpm_map.c | 33 uint8_t key[]; 37 const uint8_t *key, 41 const uint8_t *key, in tlpm_add() 81 const uint8_t *key, in tlpm_match() 110 const uint8_t *key, in tlpm_delete() 143 assert(!tlpm_match(list, (uint8_t[]){ 0xff }, 8)); in test_lpm_basic() 145 t1 = list = tlpm_add(list, (uint8_t[]){ 0xff }, 8); in test_lpm_basic() 146 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff }, 8)); in test_lpm_basic() 147 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff, 0xff }, 16)); in test_lpm_basic() 148 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff, 0x00 }, 16)); in test_lpm_basic() [all …]
|
| /tools/usb/usbip/libsrc/ |
| D | vhci_driver.h | 24 uint8_t port; 29 uint8_t busnum; 30 uint8_t devnum; 56 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, 60 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum, 61 uint8_t devnum, uint32_t speed); 63 int usbip_vhci_detach_device(uint8_t port);
|
| D | usbip_common.h | 105 uint8_t bInterfaceClass; 106 uint8_t bInterfaceSubClass; 107 uint8_t bInterfaceProtocol; 108 uint8_t padding; /* alignment */ 123 uint8_t bDeviceClass; 124 uint8_t bDeviceSubClass; 125 uint8_t bDeviceProtocol; 126 uint8_t bConfigurationValue; 127 uint8_t bNumConfigurations; 128 uint8_t bNumInterfaces; [all …]
|
| D | usbip_common.c | 211 READ_ATTR(udev, uint8_t, sdev, bDeviceClass, "%02x\n"); in read_usb_device() 212 READ_ATTR(udev, uint8_t, sdev, bDeviceSubClass, "%02x\n"); in read_usb_device() 213 READ_ATTR(udev, uint8_t, sdev, bDeviceProtocol, "%02x\n"); in read_usb_device() 219 READ_ATTR(udev, uint8_t, sdev, bConfigurationValue, "%02x\n"); in read_usb_device() 220 READ_ATTR(udev, uint8_t, sdev, bNumConfigurations, "%02x\n"); in read_usb_device() 221 READ_ATTR(udev, uint8_t, sdev, bNumInterfaces, "%02x\n"); in read_usb_device() 223 READ_ATTR(udev, uint8_t, sdev, devnum, "%d\n"); in read_usb_device() 261 READ_ATTR(uinf, uint8_t, sif, bInterfaceClass, "%02x\n"); in read_usb_interface() 262 READ_ATTR(uinf, uint8_t, sif, bInterfaceSubClass, "%02x\n"); in read_usb_interface() 263 READ_ATTR(uinf, uint8_t, sif, bInterfaceProtocol, "%02x\n"); in read_usb_interface() [all …]
|
| /tools/include/tools/ |
| D | le_byteshift.h | 7 static inline uint16_t __get_unaligned_le16(const uint8_t *p) in __get_unaligned_le16() 12 static inline uint32_t __get_unaligned_le32(const uint8_t *p) in __get_unaligned_le32() 17 static inline uint64_t __get_unaligned_le64(const uint8_t *p) in __get_unaligned_le64() 23 static inline void __put_unaligned_le16(uint16_t val, uint8_t *p) in __put_unaligned_le16() 29 static inline void __put_unaligned_le32(uint32_t val, uint8_t *p) in __put_unaligned_le32() 35 static inline void __put_unaligned_le64(uint64_t val, uint8_t *p) in __put_unaligned_le64() 43 return __get_unaligned_le16((const uint8_t *)p); in get_unaligned_le16() 48 return __get_unaligned_le32((const uint8_t *)p); in get_unaligned_le32() 53 return __get_unaligned_le64((const uint8_t *)p); in get_unaligned_le64()
|
| D | be_byteshift.h | 7 static inline uint16_t __get_unaligned_be16(const uint8_t *p) in __get_unaligned_be16() 12 static inline uint32_t __get_unaligned_be32(const uint8_t *p) in __get_unaligned_be32() 17 static inline uint64_t __get_unaligned_be64(const uint8_t *p) in __get_unaligned_be64() 23 static inline void __put_unaligned_be16(uint16_t val, uint8_t *p) in __put_unaligned_be16() 29 static inline void __put_unaligned_be32(uint32_t val, uint8_t *p) in __put_unaligned_be32() 35 static inline void __put_unaligned_be64(uint64_t val, uint8_t *p) in __put_unaligned_be64() 43 return __get_unaligned_be16((const uint8_t *)p); in get_unaligned_be16() 48 return __get_unaligned_be32((const uint8_t *)p); in get_unaligned_be32() 53 return __get_unaligned_be64((const uint8_t *)p); in get_unaligned_be64()
|
| /tools/testing/selftests/bpf/progs/ |
| D | test_cls_redirect.h | 31 uint8_t hlen : 5, control : 1, variant : 2; 33 uint8_t variant : 2, control : 1, hlen : 5; 35 uint8_t proto_ctype; 41 uint8_t _r : 2, last_hop_gre : 1, forward_syn : 1, version : 4; 43 uint8_t version : 4, forward_syn : 1, last_hop_gre : 1, _r : 2; 45 uint8_t reserved; 46 uint8_t next_hop; 47 uint8_t hop_count;
|
| D | verifier_bitfield_write.c | 13 uint8_t ub1: 1; 14 uint8_t ub2: 2; 46 uint8_t ub2; in multiple_field_roundtrip() 56 return (((uint8_t)sb4) << 2) | ub2; in multiple_field_roundtrip() 67 uint8_t ub1, ub2; in adjacent_field_roundtrip() 88 uint8_t ub1; in multibyte_field_roundtrip()
|
| /tools/testing/selftests/kvm/x86_64/ |
| D | pmu_counters_test.c | 33 static uint8_t kvm_pmu_version; 38 uint8_t pmu_version, in pmu_vm_create_with_one_vcpu() 80 static uint8_t guest_get_pmu_version(void) in guest_get_pmu_version() 89 return min_t(uint8_t, kvm_pmu_version, this_cpu_property(X86_PROPERTY_PMU_VERSION)); in guest_get_pmu_version() 101 static void guest_assert_event_count(uint8_t idx, in guest_assert_event_count() 189 static void __guest_test_arch_event(uint8_t idx, struct kvm_x86_pmu_feature event, in __guest_test_arch_event() 211 static void guest_test_arch_event(uint8_t idx) in guest_test_arch_event() 288 uint8_t i; in guest_test_arch_events() 296 static void test_arch_events(uint8_t pmu_version, uint64_t perf_capabilities, in test_arch_events() 297 uint8_t length, uint8_t unavailable_mask) in test_arch_events() [all …]
|
| D | fix_hypercall_test.c | 29 static const uint8_t vmx_vmcall[HYPERCALL_INSN_SIZE] = { 0x0f, 0x01, 0xc1 }; 30 static const uint8_t svm_vmmcall[HYPERCALL_INSN_SIZE] = { 0x0f, 0x01, 0xd9 }; 32 extern uint8_t hypercall_insn[HYPERCALL_INSN_SIZE]; 33 static uint64_t do_sched_yield(uint8_t apic_id) in do_sched_yield() 48 const uint8_t *native_hypercall_insn; in guest_main() 49 const uint8_t *other_hypercall_insn; in guest_main()
|
| D | private_mem_conversions_test.c | 32 uint8_t *mem = (uint8_t *)gpa; \ 41 static void memcmp_h(uint8_t *mem, uint64_t gpa, uint8_t pattern, size_t size) in memcmp_h() 74 uint8_t current_pattern, uint8_t new_pattern) in guest_sync_shared() 79 static void guest_sync_private(uint64_t gpa, uint64_t size, uint8_t pattern) in guest_sync_private() 124 const uint8_t def_p = 0xaa; in guest_test_explicit_conversion() 125 const uint8_t init_p = 0xcc; in guest_test_explicit_conversion() 139 uint8_t p1 = 0x11; in guest_test_explicit_conversion() 140 uint8_t p2 = 0x22; in guest_test_explicit_conversion() 141 uint8_t p3 = 0x33; in guest_test_explicit_conversion() 142 uint8_t p4 = 0x44; in guest_test_explicit_conversion() [all …]
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| D | aolib.h | 280 union tcp_addr addr, uint8_t prefix); 285 uint8_t vrf); 355 uint8_t prefix, int vrf, const char *password); 357 uint8_t prefix, int vrf, const char *password) in test_set_md5() 371 uint8_t prefix, uint8_t vrf, 372 uint8_t sndid, uint8_t rcvid, uint8_t maclen, 373 uint8_t keyflags, uint8_t keylen, const char *key); 378 uint8_t prefix, uint8_t vrf, in test_prepare_key() 379 uint8_t sndid, uint8_t rcvid, uint8_t maclen, in test_prepare_key() 380 uint8_t keyflags, uint8_t keylen, const char *key) in test_prepare_key() [all …]
|
| /tools/testing/selftests/net/tcp_ao/ |
| D | unsigned-md5.c | 14 static const uint8_t test_vrf_tabid = 42; 37 union tcp_addr *md5_addr, uint8_t md5_prefix, in try_accept() 38 union tcp_addr *ao_addr, uint8_t ao_prefix, in try_accept() 40 uint8_t sndid, uint8_t rcvid, uint8_t vrf, in try_accept() 257 union tcp_addr *md5_addr, uint8_t md5_prefix, in try_connect() 258 union tcp_addr *ao_addr, uint8_t ao_prefix, in try_connect() 259 uint8_t sndid, uint8_t rcvid, uint8_t vrf, in try_connect() 319 static int try_add_key_vrf(int sk, union tcp_addr in_addr, uint8_t prefix, in try_add_key_vrf() 320 int vrf, uint8_t sndid, uint8_t rcvid, in try_add_key_vrf() 323 uint8_t keyflags = 0; in try_add_key_vrf() [all …]
|
| D | key-management.c | 15 static const uint8_t test_vrf_tabid = 42; 38 static int prepare_sk(union tcp_addr *addr, uint8_t sndid, uint8_t rcvid) in prepare_sk() 56 static int prepare_lsk(union tcp_addr *addr, uint8_t sndid, uint8_t rcvid) in prepare_lsk() 66 static int test_del_key(int sk, uint8_t sndid, uint8_t rcvid, bool async, in test_del_key() 82 del.current_key = (uint8_t)current_key; in test_del_key() 86 del.rnext = (uint8_t)rnext_key; in test_del_key() 107 if (current_key >= 0 && ao_info.current_key != (uint8_t)current_key) in test_del_key() 109 if (rnext_key >= 0 && ao_info.rnext != (uint8_t)rnext_key) in test_del_key() 114 static void try_delete_key(char *tst_name, int sk, uint8_t sndid, uint8_t rcvid, in try_delete_key() 149 ao_info.current_key = (uint8_t)current_keyid; in test_set_key() [all …]
|
| D | connect-deny.c | 8 static inline int test_add_key_maclen(int sk, const char *key, uint8_t maclen, in test_add_key_maclen() 9 union tcp_addr in_addr, uint8_t prefix, in test_add_key_maclen() 10 uint8_t sndid, uint8_t rcvid) in test_add_key_maclen() 32 union tcp_addr addr, uint8_t prefix, in try_accept() 33 uint8_t sndid, uint8_t rcvid, uint8_t maclen, in try_accept() 162 const char *pwd, union tcp_addr addr, uint8_t prefix, in try_connect() 163 uint8_t sndid, uint8_t rcvid, in try_connect()
|
| /tools/firmware/ |
| D | ihex2fw.c | 32 uint8_t data[]; 38 static uint8_t nybble(const uint8_t n) in nybble() 46 static uint8_t hex(const uint8_t *data, uint8_t *crc) in hex() 48 uint8_t val = (nybble(data[0]) << 4) | nybble(data[1]); in hex() 53 static int process_ihex(uint8_t *data, ssize_t size); 76 uint8_t *data; in main() 132 static int process_ihex(uint8_t *data, ssize_t size) in process_ihex() 138 uint8_t type, crc = 0, crcbyte = 0; in process_ihex()
|
| /tools/testing/selftests/net/ |
| D | tap.c | 37 (struct rtattr *)((uint8_t *)nh + RTA_ALIGN(nh->nlmsg_len)); in rtattr_add() 51 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end() 53 attr->rta_len = end - (uint8_t *)attr; in rtattr_end() 221 size_t build_eth(uint8_t *buf, uint16_t proto) in build_eth() 232 static uint32_t add_csum(const uint8_t *buf, int len) in add_csum() 243 sum += *(uint8_t *)sbuf; in add_csum() 257 static uint16_t build_ip_csum(const uint8_t *buf, int len, in build_ip_csum() 264 static int build_ipv4_header(uint8_t *buf, int payload_len) in build_ipv4_header() 282 static int build_udp_packet(uint8_t *buf, int payload_len, bool csum_off) in build_udp_packet() 306 size_t build_test_packet_valid_udp_gso(uint8_t *buf, size_t payload_len) in build_test_packet_valid_udp_gso() [all …]
|
| /tools/testing/selftests/sgx/ |
| D | sigstruct.c | 45 static bool alloc_q1q2_ctx(const uint8_t *s, const uint8_t *m, in alloc_q1q2_ctx() 68 uint8_t temp; in reverse_bytes() 69 uint8_t *ptr = data; in reverse_bytes() 80 static bool calc_q1q2(const uint8_t *s, const uint8_t *m, uint8_t *q1, in calc_q1q2() 81 uint8_t *q2) in calc_q1q2() 196 static bool mrenclave_commit(EVP_MD_CTX *ctx, uint8_t *mrenclave) in mrenclave_commit() 217 uint8_t reserved[44]; 244 uint8_t reserved[40]; 262 uint8_t reserved[48]; 266 const uint8_t *data) in mrenclave_eextend() [all …]
|
| /tools/spi/ |
| D | spidev_test.c | 40 static uint8_t bits = 8; 50 static uint8_t default_tx[] = { 59 static uint8_t default_rx[ARRAY_SIZE(default_tx)] = {0, }; 118 static void transfer(int fd, uint8_t const *tx, uint8_t const *rx, size_t len) in transfer() 336 uint8_t *tx; in transfer_escaped_string() 337 uint8_t *rx; in transfer_escaped_string() 358 uint8_t *tx; in transfer_file() 359 uint8_t *rx; in transfer_file() 405 uint8_t *tx; in transfer_buf() 406 uint8_t *rx; in transfer_buf()
|
| /tools/testing/selftests/kvm/aarch64/ |
| D | debug-exceptions.c | 105 uint8_t brps, wrps, i; in GEN_DEBUG_WRITE_REG() 152 static void install_wp(uint8_t wpn, uint64_t addr) in install_wp() 165 static void install_hw_bp(uint8_t bpn, uint64_t addr) in install_hw_bp() 177 static void install_wp_ctx(uint8_t addr_wp, uint8_t ctx_bp, uint64_t addr, in install_wp_ctx() 199 void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, in install_hw_bp_ctx() 237 static void guest_code(uint8_t bpn, uint8_t wpn, uint8_t ctx_bpn) in guest_code() 424 static void test_guest_debug_exceptions(uint8_t bpn, uint8_t wpn, uint8_t ctx_bpn) in test_guest_debug_exceptions() 538 uint8_t brp_num, wrp_num, ctx_brp_num, normal_brp_num, ctx_brp_base; in test_guest_debug_exceptions_all()
|
| /tools/testing/selftests/kvm/s390x/ |
| D | tprot.c | 17 static __aligned(PAGE_SIZE) uint8_t pages[2][PAGE_SIZE]; 18 static uint8_t *const page_store_prot = pages[0]; 19 static uint8_t *const page_fetch_prot = pages[1]; 22 static int set_storage_key(void *addr, uint8_t key) in set_storage_key() 47 static enum permission test_protection(void *addr, uint8_t key) in test_protection() 75 uint8_t key;
|
| /tools/power/acpi/tools/ec/ |
| D | ec_access.c | 33 static uint8_t write_value = -1; 143 printf(" %.2x ", (uint8_t)buf[byte_off]); in dump_ec() 168 printf(" %.2x ", (uint8_t)buf2[byte_off]); in dump_ec() 170 printf("*%.2x ", (uint8_t)buf2[byte_off]); in dump_ec() 177 uint8_t buf; in read_ec_val() 192 void write_ec_val(int fd, int byte_offset, uint8_t value) in write_ec_val()
|
| /tools/testing/selftests/arm64/abi/ |
| D | syscall-abi.c | 141 static uint8_t z_zero[__SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 142 uint8_t z_in[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 143 uint8_t z_out[SVE_NUM_ZREGS * __SVE_ZREG_SIZE(ARCH_SVE_VQ_MAX)]; 163 uint8_t *in = &z_in[reg_size * i]; in check_z() 164 uint8_t *out = &z_out[reg_size * i]; in check_z() 201 uint8_t p_in[SVE_NUM_PREGS * __SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 202 uint8_t p_out[SVE_NUM_PREGS * __SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 233 uint8_t ffr_in[__SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 234 uint8_t ffr_out[__SVE_PREG_SIZE(ARCH_SVE_VQ_MAX)]; 311 uint8_t za_in[ZA_SIG_REGS_SIZE(ARCH_SVE_VQ_MAX)]; [all …]
|