From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96E27A0544; Mon, 6 Jun 2022 15:11:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C783427F3; Mon, 6 Jun 2022 15:11:14 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id 14FAF40A7F for ; Mon, 6 Jun 2022 15:11:08 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.5.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9BxieTe_J1imxwXAA--.64917S23; Mon, 06 Jun 2022 21:11:04 +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: [v3 21/24] i40e: add dummy vector implementation for LoongArch Date: Mon, 6 Jun 2022 21:10:51 +0800 Message-Id: <20220606131054.2097526-22-zhoumin@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220606131054.2097526-1-zhoumin@loongson.cn> References: <20220606131054.2097526-1-zhoumin@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9BxieTe_J1imxwXAA--.64917S23 X-Coremail-Antispam: 1UD129KBjvJXoW7CFyftF47tw18Jw43Wry5CFg_yoW5JrWUpF sxGF4aqr4UJF47Kwn3GF13urySqwn5tFy7GFZ3C3s09rZ3KFy8ZFy3JF1UX3s8ArykCrs2 9r4DCFy7Way3G37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 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 efc5f93e35..9775f05da1 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -75,6 +75,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') -- 2.31.1