]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_ring: document alignment requirements
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Dec 2014 14:03:27 +0000 (16:03 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Dec 2014 08:54:54 +0000 (10:54 +0200)
commite399aa0c5c24c853756e54214336c2e4ec4fdb9e
treed106164f315a92e8894454fdf93226bff5f53d3e
parent0af4fb9a18d9b75e32eaca994d8256a288d43a7f
virtio_ring: document alignment requirements

Host needs to know vring element alignment requirements:
simply doing alignof on structures doesn't work reliably: on some
platforms gcc has alignof(uint32_t) == 2.

Add macros for alignment as specified in virtio 1.0 cs01,
export them to userspace as well.

Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/uapi/linux/virtio_ring.h