Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vsock/virtio: reorder fields to reduce padding

Reorder struct virtio_vsock fields to place the DMA buffer (event_list)
last. This eliminates the padding from aligning the struct size on
ARCH_DMA_MINALIGN.

Message-ID: <ce44f61af415521e00ab7492aa16d3d19f00bd5e.1769632071.git.mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+9 -9
+9 -9
net/vmw_vsock/virtio_transport.c
··· 55 55 int rx_buf_nr; 56 56 int rx_buf_max_nr; 57 57 58 - /* The following fields are protected by event_lock. 59 - * vqs[VSOCK_VQ_EVENT] must be accessed with event_lock held. 60 - */ 61 - struct mutex event_lock; 62 - bool event_run; 63 - __dma_from_device_group_begin(); 64 - struct virtio_vsock_event event_list[8]; 65 - __dma_from_device_group_end(); 66 - 67 58 u32 guest_cid; 68 59 bool seqpacket_allow; 69 60 ··· 68 77 */ 69 78 struct scatterlist *out_sgs[MAX_SKB_FRAGS + 1]; 70 79 struct scatterlist out_bufs[MAX_SKB_FRAGS + 1]; 80 + 81 + /* The following fields are protected by event_lock. 82 + * vqs[VSOCK_VQ_EVENT] must be accessed with event_lock held. 83 + */ 84 + struct mutex event_lock; 85 + bool event_run; 86 + __dma_from_device_group_begin(); 87 + struct virtio_vsock_event event_list[8]; 88 + __dma_from_device_group_end(); 71 89 }; 72 90 73 91 static u32 virtio_transport_get_local_cid(void)