[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned
Yuanhan Liu
yuanhan.liu at linux.intel.com
Mon Jun 13 11:21:01 CEST 2016
On Sun, Jun 12, 2016 at 02:29:42PM +0000, Jianfeng Tan wrote:
> Compile DPDK with clang, below line in virtio_rxtx.c could be
> optimized with four "VMOVAPS ymm, m256".
> memset(&rxvq->fake_mbuf, 0, sizeof(rxvq->fake_mbuf));
>
> This instruction requires memory address is 32-byte aligned.
> Or, it leads to segfault.
That looks like a dangerous optimization to me. If that's the case,
doesn't it mean we have to make sure the address is always aligned
properly while calling memset?
--yliu
More information about the dev
mailing list