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 D66A769A4 for ; Mon, 29 Feb 2016 06:33:52 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 28 Feb 2016 21:33:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,519,1449561600"; d="scan'208";a="754997345" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 28 Feb 2016 21:33:50 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 28 Feb 2016 21:33:48 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 28 Feb 2016 21:33:48 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.18]) with mapi id 14.03.0248.002; Mon, 29 Feb 2016 13:33:46 +0800 From: "Xie, Huawei" To: Yuanhan Liu , Santosh Shukla Thread-Topic: [PATCH v1] virtio: Use cpuflag for vector api Thread-Index: AdFyssI6v8MRPNvrRs6ukFAhU37yyQ== Date: Mon, 29 Feb 2016 05:33:46 +0000 Message-ID: References: <1456476662-23081-1-git-send-email-sshukla@mvista.com> <20160229042721.GJ14300@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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v1] virtio: Use cpuflag for vector api 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, 29 Feb 2016 05:33:53 -0000 On 2/29/2016 12:26 PM, Yuanhan Liu wrote:=0A= > On Fri, Feb 26, 2016 at 02:21:02PM +0530, Santosh Shukla wrote:=0A= >> Check cpuflag macro before using vectored api.=0A= >> -virtio_recv_pkts_vec() uses _sse3__ simd instruction for now so added c= puflag.=0A= >> - Also wrap other vectored freind api ie..=0A= >> 1) virtqueue_enqueue_recv_refill_simple=0A= >> 2) virtio_rxq_vec_setup=0A= >>=0A= > ...=0A= >> diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virti= o/virtio_rxtx_simple.c=0A= >> index 3a1de9d..be51d7c 100644=0A= >> --- a/drivers/net/virtio/virtio_rxtx_simple.c=0A= >> +++ b/drivers/net/virtio/virtio_rxtx_simple.c=0A= > Hmm, why not wrapping the whole file, instead of just few functions?=0A= >=0A= > Or maybe better, do a compile time check at the Makefile, something=0A= > like:=0A= >=0A= > if has_CPUFLAG_xxx=0A= > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) +=3D virtio_rxtx_simple.c=0A= > endif=0A= >=0A= >=0A= > --yliu=0A= >=0A= For next release, we could consider providing arch level framework for=0A= different arch optimizations. It is more complicated for rte_memcpy. For=0A= the time being, except the small issue, ok with the temporary solution=0A= using CPUFLAG.=0A=