diff options
author | Jakub Kicinski <[email protected]> | 2022-09-28 18:51:27 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-09-28 18:51:28 -0700 |
commit | 578b054684e6ad46f6089b726c05054fc5e3cd74 (patch) | |
tree | b14a20279c36ca9fac082210cf5419e057075337 /drivers/net/xen-netback/interface.c | |
parent | 929a6cdfaeac9de6a1004eb18999e1439527cfb4 (diff) | |
parent | e7d2b510165fff6bedc9cca88c071ad846850c74 (diff) |
Merge branch 'shrink-struct-ubuf_info'
Pavel Begunkov says:
====================
shrink struct ubuf_info
struct ubuf_info is large but not all fields are needed for all
cases. We have limited space in io_uring for it and large ubuf_info
prevents some struct embedding, even though we use only a subset
of the fields. It's also not very clean trying to use this typeless
extra space.
Shrink struct ubuf_info to only necessary fields used in generic paths,
namely ->callback, ->refcnt and ->flags, which take only 16 bytes. And
make MSG_ZEROCOPY and some other users to embed it into a larger struct
ubuf_info_msgzc mimicking the former ubuf_info.
Note, xen/vhost may also have some cleaning on top by creating
new structs containing ubuf_info but with proper types.
====================
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
-rw-r--r-- | drivers/net/xen-netback/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index fb32ae82d9b0..e579ecd40b74 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -591,8 +591,8 @@ int xenvif_init_queue(struct xenvif_queue *queue) } for (i = 0; i < MAX_PENDING_REQS; i++) { - queue->pending_tx_info[i].callback_struct = (struct ubuf_info) - { .callback = xenvif_zerocopy_callback, + queue->pending_tx_info[i].callback_struct = (struct ubuf_info_msgzc) + { { .callback = xenvif_zerocopy_callback }, { { .ctx = NULL, .desc = i } } }; queue->grant_tx_handle[i] = NETBACK_INVALID_HANDLE; |