ngx_memzero(&attr, sizeof(union bpf_attr));
- attr.license = (uint64_t) program->license;
+ attr.license = (uintptr_t) program->license;
attr.prog_type = program->type;
- attr.insns = (uint64_t) program->ins;
+ attr.insns = (uintptr_t) program->ins;
attr.insn_cnt = program->nins;
#if (NGX_DEBUG)
/* for verifier errors */
- attr.log_buf = (uint64_t) buf;
+ attr.log_buf = (uintptr_t) buf;
attr.log_size = NGX_BPF_LOGBUF_SIZE;
attr.log_level = 1;
#endif
ngx_memzero(&attr, sizeof(union bpf_attr));
attr.map_fd = fd;
- attr.key = (uint64_t) key;
- attr.value = (uint64_t) value;
+ attr.key = (uintptr_t) key;
+ attr.value = (uintptr_t) value;
attr.flags = flags;
return ngx_bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));
ngx_memzero(&attr, sizeof(union bpf_attr));
attr.map_fd = fd;
- attr.key = (uint64_t) key;
+ attr.key = (uintptr_t) key;
return ngx_bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}
ngx_memzero(&attr, sizeof(union bpf_attr));
attr.map_fd = fd;
- attr.key = (uint64_t) key;
- attr.value = (uint64_t) value;
+ attr.key = (uintptr_t) key;
+ attr.value = (uintptr_t) value;
return ngx_bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));
}