Commit fc100a7f authored by Helge Deller's avatar Helge Deller Committed by David S. Miller

soreuseport: Fix reuseport_bpf testcase on 32bit architectures

This fixes the following compiler warnings when compiling the
reuseport_bpf testcase on a 32 bit platform:

reuseport_bpf.c: In function ‘attach_ebpf’:
reuseport_bpf.c:114:15: warning: cast from pointer to integer of ifferent size [-Wpointer-to-int-cast]
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a02cc9d3
...@@ -111,9 +111,9 @@ static void attach_ebpf(int fd, uint16_t mod) ...@@ -111,9 +111,9 @@ static void attach_ebpf(int fd, uint16_t mod)
memset(&attr, 0, sizeof(attr)); memset(&attr, 0, sizeof(attr));
attr.prog_type = BPF_PROG_TYPE_SOCKET_FILTER; attr.prog_type = BPF_PROG_TYPE_SOCKET_FILTER;
attr.insn_cnt = ARRAY_SIZE(prog); attr.insn_cnt = ARRAY_SIZE(prog);
attr.insns = (uint64_t)prog; attr.insns = (unsigned long) &prog;
attr.license = (uint64_t)bpf_license; attr.license = (unsigned long) &bpf_license;
attr.log_buf = (uint64_t)bpf_log_buf; attr.log_buf = (unsigned long) &bpf_log_buf;
attr.log_size = sizeof(bpf_log_buf); attr.log_size = sizeof(bpf_log_buf);
attr.log_level = 1; attr.log_level = 1;
attr.kern_version = 0; attr.kern_version = 0;
...@@ -351,8 +351,8 @@ static void test_filter_no_reuseport(const struct test_params p) ...@@ -351,8 +351,8 @@ static void test_filter_no_reuseport(const struct test_params p)
memset(&eprog, 0, sizeof(eprog)); memset(&eprog, 0, sizeof(eprog));
eprog.prog_type = BPF_PROG_TYPE_SOCKET_FILTER; eprog.prog_type = BPF_PROG_TYPE_SOCKET_FILTER;
eprog.insn_cnt = ARRAY_SIZE(ecode); eprog.insn_cnt = ARRAY_SIZE(ecode);
eprog.insns = (uint64_t)ecode; eprog.insns = (unsigned long) &ecode;
eprog.license = (uint64_t)bpf_license; eprog.license = (unsigned long) &bpf_license;
eprog.kern_version = 0; eprog.kern_version = 0;
memset(&cprog, 0, sizeof(cprog)); memset(&cprog, 0, sizeof(cprog));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment