diff options
author | Martin KaFai Lau <kafai@fb.com> | 2020-08-20 22:00:58 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-08-25 00:35:00 +0300 |
commit | c9985d09e18965131958102f4b67fa1e742df335 (patch) | |
tree | 7218417c9ec1b4fa86eedf3b0a8d5bd75405b2e0 /include/linux | |
parent | 331fca4315efa3bbd258fbdf8209d59d253c0480 (diff) | |
download | linux-c9985d09e18965131958102f4b67fa1e742df335.tar.xz |
bpf: sock_ops: Change some members of sock_ops_kern from u32 to u8
A later patch needs to add a few pointers and a few u8 to
sock_ops_kern. Hence, this patch saves some spaces by moving
some of the existing members from u32 to u8 so that the later
patch can still fit everything in a cacheline.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200820190058.2885640-1-kafai@fb.com
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/filter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 0a355b005bf4..c427dfa5f908 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -1236,13 +1236,13 @@ struct bpf_sock_addr_kern { struct bpf_sock_ops_kern { struct sock *sk; - u32 op; union { u32 args[4]; u32 reply; u32 replylong[4]; }; - u32 is_fullsock; + u8 op; + u8 is_fullsock; u64 temp; /* temp and everything after is not * initialized to 0 before calling * the BPF program. New fields that |