From patchwork Thu Jul 21 12:51:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhoumin X-Patchwork-Id: 114095 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B47BFA0032; Thu, 21 Jul 2022 14:53:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4A8F42BBE; Thu, 21 Jul 2022 14:52:15 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id E3E9342B71 for ; Thu, 21 Jul 2022 14:52:00 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.5.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxH9LhS9liUZgsAA--.700S23; Thu, 21 Jul 2022 20:51:59 +0800 (CST) From: Min Zhou To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, anatoly.burakov@intel.com, qiming.yang@intel.com, Yuying.Zhang@intel.com, jgrajcia@cisco.com, konstantin.v.ananyev@yandex.ru Cc: dev@dpdk.org, maobibo@loongson.cn Subject: [PATCH v4 21/24] i40e: add dummy vector implementation for LoongArch Date: Thu, 21 Jul 2022 20:51:41 +0800 Message-Id: <20220721125144.4028113-22-zhoumin@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220721125144.4028113-1-zhoumin@loongson.cn> References: <20220721125144.4028113-1-zhoumin@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf9DxH9LhS9liUZgsAA--.700S23 X-Coremail-Antispam: 1UD129KBjvJXoW7CFyftF47tw18Jw43Wry5CFg_yoW5JrWUpF sxGF4aqr4UJF47Kwn3GF13urySqwn5tFy7GFZ3Cas09rZ3KFy8ZFy3JF1UX3s8ArykCrs2 9r4DCry7uay3G37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The purpose of this patch is used to fix building issues for LoongArch architecture. The hardware instructions based vector implementation will come in a future patch. Signed-off-by: Min Zhou --- drivers/net/i40e/i40e_rxtx_vec_lsx.c | 54 ++++++++++++++++++++++++++++ drivers/net/i40e/meson.build | 2 ++ 2 files changed, 56 insertions(+) create mode 100644 drivers/net/i40e/i40e_rxtx_vec_lsx.c diff --git a/drivers/net/i40e/i40e_rxtx_vec_lsx.c b/drivers/net/i40e/i40e_rxtx_vec_lsx.c new file mode 100644 index 0000000000..727dc178f2 --- /dev/null +++ b/drivers/net/i40e/i40e_rxtx_vec_lsx.c @@ -0,0 +1,54 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2022 Loongson Technology Corporation Limited + */ + +#include "i40e_ethdev.h" +#include "i40e_rxtx.h" + +/* The vector support will come later */ +#ifdef RTE_ARCH_NO_VECTOR +uint16_t +i40e_recv_scattered_pkts_vec(__rte_unused void *rx_queue, + __rte_unused struct rte_mbuf **rx_pkts, + __rte_unused uint16_t nb_pkts) +{ + return 0; +} + +uint16_t +i40e_recv_pkts_vec(__rte_unused void *rx_queue, + __rte_unused struct rte_mbuf **rx_pkts, + __rte_unused uint16_t nb_pkts) +{ + return 0; +} +uint16_t +i40e_xmit_fixed_burst_vec(__rte_unused void *tx_queue, + __rte_unused struct rte_mbuf **tx_pkts, + __rte_unused uint16_t nb_pkts) +{ + return 0; +} +void __rte_cold +i40e_rx_queue_release_mbufs_vec(__rte_unused struct i40e_rx_queue *rxq) +{ +} +int __rte_cold +i40e_rxq_vec_setup(__rte_unused struct i40e_rx_queue *rxq) +{ + return -1; +} +int __rte_cold +i40e_txq_vec_setup(__rte_unused struct i40e_tx_queue *txq) +{ + return -1; +} +int __rte_cold +i40e_rx_vec_dev_conf_condition_check(__rte_unused struct rte_eth_dev *dev) +{ + return -1; +} +#else +#error "The current version of LoongArch does not support vector!" +#endif diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index 84fd42754e..01b9d0e753 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -83,6 +83,8 @@ elif arch_subdir == 'ppc' sources += files('i40e_rxtx_vec_altivec.c') elif arch_subdir == 'arm' sources += files('i40e_rxtx_vec_neon.c') +elif arch_subdir == 'loongarch' + sources += files('i40e_rxtx_vec_lsx.c') endif headers = files('rte_pmd_i40e.h')