From patchwork Thu Apr 16 15:31:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Liu X-Patchwork-Id: 68625 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D51A3A0588; Thu, 16 Apr 2020 09:57:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FE391DAEE; Thu, 16 Apr 2020 09:57:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D174E1DAE4 for ; Thu, 16 Apr 2020 09:57:42 +0200 (CEST) IronPort-SDR: 40BJH1QiCYwzRwV4MHaRAxrrSK5tl7SnLc4HeE6kun2f70sTHIdaE2hGd4+/PJjW210yKSzrYC q6IseZhtWqog== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 00:57:41 -0700 IronPort-SDR: oT7O3sFxlOVCwa/9JXL0v5CDI/hIkfKq7Z6eRCEx88iqQr6neEM+MmJC9t26y3dVcV9KF1heW2 EwY9WrmWu/lw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,390,1580803200"; d="scan'208";a="427743419" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58]) by orsmga005.jf.intel.com with ESMTP; 16 Apr 2020 00:57:39 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com Cc: harry.van.haaren@intel.com, dev@dpdk.org, Marvin Liu Date: Thu, 16 Apr 2020 23:31:40 +0800 Message-Id: <20200416153147.110578-3-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416153147.110578-1-yong.liu@intel.com> References: <20200313174230.74661-1-yong.liu@intel.com> <20200416153147.110578-1-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v5 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