From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Xie, Huawei" <huawei.xie@intel.com>
Subject: Re: [dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned
Date: Mon, 13 Jun 2016 10:06:22 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E3610601DA3@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20160613095146.GP10038@yliu-dev.sh.intel.com>
> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Monday, June 13, 2016 5:52 PM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; Xie, Huawei
> Subject: Re: [dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem
> aligned
>
> 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.
Not a problem from my side. But Huawei seems to have concerns on this fix. You can do that for the other fix firstly.
Thanks,
Jianfeng
>
> --yliu
next prev parent reply other threads:[~2016-06-13 10:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-12 14:29 Jianfeng Tan
2016-06-13 9:21 ` Yuanhan Liu
2016-06-13 9:51 ` Yuanhan Liu
2016-06-13 10:06 ` Tan, Jianfeng [this message]
2016-06-13 10:26 ` Yuanhan Liu
2016-06-13 10:15 ` Tan, Jianfeng
2016-06-14 12:44 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ED26CBA2FAD1BF48A8719AEF02201E3610601DA3@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=huawei.xie@intel.com \
--cc=yuanhan.liu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).