diff options
author | David S. Miller <davem@davemloft.net> | 2023-04-19 13:04:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-19 13:04:31 +0100 |
commit | fbb192a836bee873e4e94c5deca19bf558ab7bb9 (patch) | |
tree | 6938e8d57eebc712f9820a5f363e9d4840b284f2 /net/socket.c | |
parent | 4edd97fbdc23e917ef0787dbf0ccc543b400bb34 (diff) | |
parent | 48d80c394d3d1afcb49d26398917f5be27bf44cb (diff) |
Merge branch 'skbuff-bitfields'
Jakub Kicinski says:
====================
net: skbuff: hide some bitfield members
There is a number of protocol or subsystem specific fields
in struct sk_buff which are only accessed by one subsystem.
We can wrap them in ifdefs with minimal code impact.
This gives us a better chance to save a 2B and a 4B holes
resulting with the following savings (assuming a lucky
kernel config):
- /* size: 232, cachelines: 4, members: 28 */
- /* sum members: 227, holes: 1, sum holes: 4 */
- /* sum bitfield members: 8 bits (1 bytes) */
+ /* size: 224, cachelines: 4, members: 28 */
/* forced alignments: 2 */
- /* last cacheline: 40 bytes */
+ /* last cacheline: 32 bytes */
I think that the changes shouldn't be too controversial.
The only one I'm not 100% sure of is the SCTP one,
12 extra LoC for one bit.. But it did fit squarely
in the "this bit has only one user" category.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Simon Horman <horms@kernel.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 73e493da4589..a7b4b37d86df 100644 --- a/net/socket.c +++ b/net/socket.c @@ -957,6 +957,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, } EXPORT_SYMBOL_GPL(__sock_recv_timestamp); +#ifdef CONFIG_WIRELESS void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) { @@ -972,6 +973,7 @@ void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk, put_cmsg(msg, SOL_SOCKET, SCM_WIFI_STATUS, sizeof(ack), &ack); } EXPORT_SYMBOL_GPL(__sock_recv_wifi_status); +#endif static inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) |