diff --git a/01-boundcheck.patch b/01-boundcheck.patch index 45248d0214e562681d3afbbfc8d87bcdd1c1a049..7c6cfbfa78383e49448a57c93626ff79b3b1152d 100644 --- a/01-boundcheck.patch +++ b/01-boundcheck.patch @@ -1,6 +1,6 @@ -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/CMakeLists.txt DCF-5.0.1-edit/CMakeLists.txt -*** DCF-5.0.1/CMakeLists.txt 2024-05-07 17:22:01.091857616 +0800 ---- DCF-5.0.1-edit/CMakeLists.txt 2024-05-07 17:20:19.623110156 +0800 +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/CMakeLists.txt DCF-6.0.0-edit/CMakeLists.txt +*** DCF-6.0.0/CMakeLists.txt 2024-08-16 00:52:35.803579630 +0800 +--- DCF-6.0.0-edit/CMakeLists.txt 2024-08-16 00:45:51.663987982 +0800 *************** *** 10,16 **** set(CJSON_PATH "${DCF_LIBRARY}/cJSON/lib") @@ -17,10 +17,10 @@ diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/CMak ! set(vpp_libsecurec "boundscheck") set(CMAKE_INSTALL_PREFIX $ENV{dcf_install_prefix}) - -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/dcf_interface.c DCF-5.0.1-edit/src/dcf_interface.c -*** DCF-5.0.1/src/dcf_interface.c 2024-05-07 17:22:01.099857675 +0800 ---- DCF-5.0.1-edit/src/dcf_interface.c 2024-05-07 17:20:19.631110215 +0800 + +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/dcf_interface.c DCF-6.0.0-edit/src/dcf_interface.c +*** DCF-6.0.0/src/dcf_interface.c 2024-08-16 00:52:35.833579599 +0800 +--- DCF-6.0.0-edit/src/dcf_interface.c 2024-08-16 00:46:14.413969235 +0800 *************** *** 39,45 **** #include "elc_status_check.h" @@ -37,10 +37,10 @@ diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/ ! #include "cjson/cJSON.h" #include "util_profile_stat.h" #include "stream.h" - #include "cb_func.h" -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/metadata/metadata.c DCF-5.0.1-edit/src/metadata/metadata.c -*** DCF-5.0.1/src/metadata/metadata.c 2024-05-07 17:22:01.103857704 +0800 ---- DCF-5.0.1-edit/src/metadata/metadata.c 2024-05-07 17:20:19.635110245 +0800 + #include "cb_func.h" +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/metadata/metadata.c DCF-6.0.0-edit/src/metadata/metadata.c +*** DCF-6.0.0/src/metadata/metadata.c 2024-08-16 00:52:35.843579589 +0800 +--- DCF-6.0.0-edit/src/metadata/metadata.c 2024-08-16 00:46:49.173929098 +0800 *************** *** 32,38 **** #include "md_stream.h" @@ -58,9 +58,9 @@ diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/ #ifdef __cplusplus extern "C" { -diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-5.0.1/src/utils/util_profile_stat.h DCF-5.0.1-edit/src/utils/util_profile_stat.h -*** DCF-5.0.1/src/utils/util_profile_stat.h 2024-05-07 17:22:01.107857734 +0800 ---- DCF-5.0.1-edit/src/utils/util_profile_stat.h 2024-05-07 17:20:19.639110274 +0800 +diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' DCF-6.0.0/src/utils/util_profile_stat.h DCF-6.0.0-edit/src/utils/util_profile_stat.h +*** DCF-6.0.0/src/utils/util_profile_stat.h 2024-08-16 00:52:35.873579557 +0800 +--- DCF-6.0.0-edit/src/utils/util_profile_stat.h 2024-08-16 00:47:13.923900299 +0800 *************** *** 37,43 **** #include "cm_num.h" diff --git a/DCF-5.0.1.tar.gz b/DCF-5.0.1.tar.gz deleted file mode 100644 index f5b804d00e2d8857d906249da431afda5de92f52..0000000000000000000000000000000000000000 Binary files a/DCF-5.0.1.tar.gz and /dev/null differ diff --git a/DCF-1.0.0-add-riscv64-support.patch b/DCF-6.0.0-add-riscv64-support.patch similarity index 53% rename from DCF-1.0.0-add-riscv64-support.patch rename to DCF-6.0.0-add-riscv64-support.patch index 0f3cf8023a43392c04b0d92941df8e45c7d692e4..445349285b072bb23624f8be365bb3b7fdf4f4d3 100644 --- a/DCF-1.0.0-add-riscv64-support.patch +++ b/DCF-6.0.0-add-riscv64-support.patch @@ -1,31 +1,17 @@ -From 645a5d63a1cbf866babdce9eade8d5719f62a7fc Mon Sep 17 00:00:00 2001 -From: misaka00251 -Date: Fri, 28 Jul 2023 15:19:20 +0800 -Subject: [PATCH] Add riscv64 support +From 2df4a5983f3e8dad5932aed590d5ec6738f24198 Mon Sep 17 00:00:00 2001 +From: ziyu04 <1159047277@qq.com> +Date: Fri, 16 Aug 2024 02:03:46 +0800 +Subject: [PATCH] update riscv --- - CMakeLists.txt | 2 +- - src/common/cm_concurrency/cm_spinlock.h | 2 +- + src/common/cm_concurrency/cm_spinlock.h | 7 ++++++- src/common/cm_concurrency/cm_thread.c | 2 +- src/common/cm_utils/cm_checksum.h | 2 +- src/common/cm_utils/cm_memory.h | 6 ++++++ - 5 files changed, 10 insertions(+), 4 deletions(-) + 4 files changed, 14 insertions(+), 3 deletions(-) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0380198..89d8551 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -89,7 +89,7 @@ if (UNIX) - - add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables) - else () -- add_compile_options(-msse4.2 ) -+ add_compile_options() - endif () - Add_Definitions(-DWSEC_COMPILE_CAC_OPENSSL -DWSEC_AES_GCM_SUPPORT -DWSEC_USE_OPENSSL_110) - else () diff --git a/src/common/cm_concurrency/cm_spinlock.h b/src/common/cm_concurrency/cm_spinlock.h -index 7965853..c7ef986 100644 +index 42a2c1d..e26842d 100644 --- a/src/common/cm_concurrency/cm_spinlock.h +++ b/src/common/cm_concurrency/cm_spinlock.h @@ -37,7 +37,7 @@ extern "C" { @@ -33,25 +19,37 @@ index 7965853..c7ef986 100644 typedef volatile uint32 spinlock_t; typedef volatile uint32 ip_spinlock_t; -#if defined(__arm__) || defined(__aarch64__) -+#if defined(__arm__) || defined(__aarch64__) || defined(_riscv) ++#if defined(__arm__) || defined(__aarch64__) || defined(__riscv) #define GS_INIT_SPIN_LOCK(lock) \ { \ __atomic_store_n(&lock, 0, __ATOMIC_SEQ_CST); \ +@@ -68,6 +68,11 @@ typedef struct st_spin_statis { + { \ + __asm__ volatile("nop"); \ + } ++#elif defined(__riscv) ++#define fas_cpu_pause() \ ++ { \ ++ __asm__ volatile(""); \ ++ } + #else + #define fas_cpu_pause() \ + { \ diff --git a/src/common/cm_concurrency/cm_thread.c b/src/common/cm_concurrency/cm_thread.c -index 2d0aa2a..fd5f0f1 100644 +index 723b1de..9e06266 100644 --- a/src/common/cm_concurrency/cm_thread.c +++ b/src/common/cm_concurrency/cm_thread.c -@@ -294,7 +294,7 @@ uint32 cm_get_current_thread_id() +@@ -294,7 +294,7 @@ uint32 cm_get_current_thread_id(void) { #if (defined __x86_64__) #define __SYS_GET_SPID 186 -#elif (defined __aarch64__) +#elif (defined __aarch64__) || defined(__riscv) #define __SYS_GET_SPID 178 - #endif - #define gettid() syscall(__SYS_GET_SPID) + #elif (defined __loongarch__) + #include diff --git a/src/common/cm_utils/cm_checksum.h b/src/common/cm_utils/cm_checksum.h -index 85bb9fa..06e60ca 100644 +index 758c917..f0ed99b 100644 --- a/src/common/cm_utils/cm_checksum.h +++ b/src/common/cm_utils/cm_checksum.h @@ -26,7 +26,7 @@ @@ -64,22 +62,22 @@ index 85bb9fa..06e60ca 100644 #if __has_include() #include diff --git a/src/common/cm_utils/cm_memory.h b/src/common/cm_utils/cm_memory.h -index 988b78e..05520a6 100644 +index 8935413..c91ca63 100644 --- a/src/common/cm_utils/cm_memory.h +++ b/src/common/cm_utils/cm_memory.h -@@ -56,6 +56,12 @@ extern "C" { - __asm__ volatile("dmb ish" :: \ +@@ -68,6 +68,12 @@ extern "C" { + __asm__ volatile("" :: \ : "memory"); \ } +#elif defined(__riscv) -+#define CM_MFENCE \ -+ { \ -+ __asm__ volatile("fence " iorw "," iorw :: \ -+ : "memory"); \ ++#define CM_MFENCE \ ++ { \ ++ __asm__ volatile("fence iorw , iorw" :: \ ++ : "memory"); \ + } - #else - #define CM_MFENCE \ - { \ + #endif + + -- -2.39.2 (Apple Git-143) +2.43.0 diff --git a/DCF-6.0.0.tar.gz b/DCF-6.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..56384fa60d0d65779aeb65f440880719677fc9f8 Binary files /dev/null and b/DCF-6.0.0.tar.gz differ diff --git a/opengauss-dcf.spec b/opengauss-dcf.spec index 3798735e79178c0c096c9e0c0348f30882a9fcec..af8a9c803946211f52626092364e1df06fb6a97d 100644 --- a/opengauss-dcf.spec +++ b/opengauss-dcf.spec @@ -1,6 +1,7 @@ +%define debug_package %{nil} Name: DCF -Version: 5.0.1 -Release: 7 +Version: 6.0.0 +Release: 8 Summary: A distributed consensus framework library License: MulanPSL-2.0 URL: https://gitee.com/opengauss/DCF @@ -9,11 +10,10 @@ Source0: %{name}-%{version}.tar.gz Patch1: 01-boundcheck.patch Patch2: DCF-1.0.0-sw.patch Patch3: DCF-1.0.0-add-loongarch64-support.patch -Patch4: DCF-1.0.0-add-riscv64-support.patch +Patch4: DCF-6.0.0-add-riscv64-support.patch BuildRequires: cmake gcc gcc-c++ lz4-devel openssl-devel zstd-devel libboundscheck cjson-devel - %description DCF is A distributed consensus framework library for openGauss @@ -64,6 +64,8 @@ cp output/lib/libdcf.* %{buildroot}/%{_prefix}/lib64 %endif %changelog +* Fri Aug 16 2024 YH0204 <1159047277@qq.com> - 6.0.0-8 +- Update version to 6.0.0 * Mon May 6 2024 liuheng - 5.0.1-7 - Update version to 5.0.1