On Mon, Jun 13, 2016 at 05:21:01PM +0800, Yuanhan Liu wrote: > 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?
Above is just a side note. Anyway, I think making sure vq is cache aligned is good here. So, I will apply it. BTW, do you mind if I squash your 2 fixes into Huawei's Rx/Tx split commit? His commit is not pushed to upstream yet, therefore I can still do rebase: I'm thinking it's better to have one working commit other than one broken commit followed with several fixing commits. And of course, I will mention your contribution in the commit log. --yliu