diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 90689332c598..0225f722c1ba 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,7 +2,7 @@ Open Programmable Acceleration Engine (OPAE) is a software framework for managin - OPAE Software Development Kit (OPAE SDK), -- OPAE Linux driver for Intel(R) Xeon(R) CPU with Integrated FPGAs and Intel(R) PAC with Arria(R) 10 GX FPGA +- OPAE Linux DFL driver for Intel® FPGA Programmable Acceleration Card - Basic Building Block (BBB) library for accelerating AFU development (not part of this release, but pre-release code is @@ -17,22 +17,70 @@ OPAE\'s goal is to accelerate FPGA adoption. It is a community effort to simplif More information about OPAE can be found at http://01.org/OPAE. -Open Programmable Acceleration Engine (OPAE) 1.4.0 Release Notes ------------------------------------------------------------------ -This document provides the Release Notes for the Open Programmable -Acceleration Engine (OPAE) 1.4.0 release. + +Open Programmable Acceleration Engine (OPAE) 2.0.0 Release Notes +---------------------------------------------------------------------------------------------------------------------- + +OPAE 2.0.0 release provides SDK, tools, and Linux kernel driver. The main feature of this release is to support Intel® FPGA Programmable Acceleration Card N3000 series. System Compatibility -------------------- +- Hardware: Tightly coupled FPGA products and programmable FPGA acceleration cards for Intel(R) Xeon(R) processors: +- Intel® FPGA Programmable Acceleration Card N3000-2 Production Release +- Intel® FPGA Programmable Acceleration Card N3000-V Production Release +- Intel® FPGA Programmable Acceleration Card N3000-3 Production Release + + +Major Changes from 1.4.1 to 2.0.0 +--------------------------------- +- Added support to FPGA Linux kernel Device Feature List (DFL) driver. +- Added support to PAC card N3000 series. +- Added PACSign, bitstream_info, fpgasudpate, rsu, fpgaotsu, fpgaport python tools. +- Added ethernet tools for PAC card N3000. +- Various bug fixes +- Various Static code scan bug fixes +- Added python3 support. +- OPAE USMG API are deprecated. +- Updated OPAE documentation. + +- Operating System: Tested on Fedora 31 with Linux Kernel 5.8 version. + +Source Code: +------------ +- FPGA DFL Linux driver source code: tag 2.0.0-1 +- https://github.com/OPAE/linux-dfl/tree/fpga-upstream-dev-5.8.0 + +- SDK and tools source code: tag 2.0.0-1 +- https://github.com/OPAE/opae-sdk/tree/release/2.0.0 +- https://github.com/OPAE/opae-libs/tree/release/2.0.0 +- https://github.com/OPAE/opae-legacy/tree/release/2.0.0 +- https://github.com/OPAE/opae-sim/tree/release/2.0.0 +- https://github.com/OPAE/opae-test/tree/release/2.0.0 + +Notes/Known Issues +------------------ +- FPGA DFL kernel driver upstreaming to Linux kernel is on going +- OPAE 2.0 is not compatible with Intel previous production FPGA driver. + + +Major Changes from 1.4.0 to 2.0.0 +---------------------------------- + +- Added support to FPGA Linux kernel Device Feature List (DFL) driver patch set3,set4 and set5. +- Added support to both PAC card N3000 & D5005 cards. +- Added pacsingn, bitstreaminfo, fpgasudpate, rsu python tools. +- Added ethernet tools for PAC card N3000. +- Various bug fixes +- Various memory leak fixes +- Various Static code scan bug fixes + +- OPAE 2.0.0 tested on Fedora 31 with Linux Kernel 5.8 version. + +- FPGA DFL Linux driver source code available in Linux 5.8 kernel + - https://github.com/OPAE/linux-dfl/tree/fpga-upstream-dev-5.8.0 -- Hardware: tightly coupled FPGA products and programmable FPGA - acceleration cards for Intel(R) Xeon(R) processors: - - Intel(R) PAC with Arria(R) 10 GX FPGA (PCI ID: 0x09c4) FIM version 1.1.2-1 (1.2 Production) - - Intel(R) Xeon with Integrated FPGA (PCI ID: 0xbcc0) FIM version 6.4.0 - - Intel® FPGA Programmable Acceleration Card N3000 (PCI ID: 0x0b30) FIM version D.1.0.13 (1.0 Production) -- Operating System: Tested on RedHat 7.6, CentOS 7.6 with Linux Kernel 3.10 and the community 4.19 LTS kernels. Major Changes from 1.3.0 to 1.4.0 ---------------------------------- diff --git a/opae.spec b/opae.spec index 1fbe46d6c756..a0f01aab18c5 100644 --- a/opae.spec +++ b/opae.spec @@ -1,6 +1,6 @@ Summary: Open Programmable Acceleration Engine (OPAE) SDK Name: opae -Version: 1.4.0 +Version: 2.0.0 Release: 1%{?dist} License: BSD ExclusiveArch: x86_64 @@ -28,6 +28,7 @@ BuildRequires: tbb-devel BuildRequires: git BuildRequires: python3-pip BuildRequires: python3-virtualenv +BuildRequires: systemd-rpm-macros %description Open Programmable Acceleration Engine (OPAE) is a software framework @@ -64,7 +65,7 @@ rm -rf _build mkdir _build cd _build -%cmake .. -DCMAKE_INSTALL_PREFIX=/usr -B $PWD +%cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DOPAE_PRESERVE_REPOS=ON -DOPAE_BUILD_LEGACY=ON -B $PWD %make_build opae-c \ bitstream \ @@ -90,7 +91,10 @@ cd _build nlb0\ nlb3\ nlb7\ - mmlink + mmlink\ + fpgad\ + fpgad-api\ + fpgad-vc\ %install @@ -157,7 +161,9 @@ DESTDIR=%{buildroot} cmake -DCOMPONENT=opaecxxutils -P cmake_install.cmake DESTDIR=%{buildroot} cmake -DCOMPONENT=opaecxxnlb -P cmake_install.cmake DESTDIR=%{buildroot} cmake -DCOMPONENT=toolfpgadiagapps -P cmake_install.cmake DESTDIR=%{buildroot} cmake -DCOMPONENT=toolfpgadiag -P cmake_install.cmake - +DESTDIR=%{buildroot} cmake -DCOMPONENT=toolfpgad -P cmake_install.cmake +DESTDIR=%{buildroot} cmake -DCOMPONENT=toolfpgad_api -P cmake_install.cmake +DESTDIR=%{buildroot} cmake -DCOMPONENT=toolfpgad_vc -P cmake_install.cmake prev=$PWD pushd %{_topdir}/BUILD/opae/python/opae.admin/ @@ -168,10 +174,19 @@ pushd %{_topdir}/BUILD/opae/python/pacsign %{__python3} setup.py install --single-version-externally-managed --root=%{buildroot} --record=$prev/INSTALLED_PACSIGN_FILES popd -pushd %{_topdir}/BUILD/opae/tools/extra/fpgadiag/ -%{__python3} setup.py install --single-version-externally-managed --root=%{buildroot} --record=$prev/INSTALLED_FPGADIAG_FILES +pushd %{_topdir}/BUILD/opae/scripts +install -m 755 eth_group_mdev.sh %{buildroot}/usr/bin/eth_group_mdev.sh popd +%post +%systemd_post fpgad.service + +%preun +%systemd_preun fpgad.service + +%postun +%systemd_postun_with_restart fpgad.service + %files %dir %{_datadir}/opae %doc %{_datadir}/opae/RELEASE_NOTES.md @@ -179,15 +194,15 @@ popd %license %{_datadir}/opae/COPYING %{_libdir}/libopae-c.so.%{version} -%{_libdir}/libopae-c.so.1 +%{_libdir}/libopae-c.so.2 %{_libdir}/libbitstream.so.%{version} -%{_libdir}/libbitstream.so.1 +%{_libdir}/libbitstream.so.2 %{_libdir}/libopae-cxx-core.so.%{version} -%{_libdir}/libopae-cxx-core.so.1 +%{_libdir}/libopae-cxx-core.so.2 %{_libdir}/libopae-c++-utils.so.%{version} -%{_libdir}/libopae-c++-utils.so.1 +%{_libdir}/libopae-c++-utils.so.2 %{_libdir}/libopae-c++-nlb.so.%{version} -%{_libdir}/libopae-c++-nlb.so.1 +%{_libdir}/libopae-c++-nlb.so.2 %files devel @@ -248,14 +263,36 @@ popd %{_bindir}/fpga_dma_N3000_test %{_bindir}/fpga_dma_test %{_bindir}/PACSign +%{_bindir}/fpgad +/etc/opae/fpgad.cfg +/etc/sysconfig/fpgad.conf +%{_libdir}/libfpgad-api.so* +%{_libdir}/opae/libfpgad-vc.so* +/usr/lib/systemd/system/fpgad.service +%{_bindir}/eth_group_mdev.sh + %{_usr}/share/opae/* /usr/lib/python* %{_datadir}/doc/opae.admin/LICENSE -%{_libdir}/python* + %changelog +* Thu Sep 17 2020 Ananda Ravuri 2.0.0-1 +- Various Static code scan bug fixes +- Added support to FPGA Linux kernel Device Feature List (DFL) driver. +- Added support to PAC card N3000 series. +- Added PACSign, bitstream_info, fpgasudpate, rsu, fpgaotsu, fpgaport python tools. +- Added ethernet tools for PAC card N3000. +- Various bug fixes +- Various memory leak fixes. +- Various Static code scan bug fixes +- Added python3 support. +- OPAE USMG API are deprecated. +- Updated OPAE documentation. + + * Tue Dec 17 2019 Korde Nakul 1.4.0-1 - Added support to FPGA Linux kernel Device Feature List (DFL) driver patch set2. - Increased test cases and test coverage diff --git a/opae.spec.in b/opae.spec.in index 32547f683e42..00e87d488796 100644 --- a/opae.spec.in +++ b/opae.spec.in @@ -106,6 +106,7 @@ popd pushd @CMAKE_SOURCE_DIR@/tools/extra/fpgadiag/ +%{__python3} setup.py build_ext --include-dirs=@pybind11_ROOT@/include %{__python3} setup.py build popd @@ -132,6 +133,8 @@ pushd @CMAKE_SOURCE_DIR@/tools/extra/fpgadiag/ %{__python3} setup.py install --single-version-externally-managed -O@CPACK_PACKAGE_RELEASE@ --root=$RPM_BUILD_ROOT --record=$prev/INSTALLED_FPGADIAG_FILES popd +install -m 755 @CMAKE_SOURCE_DIR@/scripts/eth_group_mdev.sh %{buildroot}/usr/bin/eth_group_mdev.sh + %clean @@ -242,11 +245,13 @@ ldconfig @CMAKE_INSTALL_PREFIX@/@OPAE_LIB_INSTALL_DIR@/libhssi* @CMAKE_INSTALL_PREFIX@/@OPAE_LIB_INSTALL_DIR@/libopae-c++-nlb.so* @CMAKE_INSTALL_PREFIX@/@OPAE_LIB_INSTALL_DIR@/libopae-c++-utils.so* +@CMAKE_INSTALL_PREFIX@/bin/eth_group_mdev.sh %dir @CMAKE_INSTALL_PREFIX@/share/opae %dir @CMAKE_INSTALL_PREFIX@/share/opae/python/ %dir @CMAKE_INSTALL_PREFIX@/share/opae/python/* @CMAKE_INSTALL_PREFIX@/share/opae/python/* + %if %with_ase == "ON" %files ase %license @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DOCDIR@/LICENSE diff --git a/samples/hssi/hssi.cpp b/samples/hssi/hssi.cpp index 37c6bbf4ad1a..0b1bc8c2636d 100644 --- a/samples/hssi/hssi.cpp +++ b/samples/hssi/hssi.cpp @@ -44,8 +44,14 @@ void sig_handler(int signum) int main(int argc, char *argv[]) { + int res = 1; signal(SIGINT, sig_handler); app.register_command(); app.register_command(); - return app.main(argc, argv); + try { + res = app.main(argc, argv); + } catch (std::runtime_error &e) { + std::cerr << e.what() << std::endl; + } + return res; } diff --git a/samples/hssi/hssi_afu.h b/samples/hssi/hssi_afu.h index 618936b448ec..1c060207df36 100644 --- a/samples/hssi/hssi_afu.h +++ b/samples/hssi/hssi_afu.h @@ -99,7 +99,7 @@ class hssi_afu : public test_afu { uint64_t val; struct timespec ts; uint64_t ticks; - const uint64_t max_ticks = 1000ULL; + const uint64_t max_ticks = 10000ULL; val = (((uint64_t)data) << WRITE_DATA_SHIFT); *((volatile uint64_t *)(mmio_base + TRAFFIC_CTRL_DATA)) = val; @@ -117,8 +117,11 @@ class hssi_afu : public test_afu { break; if (nanosleep(&ts, NULL) != -1 && ticks != NO_TIMEOUT) { - if (!ticks) - throw std::runtime_error("mbox_write timed out [a]"); + if (!ticks) { + const char *msg = "mbox_write timed out [a]"; + std::cerr << msg << std::endl; + throw std::runtime_error(msg); + } --ticks; } } while (!(val & ACK_TRANS)); @@ -132,8 +135,11 @@ class hssi_afu : public test_afu { break; if (nanosleep(&ts, NULL) != -1 && ticks != NO_TIMEOUT) { - if (!ticks) - throw std::runtime_error("mbox_write timed out [b]"); + if (!ticks) { + const char *msg = "mbox_write timed out [b]"; + std::cerr << msg << std::endl; + throw std::runtime_error(msg); + } --ticks; } } while (val & ACK_TRANS); @@ -147,7 +153,7 @@ class hssi_afu : public test_afu { uint64_t val; struct timespec ts; uint64_t ticks; - const uint64_t max_ticks = 1000ULL; + const uint64_t max_ticks = 10000ULL; val = (((uint64_t)offset) << AFU_CMD_SHIFT) | READ_CMD; *((volatile uint64_t *)(mmio_base + TRAFFIC_CTRL_CMD)) = val; @@ -162,8 +168,11 @@ class hssi_afu : public test_afu { break; if (nanosleep(&ts, NULL) != -1 && ticks != NO_TIMEOUT) { - if (!ticks) - throw std::runtime_error("mbox_read timed out [a]"); + if (!ticks) { + const char *msg = "mbox_read timed out [a]"; + std::cerr << msg << std::endl; + throw std::runtime_error(msg); + } --ticks; } } while (!(val & ACK_TRANS)); @@ -180,8 +189,11 @@ class hssi_afu : public test_afu { break; if (nanosleep(&ts, NULL) != -1 && ticks != NO_TIMEOUT) { - if (!ticks) - throw std::runtime_error("mbox_read timed out [b]"); + if (!ticks) { + const char *msg = "mbox_read timed out [b]"; + std::cerr << msg << std::endl; + throw std::runtime_error(msg); + } --ticks; } } while (val & ACK_TRANS); diff --git a/scripts/create-rpms.sh b/scripts/create-rpms.sh index 53fbda1dab33..b336f90d3eda 100755 --- a/scripts/create-rpms.sh +++ b/scripts/create-rpms.sh @@ -22,6 +22,13 @@ BUILD_DIR=${PWD} echo ${PWD} +cd .. +rm -rf _build +mkdir _build +cd _build +cmake .. -DOPAE_BUILD_LEGACY=ON -DOPAE_BUILD_TESTS=ON + + cd ../.. tar --transform='s/opae-sdk/opae/' \ --exclude=.git \ @@ -31,12 +38,14 @@ tar --transform='s/opae-sdk/opae/' \ --exclude=opae.spec.in \ --exclude=opae.spec \ --exclude=opae-libs/external \ - --exclude=opae-libs/tests \ --exclude=opae-libs/plugins/ase \ --exclude=opae-libs/cmake/config/libopae-all.spec.in \ --exclude=opae-libs/cmake/config/run_coverage_test.sh.in \ --exclude=opae-libs/cmake/config/run_coverage_test_local.sh.in\ - --exclude=external \ + --exclude=external/opae-legacy/tests \ + --exclude=external/opae-legacy/scripts \ + --exclude=external/opae-legacy/tools/coreidle \ + --exclude=external/opae-legacy/tools/hssi \ --exclude=platforms \ --exclude=samples/base \ --exclude=samples/hello_afu \ @@ -44,8 +53,25 @@ tar --transform='s/opae-sdk/opae/' \ --exclude=samples/hello_mpf_afu \ --exclude=samples/intg_xeon_nlb \ --exclude=samples/base \ - --exclude=scripts \ - --exclude=tests \ + --exclude=scripts/build-documentation.sh \ + --exclude=scripts/build-pypi.sh \ + --exclude=scripts/build-tests-default.sh \ + --exclude=scripts/coverage-gtapi-mock-drv.sh \ + --exclude=scripts/cover-ase.sh \ + --exclude=scripts/cover-py.sh \ + --exclude=scripts/cover.sh \ + --exclude=scripts/create-rpms.sh \ + --exclude=scripts/docker_rpm.sh \ + --exclude=scripts/index_generator.py \ + --exclude=scripts/test-build.sh \ + --exclude=scripts/test-codingstyle-all.sh \ + --exclude=scripts/test-codingstyle-cpp.sh \ + --exclude=scripts/test-gtapi-mock-drv.sh \ + --exclude=scripts/unit-tests.sh \ + --exclude=scripts/valgrind \ + --exclude=scripts/.gitignore \ + --exclude=scripts/bat \ + --exclude=scripts/push-documentation.sh \ --exclude=tools/extra/ras \ --exclude=tools/extra/pac_hssi_config \ --exclude=tools/extra/pyfpgadiag \ diff --git a/tools/extra/fpgabist/CMakeLists.txt b/tools/extra/fpgabist/CMakeLists.txt index 3733d37a1407..0baf7749eb41 100644 --- a/tools/extra/fpgabist/CMakeLists.txt +++ b/tools/extra/fpgabist/CMakeLists.txt @@ -40,11 +40,11 @@ set(PYTHON_SRC if(TBB_FOUND) add_subdirectory(dma) + add_subdirectory(dma_N3000) else(TBB_FOUND) message(WARNING "Thread Building Blocks not found: not building fpgabist/dma.") endif(TBB_FOUND) -add_subdirectory(dma_N3000) add_subdirectory(bist) install(PROGRAMS ${PYTHON_SRC} diff --git a/tools/extra/fpgabist/dma/fpga_dma_test.cpp b/tools/extra/fpgabist/dma/fpga_dma_test.cpp index 29ae1e623275..87270f4be519 100755 --- a/tools/extra/fpgabist/dma/fpga_dma_test.cpp +++ b/tools/extra/fpgabist/dma/fpga_dma_test.cpp @@ -163,6 +163,11 @@ static void parse_args(struct config *config, int argc, char *argv[]) fprintf(stderr, "Minimum data size must be %d bytes\n", MIN_PAYLOAD_LEN); printUsage(); } + if (config->data_size > MAX_PAYLOAD_LEN) { + fprintf(stderr, "maximum allowable size: %d bytes\n", MAX_PAYLOAD_LEN); + printUsage(); + } + debug_print("data_size = %ld bytes\n", config->data_size); break; diff --git a/tools/extra/fpgabist/dma/fpga_dma_test_utils.h b/tools/extra/fpgabist/dma/fpga_dma_test_utils.h index 0ea46a2639b8..efdd23947d01 100755 --- a/tools/extra/fpgabist/dma/fpga_dma_test_utils.h +++ b/tools/extra/fpgabist/dma/fpga_dma_test_utils.h @@ -53,6 +53,7 @@ // No. of Patterns #define PATTERN_LENGTH 32 #define MIN_PAYLOAD_LEN 64 +#define MAX_PAYLOAD_LEN 4 * 1024U * 1024U * 1024U #define MAX_DECIM_FACTOR (0xFFFF) #define CONFIG_UNINIT (0) #define BEAT_SIZE (64) // bytes diff --git a/tools/extra/fpgadiag/common.py b/tools/extra/fpgadiag/common.py index 9581a727a6aa..bdf1f4b6eb59 100755 --- a/tools/extra/fpgadiag/common.py +++ b/tools/extra/fpgadiag/common.py @@ -133,7 +133,7 @@ def find_eth_group(self, root): one, group_id = os.path.split(regex.findall(path)[0]) fpga_path = glob.glob(os.path.join( root, - 'dfl-fme*/dfl-fme*/', + 'dfl**/dfl*/', guid)) if len(fpga_path) == 0: continue @@ -170,12 +170,6 @@ def eth_group_info(self, eth_grps): ret = eth_group_inst.eth_group_open(int(values[0]), values[1]) if ret != 0: return None - print("direction:", eth_group_inst.direction) - print("speed :", eth_group_inst.speed) - print("phy_num :", eth_group_inst.direction) - print("group_id :", eth_group_inst.direction) - print("df_id :", eth_group_inst.df_id) - print("eth_lwmac:", eth_group_inst.eth_lwmac) self.mac_lightweight \ = \ self.mac_lightweight \ diff --git a/tools/extra/fpgadiag/fpgalpbk.py b/tools/extra/fpgadiag/fpgalpbk.py index de276d6da9b5..f0dc25b5bc1b 100755 --- a/tools/extra/fpgadiag/fpgalpbk.py +++ b/tools/extra/fpgadiag/fpgalpbk.py @@ -290,7 +290,6 @@ def main(): args.fpga_root = devs[0].get('path') args.eth_grps = f.find_eth_group(args.fpga_root) - print("args.eth_grps", args.eth_grps) if len(args.eth_grps) == 0: exception_quit("Invalid Eth group MDEV") diff --git a/tools/extra/fpgadiag/fpgastats.py b/tools/extra/fpgadiag/fpgastats.py index 4ec237117142..3218cda71655 100755 --- a/tools/extra/fpgadiag/fpgastats.py +++ b/tools/extra/fpgadiag/fpgastats.py @@ -369,9 +369,9 @@ def eth_group_start(self): def eth_stats(self): eth_paths = glob.glob(os.path.join(self.fpga_root, - 'dfl-fme*/dfl-fme*/net/*')) + 'dfl*/dfl*/net/*')) for filepath in glob.glob(os.path.join(self.fpga_root, - 'dfl-fme*/dfl-fme*/net/*')): + 'dfl*/dfl*/net/*')): print(filepath) eth_name = filepath.split("/net/") print("------------------------------") @@ -422,7 +422,7 @@ def main(): args.sbdf = '{segment:04x}:{bus:02x}:{dev:02x}.{func:x}'.format(**devs[0]) bitstream_id_path = f.find_node(devs[0].get('path'), - 'dfl-fme*/bitstream_id', depth=1) + 'dfl*/bitstream_id', depth=1) with open(bitstream_id_path[0], 'r') as fd: bitstream_id = fd.read().strip() args.build_flags = (int(bitstream_id, 16) >> 24) & 0xff diff --git a/tools/extra/fpgadiag/mactest.py b/tools/extra/fpgadiag/mactest.py index 85fd5cf528bf..15d7bff31105 100755 --- a/tools/extra/fpgadiag/mactest.py +++ b/tools/extra/fpgadiag/mactest.py @@ -176,14 +176,14 @@ def main(): 'bitstream_id', depth=3) mac_addrs = glob.glob(os.path.join(devs[0].get('path'), - 'dfl-fme*', 'dfl-fme*', '*spi*', + 'dfl-fme*', 'dfl*', '*spi*', 'spi_master', 'spi*', 'spi*', 'mac_address')) args.mac_addr = None if len(mac_addrs) > 0: args.mac_addr = mac_addrs[0] mac_cnts = glob.glob(os.path.join(devs[0].get('path'), - 'dfl-fme*', 'dfl-fme*', '*spi*', + 'dfl-fme*', 'dfl*', '*spi*', 'spi_master', 'spi*', 'spi*', 'mac_count')) args.mac_cnt = None