diff --git a/0016-perftest-add-sw-support.patch b/0016-perftest-add-sw-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..2e15dcfa5b29e19cc46637378307fc8df7d5c23d --- /dev/null +++ b/0016-perftest-add-sw-support.patch @@ -0,0 +1,33 @@ +From f3c8ce4a4b21f697eba0d6e6bb84dfe8b426539c Mon Sep 17 00:00:00 2001 +From: root +Date: Thu, 23 May 2024 17:53:52 +0800 +Subject: [PATCH] add sw support + +--- + src/get_clock.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/get_clock.h b/src/get_clock.h +index d308e23..6a37056 100644 +--- a/src/get_clock.h ++++ b/src/get_clock.h +@@ -114,6 +114,17 @@ static inline cycles_t get_cycles() + return perf_get_cycles(); + } + ++#elif defined(__sw_64__) ++ ++typedef unsigned long cycles_t; ++static inline cycles_t get_cycles() ++{ ++ cycles_t cval; ++ asm volatile("memb" : : : "memory"); ++ asm volatile("rtc %0" : "=r" (cval)); ++ return cval; ++} ++ + #elif defined(__loongarch64) + typedef unsigned long cycles_t; + static inline cycles_t get_cycles() +-- +2.33.0 diff --git a/perftest.spec b/perftest.spec index 9aa4b462461c47ff129ff47a3cbc9de2cbae9fcc..9ca7869fe5705071f945c91c526e3691851f96ac 100644 --- a/perftest.spec +++ b/perftest.spec @@ -1,6 +1,6 @@ Name: perftest Version: 4.5 -Release: 13 +Release: 14 License: GPL-2.0-only OR BSD-2-Clause Summary: RDMA Performance Testing Tools Url: https://github.com/linux-rdma/perftest @@ -21,9 +21,13 @@ Patch12: 0012-Perftest-Add-support-for-TD-lock-free-mode.patch Patch13: 0013-Perftest-Fix-TD-lock-free-mode-not-working-for-QP.patch Patch14: 0014-Perftest-Fix-failure-in-creating-cq-when-create-cq-e.patch Patch15: 0015-Perftest-modify-source_ip-to-bind_sounce_ip-to-fix-i.patch +Patch16: 0016-perftest-add-sw-support.patch BuildRequires: automake gcc libibverbs-devel >= 1.2.0 librdmacm-devel >= 1.0.21 libibumad-devel >= 1.3.10.2 BuildRequires: pciutils-devel libibverbs librdmacm libibumad +%ifarch sw_64 +BuildRequires: rdma-core >= 50.0 +%endif Obsoletes: openib-perftest < 1.3 %description @@ -47,6 +51,12 @@ done %_bindir/* %changelog +* Mon Apr 21 2025 zhangshaoning - 4.5-14 +- Type: feature +- ID: NA +- SUG: NA +- DESC: Add sw_64 support + * Wed Mar 12 2025 Funda Wang - 4.5-13 - Type: bugfix - ID: NA