From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B7596137D for ; Mon, 13 Jun 2016 12:06:31 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 13 Jun 2016 03:06:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,466,1459839600"; d="scan'208";a="120850239" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 13 Jun 2016 03:06:24 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 13 Jun 2016 03:06:24 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 13 Jun 2016 03:06:24 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Mon, 13 Jun 2016 18:06:22 +0800 From: "Tan, Jianfeng" To: Yuanhan Liu CC: "dev@dpdk.org" , "Xie, Huawei" Thread-Topic: [dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned Thread-Index: AQHRxLbkqT+UE1hEbkmbeRyPKf9bC5/mmkOAgAAIlwCAAImCsA== Date: Mon, 13 Jun 2016 10:06:22 +0000 Message-ID: References: <1465741782-126976-1-git-send-email-jianfeng.tan@intel.com> <20160613092101.GN10038@yliu-dev.sh.intel.com> <20160613095146.GP10038@yliu-dev.sh.intel.com> In-Reply-To: <20160613095146.GP10038@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:06:32 -0000 > -----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 >=20 > 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? >=20 > 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 >=20 > --yliu