aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-08-20 12:00:58 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-08-24 14:35:00 -0700
commitc9985d09e18965131958102f4b67fa1e742df335 (patch)
tree7218417c9ec1b4fa86eedf3b0a8d5bd75405b2e0 /include/linux/filter.h
parentbpf: tcp: Add bpf_skops_hdr_opt_len() and bpf_skops_write_hdr_opt() (diff)
downloadlinux-dev-c9985d09e18965131958102f4b67fa1e742df335.tar.xz
linux-dev-c9985d09e18965131958102f4b67fa1e742df335.zip
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/filter.h')
-rw-r--r--include/linux/filter.h4
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