diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..bacb7796a69564a1e4b64d49cb14d980ca8c8106 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 HiSilicon Technologies Co., Ltd. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/cdma.spec b/cdma.spec new file mode 100644 index 0000000000000000000000000000000000000000..b07c1b84df91e726994824e2fd2128bcdecea084 --- /dev/null +++ b/cdma.spec @@ -0,0 +1,82 @@ +Summary: Implementation of CDMA +Name: libcdma +Version: 1.0.1 +Release: 0 +License: MIT +%global major_version 1 + +Source0: libcdma.tar.gz + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: libummu-devel +Requires: libummu +ExclusiveArch: aarch64 + +%description +This implementation provides CDMA sending and reception. + +%package devel +Summary: Implementation of CDMA(UB) - Tools and header files for developers +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package is required to develop alternate clients for cdma. + +The libCDMA driver program is designed to implement the following two +functionalities: + +1. Memory verbs, which are one-sided operations including read, write, +and atomic operations. + +2. Event verbs, which involve +registering callback functions with the kernel-mode CDMA for post-processing +asynchronous events. + +%prep +%setup -q -n cdma + +%build +rm -rf build +cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DPROJECT_VERSION=%{version} \ + -DLIB_SOVERSION=%{major_version} + +cmake --build build + +%install +mkdir -p %{buildroot}%{_docdir}/ub/%{name}/ +cp -a doc/* %{buildroot}%{_docdir}/ub/%{name}/ +install -m 644 README.md %{buildroot}%{_docdir}/ub/%{name}/ + +cmake --install build --prefix=%{buildroot}/usr + +%files +%{_libdir}/libcdma.so.* + +%files devel +%{_includedir}/cdma_u_lib.h +%{_includedir}/cdma_abi.h +%{_libdir}/libcdma.so +%doc %{_docdir}/ub/%{name}/* + +%changelog +* Tue Dec 9 2025 Zhipeng Lu - 1.0.1-0 +- add version and fix some format and add doc to devel package +- change the compile command and the usage of so + +* Fri Nov 21 2025 Zhipeng Lu - 1.0-3 +- add cdma_abi.h to devel package + +* Mon Nov 17 2025 Zhipeng Lu - 1.0-2 +- fix wait cqe and unregister ras + +* Thu Nov 6 2025 Zhipeng Lu - 1.0-1 +- Support resource creation and destruction in CDMA + user mode, enabling read and write semantic functions + for CDMA user mode. diff --git a/libcdma.tar.gz b/libcdma.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..65eba2dcaa90d30a9f0ff0ab299303d9976d366c Binary files /dev/null and b/libcdma.tar.gz differ