aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorPavel Begunkov <[email protected]>2022-09-23 16:39:04 +0000
committerJakub Kicinski <[email protected]>2022-09-29 01:51:25 +0000
commite7d2b510165fff6bedc9cca88c071ad846850c74 (patch)
treeb14a20279c36ca9fac082210cf5419e057075337 /net/ipv4/ip_output.c
parentvhost/net: use struct ubuf_info_msgzc (diff)
downloadkernel-e7d2b510165fff6bedc9cca88c071ad846850c74.tar.gz
kernel-e7d2b510165fff6bedc9cca88c071ad846850c74.zip
net: shrink struct ubuf_info
We can benefit from a smaller struct ubuf_info, so leave only mandatory fields and let users to decide how they want to extend it. Convert MSG_ZEROCOPY to struct ubuf_info_msgzc and remove duplicated fields. This reduces the size from 48 bytes to just 16. Signed-off-by: Pavel Begunkov <[email protected]> Acked-by: Paolo Abeni <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 8201cd423ff9..1ae83ad629b2 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1043,7 +1043,7 @@ static int __ip_append_data(struct sock *sk,
paged = true;
zc = true;
} else {
- uarg->zerocopy = 0;
+ uarg_to_msgzc(uarg)->zerocopy = 0;
skb_zcopy_set(skb, uarg, &extra_uref);
}
}