diff options
Diffstat (limited to 'samples/mic/mpssd/mpssd.c')
-rw-r--r-- | samples/mic/mpssd/mpssd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/mic/mpssd/mpssd.c b/samples/mic/mpssd/mpssd.c index 51d03545869e..c03a05d498f0 100644 --- a/samples/mic/mpssd/mpssd.c +++ b/samples/mic/mpssd/mpssd.c @@ -403,9 +403,9 @@ mic_virtio_copy(struct mic_info *mic, int fd, static inline unsigned _vring_size(unsigned int num, unsigned long align) { - return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num) + return _ALIGN_UP(((sizeof(struct vring_desc) * num + sizeof(__u16) * (3 + num) + align - 1) & ~(align - 1)) - + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num; + + sizeof(__u16) * 3 + sizeof(struct vring_used_elem) * num, 4); } /* |