From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9B3EC475E for ; Mon, 13 Jun 2016 11:49:52 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 13 Jun 2016 02:49:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,466,1459839600"; d="scan'208";a="986288717" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 13 Jun 2016 02:49:48 -0700 Date: Mon, 13 Jun 2016 17:51:46 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, huawei.xie@intel.com Message-ID: <20160613095146.GP10038@yliu-dev.sh.intel.com> References: <1465741782-126976-1-git-send-email-jianfeng.tan@intel.com> <20160613092101.GN10038@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160613092101.GN10038@yliu-dev.sh.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 09:49:53 -0000 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