From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 246546CA9 for ; Mon, 29 Feb 2016 13:31:39 +0100 (CET) Received: by mail-pa0-f46.google.com with SMTP id yy13so91481799pab.3 for ; Mon, 29 Feb 2016 04:31:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=Zioj3tm0iwsbX9jD+ZDYcjsODJLOH/dDhWPb6E7R6ZQ=; b=ni1EG0a5LPOt3QbonmX/p4OxjPcW0IsZOFATaTEyxcOyLQJrZzoVPrDtrVgDoEwje+ IlwiDOhJtXsxbabOWwwS1JzSzDtJpP7vMFrLl0hY2VZQipn5kBp2J2qPggjkuLqD8+oO JF8QmSfYn690ZZK2n+yh76BrFKnTmteyQnsIXI2zKc0hB13t22NvwGTb4Hc68Mdm+wNF 4RnCFwVJevHoUUeQuntPeXH8kmPl2N6m/e1K51eq7vqAyxguXR5Ats8+LgrQsRo/bQ1a Sbrv9842GGtgjJgIB8nzhHpiyuJOz/qsfeeAqbSUbhJ9lkYtPpsP1AS/DBwGGL/dF7sI izpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Zioj3tm0iwsbX9jD+ZDYcjsODJLOH/dDhWPb6E7R6ZQ=; b=j61o1V1TXL9XpkHoN357L2LpsJcFwqaYCzlRqC1Sb71TZDGhMHwfrmbYMPTiQKWaGC qo7uLYsGX82jqXzLavti5/daWydg3XaXL+Iyfp2oXvgSEp1quFrCa6ROma4Swl7oJ7wZ NRiQmXbZJrnX0SnJA21GDT8mHhtG55iuoyShymV4WcoWHqtuEA8CNj/Pn1VzvjVmgIQR ptcqYPfHkZpHbMSEIw/627xTdHnupb90j075uC2RC8SuKq9DraRIQ3RkmiTK/NL+ltAb aJN1HOQyhKpmnnoV0inJYyigtAWbM0OM4LeZ1sz5QdmUJUvYhgrcNnXMxboDS5fm8fi6 JArg== X-Gm-Message-State: AD7BkJKcmFe3ljEJQrbNkLiXZ6BvBp2UHpZBsmv2VbtCqL6V3gIshSArZYunP6UdgsphqUIyiH7x5pjZtlnvOTXv MIME-Version: 1.0 X-Received: by 10.67.23.202 with SMTP id ic10mr21148347pad.127.1456749098419; Mon, 29 Feb 2016 04:31:38 -0800 (PST) Received: by 10.66.176.200 with HTTP; Mon, 29 Feb 2016 04:31:38 -0800 (PST) In-Reply-To: <20160229042721.GJ14300@yliu-dev.sh.intel.com> References: <1456476662-23081-1-git-send-email-sshukla@mvista.com> <20160229042721.GJ14300@yliu-dev.sh.intel.com> Date: Mon, 29 Feb 2016 18:01:38 +0530 Message-ID: From: Santosh Shukla To: Yuanhan Liu Content-Type: text/plain; charset=UTF-8 Cc: dpdk 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 12:31:39 -0000 On Mon, Feb 29, 2016 at 9:57 AM, Yuanhan Liu wrote: > 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? > Better to refactor code and make arch specific. Current implementation is temporary. > 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 > Tried this approach but end up with link error, If I try to fix below link error then I will be ending up writing similar code, linker error snap: /work/santosh/thunder/nfs/dpdk/arm64-thunderx-linuxapp-gcc/lib/librte_pmd_virtio.a(virtio_rxtx.o): In function `virtio_dev_rxtx_start': virtio_rxtx.c:(.text+0x168c): undefined reference to `virtqueue_enqueue_recv_refill_simple' /work/santosh/thunder/nfs/dpdk/arm64-thunderx-linuxapp-gcc/lib/librte_pmd_virtio.a(virtio_rxtx.o): In function `virtio_dev_rx_queue_setup': virtio_rxtx.c:(.text+0x2364): undefined reference to `virtio_rxq_vec_setup' /work/santosh/thunder/nfs/dpdk/arm64-thunderx-linuxapp-gcc/lib/librte_pmd_virtio.a(virtio_rxtx.o): In function `virtio_dev_tx_queue_setup': virtio_rxtx.c:(.text+0x2460): undefined reference to `virtio_xmit_pkts_simple' virtio_rxtx.c:(.text+0x2464): undefined reference to `virtio_recv_pkts_vec' virtio_rxtx.c:(.text+0x2468): undefined reference to `virtio_xmit_pkts_simple' virtio_rxtx.c:(.text+0x246c): undefined reference to `virtio_recv_pkts_vec' collect2: error: ld returned 1 exit status make[5]: *** [test] Error 1 make[4]: *** [test] Error 2 make[3]: *** [app] Error 2 > > --yliu