From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54EDFA0588; Thu, 16 Apr 2020 16:51:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 76FE91DD36; Thu, 16 Apr 2020 16:50:30 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5299C1DD1E for ; Thu, 16 Apr 2020 16:50:24 +0200 (CEST) IronPort-SDR: KeB4agzps0hvcfzH1QVGHns2e++v/XNv0QtESntJfXp5BajHcFR6QpdoLFK7LWk+NWhg0i2SbH FqqKjejWBgDw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 07:50:23 -0700 IronPort-SDR: MZIFrAygY/hEZDPENZ2Irx44+ATDTfPtz1cWMecxCOdQU0+104VBvAIUXwcQMtOcI9QliWAjAB dLZQ5sW45x8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,391,1580803200"; d="scan'208";a="454352683" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58]) by fmsmga005.fm.intel.com with ESMTP; 16 Apr 2020 07:50:22 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org, Marvin Liu Date: Fri, 17 Apr 2020 06:24:24 +0800 Message-Id: <20200416222431.114184-3-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416222431.114184-1-yong.liu@intel.com> References: <20200313174230.74661-1-yong.liu@intel.com> <20200416222431.114184-1-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v6 2/9] net/virtio: enable vectorized path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Previously, virtio split ring vectorized path is enabled as default. This is not suitable for everyone because of that path not follow virtio spec. Add new config for virtio vectorized path selection. By default vectorized path is enabled. Signed-off-by: Marvin Liu diff --git a/config/common_base b/config/common_base index c31175f9d..5901a94f7 100644 --- a/config/common_base +++ b/config/common_base @@ -449,6 +449,7 @@ CONFIG_RTE_LIBRTE_VIRTIO_PMD=y CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n +CONFIG_RTE_LIBRTE_VIRTIO_INC_VECTOR=y # # Compile virtio device emulation inside virtio PMD driver diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index efdcb0d93..9ef445bc9 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -29,6 +29,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c +ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_INC_VECTOR),y) ifeq ($(CONFIG_RTE_ARCH_X86),y) SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_sse.c else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y) @@ -36,6 +37,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_altivec.c else ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),) SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple_neon.c endif +endif ifeq ($(CONFIG_RTE_VIRTIO_USER),y) SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_user/vhost_user.c diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build index 5e7ca855c..f9619a108 100644 --- a/drivers/net/virtio/meson.build +++ b/drivers/net/virtio/meson.build @@ -9,12 +9,14 @@ sources += files('virtio_ethdev.c', 'virtqueue.c') deps += ['kvargs', 'bus_pci'] -if arch_subdir == 'x86' - sources += files('virtio_rxtx_simple_sse.c') -elif arch_subdir == 'ppc' - sources += files('virtio_rxtx_simple_altivec.c') -elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64') - sources += files('virtio_rxtx_simple_neon.c') +if dpdk_conf.has('RTE_LIBRTE_VIRTIO_INC_VECTOR') + if arch_subdir == 'x86' + sources += files('virtio_rxtx_simple_sse.c') + elif arch_subdir == 'ppc' + sources += files('virtio_rxtx_simple_altivec.c') + elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64') + sources += files('virtio_rxtx_simple_neon.c') + endif endif if is_linux -- 2.17.1