From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v1] virtio: Use cpuflag for vector api Date: Mon, 29 Feb 2016 12:27:21 +0800 Message-ID: <20160229042721.GJ14300@yliu-dev.sh.intel.com> References: <1456476662-23081-1-git-send-email-sshukla@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Santosh Shukla Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 032D269F8 for ; Mon, 29 Feb 2016 05:26:28 +0100 (CET) Content-Disposition: inline In-Reply-To: <1456476662-23081-1-git-send-email-sshukla@mvista.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Feb 26, 2016 at 02:21:02PM +0530, Santosh Shukla wrote: > Check cpuflag macro before using vectored api. > -virtio_recv_pkts_vec() uses _sse3__ simd instruction for now so added cpuflag. > - Also wrap other vectored freind api ie.. > 1) virtqueue_enqueue_recv_refill_simple > 2) virtio_rxq_vec_setup > ... > diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c > index 3a1de9d..be51d7c 100644 > --- a/drivers/net/virtio/virtio_rxtx_simple.c > +++ b/drivers/net/virtio/virtio_rxtx_simple.c Hmm, why not wrapping the whole file, instead of just few functions? Or maybe better, do a compile time check at the Makefile, something like: if has_CPUFLAG_xxx SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c endif --yliu