From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 05FF53237 for ; Mon, 13 Jun 2016 12:15:31 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 13 Jun 2016 03:15:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,466,1459839600"; d="scan'208";a="974467657" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.193]) ([10.239.67.193]) by orsmga001.jf.intel.com with ESMTP; 13 Jun 2016 03:15:29 -0700 To: Yuanhan Liu References: <1465741782-126976-1-git-send-email-jianfeng.tan@intel.com> <20160613092101.GN10038@yliu-dev.sh.intel.com> Cc: dev@dpdk.org, huawei.xie@intel.com From: "Tan, Jianfeng" Message-ID: Date: Mon, 13 Jun 2016 18:15:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160613092101.GN10038@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 10:15:32 -0000 On 6/13/2016 5:21 PM, 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? I guess clang does such optimization when length is a 32-byte aligned immediate number. May need more information here. Thanks, Jianfeng > > --yliu