Skip to content

Commit 3d7bb20

Browse files
Cong WangKernel Patches Daemon
Cong Wang
authored and
Kernel Patches Daemon
committed
skmsg: save some space in struct sk_psock
This patch aims to save some space in struct sk_psock and prepares for the next patch which will add more fields. psock->eval can only have 4 possible values, make it 8-bit is sufficient. psock->redir_ingress is just a boolean, using 1 bit is enough. Signed-off-by: Cong Wang <[email protected]>
1 parent c1b7962 commit 3d7bb20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/skmsg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ struct sk_psock {
8585
struct sock *sk_redir;
8686
u32 apply_bytes;
8787
u32 cork_bytes;
88-
u32 eval;
89-
bool redir_ingress; /* undefined if sk_redir is null */
88+
u8 eval;
89+
u8 redir_ingress : 1; /* undefined if sk_redir is null */
9090
struct sk_msg *cork;
9191
struct sk_psock_progs progs;
9292
#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)

0 commit comments

Comments
 (0)