From: Min Zhou <zhoumin@loongson.cn>
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 20/24] ixgbe: add dummy vector implementation for LoongArch
Date: Thu, 21 Jul 2022 20:51:40 +0800 [thread overview]
Message-ID: <20220721125144.4028113-21-zhoumin@loongson.cn> (raw)
In-Reply-To: <20220721125144.4028113-1-zhoumin@loongson.cn>
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 <zhoumin@loongson.cn>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_lsx.c | 60 ++++++++++++++++++++++++++
drivers/net/ixgbe/meson.build | 2 +
2 files changed, 62 insertions(+)
create mode 100644 drivers/net/ixgbe/ixgbe_rxtx_vec_lsx.c
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_lsx.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_lsx.c
new file mode 100644
index 0000000000..412c8f937a
--- /dev/null
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_lsx.c
@@ -0,0 +1,60 @@
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Loongson Technology Corporation Limited
+ */
+
+#include "base/ixgbe_common.h"
+#include "ixgbe_ethdev.h"
+#include "ixgbe_rxtx.h"
+
+/* The vector support will come later */
+#ifdef RTE_ARCH_NO_VECTOR
+int
+ixgbe_rx_vec_dev_conf_condition_check(__rte_unused struct rte_eth_dev *dev)
+{
+ return -1;
+}
+
+uint16_t
+ixgbe_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
+ixgbe_recv_scattered_pkts_vec(__rte_unused void *rx_queue,
+ __rte_unused struct rte_mbuf **rx_pkts,
+ __rte_unused uint16_t nb_pkts)
+{
+ return 0;
+}
+
+int
+ixgbe_rxq_vec_setup(__rte_unused struct ixgbe_rx_queue *rxq)
+{
+ return -1;
+}
+
+uint16_t
+ixgbe_xmit_fixed_burst_vec(__rte_unused void *tx_queue,
+ __rte_unused struct rte_mbuf **tx_pkts,
+ __rte_unused uint16_t nb_pkts)
+{
+ return 0;
+}
+
+int
+ixgbe_txq_vec_setup(__rte_unused struct ixgbe_tx_queue *txq)
+{
+ return -1;
+}
+
+void
+ixgbe_rx_queue_release_mbufs_vec(__rte_unused struct ixgbe_rx_queue *rxq)
+{
+}
+#else
+#error "The current version of LoongArch does not support vector!"
+#endif
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 162f8d5f46..33c9a58ac8 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -29,6 +29,8 @@ if arch_subdir == 'x86'
endif
elif arch_subdir == 'arm'
sources += files('ixgbe_rxtx_vec_neon.c')
+elif arch_subdir == 'loongarch'
+ sources += files('ixgbe_rxtx_vec_lsx.c')
endif
includes += include_directories('base')
--
2.31.1
next prev parent reply other threads:[~2022-07-21 12:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 12:51 [PATCH v4 00/24] Support LoongArch architecture Min Zhou
2022-07-21 12:51 ` [PATCH v4 01/24] eal/loongarch: add atomic operations for LoongArch Min Zhou
2022-07-21 12:51 ` [PATCH v4 02/24] eal/loongarch: add byte order " Min Zhou
2022-07-21 12:51 ` [PATCH v4 03/24] eal/loongarch: add cpu cycle " Min Zhou
2022-07-21 12:51 ` [PATCH v4 04/24] eal/loongarch: add prefetch " Min Zhou
2022-07-21 12:51 ` [PATCH v4 05/24] eal/loongarch: add spinlock " Min Zhou
2022-07-21 12:51 ` [PATCH v4 06/24] eal/loongarch: add cpu flag checks " Min Zhou
2022-07-21 12:51 ` [PATCH v4 07/24] eal/loongarch: add dummy vector memcpy " Min Zhou
2022-07-21 12:51 ` [PATCH v4 08/24] eal/loongarch: add io operations " Min Zhou
2022-07-21 12:51 ` [PATCH v4 09/24] eal/loongarch: add mcslock " Min Zhou
2022-07-21 12:51 ` [PATCH v4 10/24] eal/loongarch: add pause " Min Zhou
2022-07-21 12:51 ` [PATCH v4 11/24] eal/loongarch: add pflock " Min Zhou
2022-07-21 12:51 ` [PATCH v4 12/24] eal/loongarch: add rwlock " Min Zhou
2022-07-21 12:51 ` [PATCH v4 13/24] eal/loongarch: add ticketlock " Min Zhou
2022-07-21 12:51 ` [PATCH v4 14/24] eal/loongarch: add power " Min Zhou
2022-07-21 12:51 ` [PATCH v4 15/24] eal/loongarch: add hypervisor " Min Zhou
2022-07-21 12:51 ` [PATCH v4 16/24] mem: add huge page size definition " Min Zhou
2022-07-21 12:51 ` [PATCH v4 17/24] eal/linux: set eal base address " Min Zhou
2022-07-21 12:51 ` [PATCH v4 18/24] meson: introduce LoongArch architecture Min Zhou
2022-07-21 12:51 ` [PATCH v4 19/24] test/xmmt_ops: add dummy vector implementation for LoongArch Min Zhou
2022-07-21 12:51 ` Min Zhou [this message]
2022-07-21 12:51 ` [PATCH v4 21/24] i40e: " Min Zhou
2022-07-21 12:51 ` [PATCH v4 22/24] tap: add system call number " Min Zhou
2022-07-21 12:51 ` [PATCH v4 23/24] memif: " Min Zhou
2022-07-21 12:51 ` [PATCH v4 24/24] maintainers: claim responsibility " Min Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220721125144.4028113-21-zhoumin@loongson.cn \
--to=zhoumin@loongson.cn \
--cc=Yuying.Zhang@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jgrajcia@cisco.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=maobibo@loongson.cn \
--cc=qiming.yang@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).