-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ofs.uio: add markdown document #2787
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: anandaravuri <ananda.ravuri@intel.com>
Pull Request Test Coverage Report for Build 3760318500
💛 - Coveralls |
tswhison
reviewed
Dec 15, 2022
Signed-off-by: anandaravuri <ananda.ravuri@intel.com>
tswhison
approved these changes
Dec 22, 2022
anandaravuri
added a commit
that referenced
this pull request
Dec 27, 2022
* opaevfio, opae.io: bind vfio-pci driver to single PF instead of all PFs This commit has been tested on an Intel C6100 ADP. Signed-off-by: Peter Colberg <peter.colberg@intel.com> * Host Exerciser: Add support support max 4k vectors and remove hardco… (#2726) * Host Exerciser: Add support support max 4k vectors and remove hardcode vector number Read the VFIO Number of interrupts are supported on that function instead of having it hardcoded as currently Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Host Exerciser: fix typo Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Merge feature/config file to master (#2728) Adds the config file parsing code for libopae-c, fpgainfo, and fpgad to the libopae-c build. Add "mcp" configuration to opae.cfg, as it still persists in libopae-c's default device table. refactor fpgad to use the one opae.cfg file API. Remove fpgad.cfg from the installed files lists in packaging. Print the loaded config tables in libopae-c and fpgad for debug builds. Refactor fpgainfo so that it acquires its platform_data_table via the common config file parsing code. Add a check for LIBOPAE_CFGFILE as the first possibility in opae_find_cfg_file() in support of non-standard environments. Implement new opae.admin.config module which loads and parses configuration data for rsu.py and fpgareg.py at module load time. Implement new module opae.io.config to parse and create internal config data for opae.io. Integrate that new module with opae.io's ls command. Query the value of $HOME and search in the home config file locations relative to that path before trying the password database's version of the home directory. This should more closely match the use of pathlib in the Python search code. libopae-v.so uses the same configuration table format as libopae-c. Unlike libopae-c.so, the libopae-v.so plugin does not modify the config data table (and it doesn't use the fields that libopae-c modifies). With this in mind, it is ok for the two libraries to share the same (if only the default) version of the config data table without conflict. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Revert "opaevfio, opae.io: bind vfio-pci driver to single PF instead of all PFs" (#2730) This reverts commit b49bc0e. * packaging: add opae.cfg to DEB package (#2731) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * config: use fpga_default_sequences key in rsu (#2734) Some of the "rsu" entries in the config file had "configuration" instead of "fpga_default_sequences". Change them to "fpga_default_sequences" to match the parsing code. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * scripts: add opae-clean.py (#2740) Add utility script opae-clean.py to aid in scrubbing systems when a local install from source is present. A common issue encountered with local installs from source is that cleaning a system of installed artifacts is nearly impossible once the source/build tree has been removed. Using opae-clean.py, particularly with the --deep flag can help remedy this situation. The script can be run from any directory, so long as the relative positions to the project files are unchanged. For RedHat-based installs, the script scans opae.spec.fedora in the root of the git tree. For Debian-based installs, packages/opae/deb/*.(install|dirs) are used. A typical usage is to run the script without parameters, or with the --deep parameter. The script will report what files and directories it thinks are likely candidates to scrub; but at this point, nothing will be removed. After you have carefully examined the list of files and directories reported, the script can be re-executed with the -D switch to remove the target files and directories (given that sufficient privilege is held to do so). Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * config: change 1c2c:1001 to N5011 PF (#2742) The previous implementation erroneously treated 1001 as the n5010 VF. Also, removes default fpga boot sequence treatment from n5010 (and 5011), based on feedback from Silicom. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * vabtool: remove PR_AUTH_CERT from SR provisioning (#2744) Based on feedback, it is unnecessary/undesirable to require the PR_AUTH_CERT during SR programming. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: remove unused source file init_ase.c (#2745) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * unit tests: address nightly unit test failures (#2746) These test cases were erroneously calling functions without a prior call to opae_ioctl_initialize(). This resulted in a NULL check failure and a subsequent FPGA_EXCEPTION. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ase: add hook to enable ASE with new config format (#2747) (re)-enables ASE as of the new config file format. Hook to allow enumerating the ASE device when WITH_ASE is set in the environment. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * pluginmgr: remove invalid test case (#2749) Remove invalid test free_adapter_err0. The test case was dependent on dlclose() behaving nicely when a dl handle was double-freed. This depedency proved false during nightly regression, where it caused a seg fault. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: add back opae_plugin_mgr_register_plugin() (#2752) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: avoid stack-based strings / add tests (#2754) opae_plugin_mgr_alloc_adapter() was saving the value of its lib_path parameter directly in the adapter. This could lead to problems if, for example opae_plugin_mgr_register_plugin() were to pass through a stack-based path. The fix involves using strdup() and free() in the alloc and free adapter calls. With the string fix in place, we add a check to opae_plugin_mgr_register_adapter() to prevent duplicate entries in the list. This could happen when, eg ASE loads via opae_plugin_mgr_register_plugin() but is also present in the configuration file passed to fpgaInitialize(). Duplicate adapter entries would mean duplicate tokens during enumeration. The uniqueness check guarantees that we won't duplicate any tokens. Add unit tests for opae_plugin_mgr_register_plugin(). Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * user clk: read user clock dfh revision from uio driver (#2741) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * build: bump minimum Linux kernel headers version to 5.4 opae-sdk requires [1] IOVA range capability support [2] added in Linux 5.4. [1] 1a8079e [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a717072007e8aedd3f951726d8cf55454860b30d * deb packaging: remove explicit .so dependencies (#2758) Remove explicit mentions of .so deps from the control file and let ${shlibs:Depends} do its thing. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Detect ASE in host_exerciser to adjust timeout for simulation (#2759) * opaevfio, opae.io: use driver_override to bind vfio-pci driver This commit has been tested on an Intel C6100 ADP. Bump versions to opae.io 0.2.5 and opaevfio 1.0.3. Replaces #2721 Closes #2729 See DPDK/dpdk@2fc3502 Reported-by: Roger Christensen <rc@silicom.dk> Signed-off-by: Peter Colberg <peter.colberg@intel.com> * packaging: rhel: fix RHEL rpm creation (#2760) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com> * hssi 100g: default to port 0 when no option given (#2761) Fixes a segfault observed when --port was missing from the command line. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Add support for Silicom N5013 and N5014 cards, while keep using the generic N5010 for all Signed-off-by: Roger Christensen <rc@silicom.dk> * fpgainfo: add N5014 and N5013 serial number to board info * sim: changes to support ASE for OpenCL MMD. (#2751) * ase: add VF device when WITH_ASE present. Michael mentioned some ASE test cases that require the DID to be 0x0a5e. We'll change the DID of the VF0 back to 0x0a5e, and we'll make the subsystem device id 0x0a5f for the VF0. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * vabtool: add markdown document (#2764) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * docs: add vabtool to docs build (#2765) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae: bump revision to 2.3.0 (#2770) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Fix fpgainfo events power on time stamp (#2771) * Fix fpgainfo events power on time stamp SW should use the information in block with magic number '0x53696CF0' to derive power on event time stamp, and not the timestamp field of magic number ' 0x53696C12'. Power on status is logged immediately after power on. Time of the day information is written by SW into a BMC register. This write will take some time after power on and hence with Power on log there is no timestamp value available. Because of this reason, second block 'time of the day offset' (block with magic number '0x53696CF0' ) is provided from BMC. BMC internally keeps track of time lapse after the power on and first ToD write by Host and provides the correct value by reverse calculation. Please use this information to print the power on status time Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Add support for Alibaba F5 cards. (#2769) Signed-off-by: richard.li <richard.li@linux.alibaba.com> * Stop generating files with logs from host_exerciser (#2773) The afu_test C++ infrastructure, used by host_exerciser, was logging both to the console and to a separate log file. Leaving files in the working directory every time host_exerciser is run is messy. Stop generating the files. When a log is needed, users can pipe output to a file or use tee. * build: add CMAKE_INSTALL_PREFIX length check (#2774) Linux mandates a limit on the length of a command that may appear in the "shebang" line of a script. In our internal environments, this limit has been exceeded, causing ill-behaved builds. Fail the build if the length of CMAKE_INSTALL_PREFIX exceeds the 127 character limit. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * CODEOWNERS: transition from OPAE to OFS teams Signed-off-by: Peter Colberg <peter.colberg@intel.com> * Fix fpgainfo events time span power on time stamp (#2779) SW should use the information in block with magic number '0x53696CF0' to derive power on event time stamp, and not the timestamp field of magic number ' 0x53696C12'. Power on status is logged immediately after power on. Time of the day information is written by SW into a BMC register. This write will take some time after power on and hence with Power on log there is no timestamp value available. Because of this reason, second block 'time of the day offset' (block with magic number '0x53696CF0' ) is provided from BMC. BMC internally keeps track of time lapse after the power on and first ToD write by Host and provides the correct value by reverse calculation. Please use this information to print the power on status time Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * ci: remove update-repo workflow This prepares the archival of the opae-libs repository which is no longer used. Signed-off-by: Peter Colberg <peter.colberg@intel.com> * ci: update python versions (#2783) * ci: update python versions - Remove Python 3.6, 3.7 and add 3.10,3.11 to versions to use for static analysis. * ci: update python verion in single quotes * ci: update pyhton verion in pacsign, python analysis yml files Signed-off-by: lab <ananda.ravuri@intel.com> Signed-off-by: lab <ananda.ravuri@intel.com> * C++ style: don't change code in the working tree (#2785) Use --dry-run so that no code is changed, -Werror so that the process exit code is non-zero when a style violation is detected. Check the process exit code to determine pass/fail. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * add support to uiox as input string to opaeuio, read8/16, write8/16 t… (#2784) * add support to uiox as input string to opaeuio, read8/16, write8/16 to pyopaeuio - add support to uiox input string to opaeuio open function users can pass dfl_dev.x or uiox to open function - add read8/16, write8/16, get size function to pyopaeuio Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * Add ofs.uio tool to peek, poke, mailbox read/write/dump dfl uio csr r… (#2782) * Add ofs.uio tool to peek, poke, mailbox read/write/dump dfl uio csr region - Enumerates fpga deive , dfl feature id and dfl uio devices - Opens UIO device, MMAP’s memory and access registers - Tool supports command line options peek, poke, mailbox read/write/dump uio registers. - User can read/write 8,16,32,64 bit field registers. usage: ofs.uio.py [-h] [--pcie-address PCIE_ADDRESS] [--uio uio] [--feature-id FEATURE_ID] [--region-index REGION_INDEX] [--mailbox-cmdcsr offset] [--bit-size {8,16,32,64}] [--peek offset] [--poke POKE POKE] [--mailbox-read offset] [--mailbox-dump MAILBOX_DUMP MAILBOX_DUMP] [--mailbox-write MAILBOX_WRITE MAILBOX_WRITE] optional arguments: -h, --help show this help message and exit --pcie-address PCIE_ADDRESS, -P PCIE_ADDRESS sbdf of device to program (e.g. 0000:04:00.0). Optional when one device in system. --uio uio uio dev name (e.g.--uio uio0 --peek 0x8 ) --feature-id FEATURE_ID, -f FEATURE_ID DFL UIO Feature id (e.g.--feature-id 0x20 --peek 0x8 ) --region-index REGION_INDEX, -r REGION_INDEX dfl uio region index (e.g.--uio uio0 --region-index 0x0 --peek 0x8 ). (e.g.--uio uio0 --region-index 0x1 --poke 0x8 0x123) --mailbox-cmdcsr offset Mailbox command CSR offset (e.g.--mailbox-cmdcsr 0x40 --mailbox-read 0x8 ). (e.g.--mailbox-cmdcsr 0x40 --mailbox- write 0x8 0x123) --bit-size {8,16,32,64}, -b {8,16,32,64} peek/poke bit field size (e.g.--bit-size 64 --peek 0x8). (e.g.--bit-size 32 --poke 0x8 0xabc) --peek offset Peek CSR offset (e.g.--peek 0x8). --poke POKE POKE Poke CSR offset value (e.g.--poke 0x8 0xabcd). --mailbox-read offset Read Mailbox CSR address (e.g.--mailbox-read 0x8). --mailbox-dump MAILBOX_DUMP MAILBOX_DUMP Reads Mailbox CSR start address size (e.g.--mailbox-dump 0x0 0x20). --mailbox-write MAILBOX_WRITE MAILBOX_WRITE Write Mailbox CSR address Value (e.g.--mailbox-write 0x8 0x1234). Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * rename ofs.uio.py to ofs_uio.py and fix sig fault (#2786) - install opae packages, ofs.uo runtime python search in wrong dist-packages folders python interprets uio.ofs.uio:main as uio/ofs/uio.py :main in setup.py rename ofs.uio.py to ofs_uio.py python interprets uio.ofs_uio:main as uio/ofs_uio.py :main in setup.py - user calls pyopae_uio close() without open() cause sigfault. memset struct opae_uio to zero in pyopaeui.h Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * libopaeuio: fix issue id'd by static analysis (#2788) Also, fix an exposed test issue: If treating the return value from opae_uio_open() as an fpga_result, the tests should not check for specific values, eg FPGA_NOT_FOUND. They should only check for inequality against FPGA_OK. EXPECT_EQ(..., FPGA_NOT_FOUND) -> EXPECT_NE(..., FPGA_OK) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix fedora spec file, remove ofs.uio from rhel spec file (#2789) - fix fedora spec file - remove ofs.uio from rhel spec file because of rhel doesn't support pyopeauio Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Fix ofs.uio error message for Multiple FPGAs and duplicate feature ids (#2790) * Fix ofs.uio error message for Multiple FPGAs and duplicate feature ids - fix uiox regular expression - update error strings - ofs.uio error shows message if finds Multiple FPGAs and feature ids Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Updating fedora35 build to create new RPMs (#2791) * Updating fedora35 build to create new RPMs * Add fedora36 RPM build Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: remove old fedora31, fedora32, fedora33 jobs (#2792) * Disable centos7.6 job Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: add .deb build job (#2793) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to actions/checkout@v3 (#2794) github will be deprecating node12-based actions by summer of 2023. checkout@v3 is developed for node16. https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to action/upload-artifact@v3 (#2795) Updating to the node16 version of this, per the following deprecation notice: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: don't use mstksg/get-package; it is deprecated (#2796) * Run clang-format on pyopaeuio.cpp Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: upgrade to actions/setup-python@v4 (#2797) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to lycheeverse/lychee-action@v1 (#2798) Use lychee instead of peter-evans/link-checker, which is deprecated. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ofs.uio: add markdown document (#2787) * ofs.uio: add markdown document Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * change version to 2.2.0 Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: Peter Colberg <peter.colberg@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Signed-off-by: Roger Christensen <rc@silicom.dk> Signed-off-by: richard.li <richard.li@linux.alibaba.com> Signed-off-by: lab <ananda.ravuri@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> Co-authored-by: Michael Adler <Michael.Adler@intel.com> Co-authored-by: Roger Christensen <rc@silicom.dk> Co-authored-by: richardli001 <116872219+richardli001@users.noreply.github.com>
anandaravuri
added a commit
that referenced
this pull request
Jan 19, 2023
* opaevfio, opae.io: bind vfio-pci driver to single PF instead of all PFs This commit has been tested on an Intel C6100 ADP. Signed-off-by: Peter Colberg <peter.colberg@intel.com> * Host Exerciser: Add support support max 4k vectors and remove hardco… (#2726) * Host Exerciser: Add support support max 4k vectors and remove hardcode vector number Read the VFIO Number of interrupts are supported on that function instead of having it hardcoded as currently Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Host Exerciser: fix typo Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Merge feature/config file to master (#2728) Adds the config file parsing code for libopae-c, fpgainfo, and fpgad to the libopae-c build. Add "mcp" configuration to opae.cfg, as it still persists in libopae-c's default device table. refactor fpgad to use the one opae.cfg file API. Remove fpgad.cfg from the installed files lists in packaging. Print the loaded config tables in libopae-c and fpgad for debug builds. Refactor fpgainfo so that it acquires its platform_data_table via the common config file parsing code. Add a check for LIBOPAE_CFGFILE as the first possibility in opae_find_cfg_file() in support of non-standard environments. Implement new opae.admin.config module which loads and parses configuration data for rsu.py and fpgareg.py at module load time. Implement new module opae.io.config to parse and create internal config data for opae.io. Integrate that new module with opae.io's ls command. Query the value of $HOME and search in the home config file locations relative to that path before trying the password database's version of the home directory. This should more closely match the use of pathlib in the Python search code. libopae-v.so uses the same configuration table format as libopae-c. Unlike libopae-c.so, the libopae-v.so plugin does not modify the config data table (and it doesn't use the fields that libopae-c modifies). With this in mind, it is ok for the two libraries to share the same (if only the default) version of the config data table without conflict. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Revert "opaevfio, opae.io: bind vfio-pci driver to single PF instead of all PFs" (#2730) This reverts commit b49bc0e. * packaging: add opae.cfg to DEB package (#2731) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * config: use fpga_default_sequences key in rsu (#2734) Some of the "rsu" entries in the config file had "configuration" instead of "fpga_default_sequences". Change them to "fpga_default_sequences" to match the parsing code. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * scripts: add opae-clean.py (#2740) Add utility script opae-clean.py to aid in scrubbing systems when a local install from source is present. A common issue encountered with local installs from source is that cleaning a system of installed artifacts is nearly impossible once the source/build tree has been removed. Using opae-clean.py, particularly with the --deep flag can help remedy this situation. The script can be run from any directory, so long as the relative positions to the project files are unchanged. For RedHat-based installs, the script scans opae.spec.fedora in the root of the git tree. For Debian-based installs, packages/opae/deb/*.(install|dirs) are used. A typical usage is to run the script without parameters, or with the --deep parameter. The script will report what files and directories it thinks are likely candidates to scrub; but at this point, nothing will be removed. After you have carefully examined the list of files and directories reported, the script can be re-executed with the -D switch to remove the target files and directories (given that sufficient privilege is held to do so). Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * config: change 1c2c:1001 to N5011 PF (#2742) The previous implementation erroneously treated 1001 as the n5010 VF. Also, removes default fpga boot sequence treatment from n5010 (and 5011), based on feedback from Silicom. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * vabtool: remove PR_AUTH_CERT from SR provisioning (#2744) Based on feedback, it is unnecessary/undesirable to require the PR_AUTH_CERT during SR programming. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: remove unused source file init_ase.c (#2745) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * unit tests: address nightly unit test failures (#2746) These test cases were erroneously calling functions without a prior call to opae_ioctl_initialize(). This resulted in a NULL check failure and a subsequent FPGA_EXCEPTION. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ase: add hook to enable ASE with new config format (#2747) (re)-enables ASE as of the new config file format. Hook to allow enumerating the ASE device when WITH_ASE is set in the environment. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * pluginmgr: remove invalid test case (#2749) Remove invalid test free_adapter_err0. The test case was dependent on dlclose() behaving nicely when a dl handle was double-freed. This depedency proved false during nightly regression, where it caused a seg fault. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: add back opae_plugin_mgr_register_plugin() (#2752) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-c: avoid stack-based strings / add tests (#2754) opae_plugin_mgr_alloc_adapter() was saving the value of its lib_path parameter directly in the adapter. This could lead to problems if, for example opae_plugin_mgr_register_plugin() were to pass through a stack-based path. The fix involves using strdup() and free() in the alloc and free adapter calls. With the string fix in place, we add a check to opae_plugin_mgr_register_adapter() to prevent duplicate entries in the list. This could happen when, eg ASE loads via opae_plugin_mgr_register_plugin() but is also present in the configuration file passed to fpgaInitialize(). Duplicate adapter entries would mean duplicate tokens during enumeration. The uniqueness check guarantees that we won't duplicate any tokens. Add unit tests for opae_plugin_mgr_register_plugin(). Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * user clk: read user clock dfh revision from uio driver (#2741) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * build: bump minimum Linux kernel headers version to 5.4 opae-sdk requires [1] IOVA range capability support [2] added in Linux 5.4. [1] 1a8079e [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a717072007e8aedd3f951726d8cf55454860b30d * deb packaging: remove explicit .so dependencies (#2758) Remove explicit mentions of .so deps from the control file and let ${shlibs:Depends} do its thing. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Detect ASE in host_exerciser to adjust timeout for simulation (#2759) * opaevfio, opae.io: use driver_override to bind vfio-pci driver This commit has been tested on an Intel C6100 ADP. Bump versions to opae.io 0.2.5 and opaevfio 1.0.3. Replaces #2721 Closes #2729 See DPDK/dpdk@2fc3502 Reported-by: Roger Christensen <rc@silicom.dk> Signed-off-by: Peter Colberg <peter.colberg@intel.com> * packaging: rhel: fix RHEL rpm creation (#2760) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com> * hssi 100g: default to port 0 when no option given (#2761) Fixes a segfault observed when --port was missing from the command line. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Add support for Silicom N5013 and N5014 cards, while keep using the generic N5010 for all Signed-off-by: Roger Christensen <rc@silicom.dk> * fpgainfo: add N5014 and N5013 serial number to board info * sim: changes to support ASE for OpenCL MMD. (#2751) * ase: add VF device when WITH_ASE present. Michael mentioned some ASE test cases that require the DID to be 0x0a5e. We'll change the DID of the VF0 back to 0x0a5e, and we'll make the subsystem device id 0x0a5f for the VF0. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * vabtool: add markdown document (#2764) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * docs: add vabtool to docs build (#2765) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae: bump revision to 2.3.0 (#2770) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * Fix fpgainfo events power on time stamp (#2771) * Fix fpgainfo events power on time stamp SW should use the information in block with magic number '0x53696CF0' to derive power on event time stamp, and not the timestamp field of magic number ' 0x53696C12'. Power on status is logged immediately after power on. Time of the day information is written by SW into a BMC register. This write will take some time after power on and hence with Power on log there is no timestamp value available. Because of this reason, second block 'time of the day offset' (block with magic number '0x53696CF0' ) is provided from BMC. BMC internally keeps track of time lapse after the power on and first ToD write by Host and provides the correct value by reverse calculation. Please use this information to print the power on status time Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Add support for Alibaba F5 cards. (#2769) Signed-off-by: richard.li <richard.li@linux.alibaba.com> * Stop generating files with logs from host_exerciser (#2773) The afu_test C++ infrastructure, used by host_exerciser, was logging both to the console and to a separate log file. Leaving files in the working directory every time host_exerciser is run is messy. Stop generating the files. When a log is needed, users can pipe output to a file or use tee. * build: add CMAKE_INSTALL_PREFIX length check (#2774) Linux mandates a limit on the length of a command that may appear in the "shebang" line of a script. In our internal environments, this limit has been exceeded, causing ill-behaved builds. Fail the build if the length of CMAKE_INSTALL_PREFIX exceeds the 127 character limit. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * CODEOWNERS: transition from OPAE to OFS teams Signed-off-by: Peter Colberg <peter.colberg@intel.com> * Fix fpgainfo events time span power on time stamp (#2779) SW should use the information in block with magic number '0x53696CF0' to derive power on event time stamp, and not the timestamp field of magic number ' 0x53696C12'. Power on status is logged immediately after power on. Time of the day information is written by SW into a BMC register. This write will take some time after power on and hence with Power on log there is no timestamp value available. Because of this reason, second block 'time of the day offset' (block with magic number '0x53696CF0' ) is provided from BMC. BMC internally keeps track of time lapse after the power on and first ToD write by Host and provides the correct value by reverse calculation. Please use this information to print the power on status time Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * ci: remove update-repo workflow This prepares the archival of the opae-libs repository which is no longer used. Signed-off-by: Peter Colberg <peter.colberg@intel.com> * ci: update python versions (#2783) * ci: update python versions - Remove Python 3.6, 3.7 and add 3.10,3.11 to versions to use for static analysis. * ci: update python verion in single quotes * ci: update pyhton verion in pacsign, python analysis yml files Signed-off-by: lab <ananda.ravuri@intel.com> Signed-off-by: lab <ananda.ravuri@intel.com> * C++ style: don't change code in the working tree (#2785) Use --dry-run so that no code is changed, -Werror so that the process exit code is non-zero when a style violation is detected. Check the process exit code to determine pass/fail. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * add support to uiox as input string to opaeuio, read8/16, write8/16 t… (#2784) * add support to uiox as input string to opaeuio, read8/16, write8/16 to pyopaeuio - add support to uiox input string to opaeuio open function users can pass dfl_dev.x or uiox to open function - add read8/16, write8/16, get size function to pyopaeuio Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * Add ofs.uio tool to peek, poke, mailbox read/write/dump dfl uio csr r… (#2782) * Add ofs.uio tool to peek, poke, mailbox read/write/dump dfl uio csr region - Enumerates fpga deive , dfl feature id and dfl uio devices - Opens UIO device, MMAP’s memory and access registers - Tool supports command line options peek, poke, mailbox read/write/dump uio registers. - User can read/write 8,16,32,64 bit field registers. usage: ofs.uio.py [-h] [--pcie-address PCIE_ADDRESS] [--uio uio] [--feature-id FEATURE_ID] [--region-index REGION_INDEX] [--mailbox-cmdcsr offset] [--bit-size {8,16,32,64}] [--peek offset] [--poke POKE POKE] [--mailbox-read offset] [--mailbox-dump MAILBOX_DUMP MAILBOX_DUMP] [--mailbox-write MAILBOX_WRITE MAILBOX_WRITE] optional arguments: -h, --help show this help message and exit --pcie-address PCIE_ADDRESS, -P PCIE_ADDRESS sbdf of device to program (e.g. 0000:04:00.0). Optional when one device in system. --uio uio uio dev name (e.g.--uio uio0 --peek 0x8 ) --feature-id FEATURE_ID, -f FEATURE_ID DFL UIO Feature id (e.g.--feature-id 0x20 --peek 0x8 ) --region-index REGION_INDEX, -r REGION_INDEX dfl uio region index (e.g.--uio uio0 --region-index 0x0 --peek 0x8 ). (e.g.--uio uio0 --region-index 0x1 --poke 0x8 0x123) --mailbox-cmdcsr offset Mailbox command CSR offset (e.g.--mailbox-cmdcsr 0x40 --mailbox-read 0x8 ). (e.g.--mailbox-cmdcsr 0x40 --mailbox- write 0x8 0x123) --bit-size {8,16,32,64}, -b {8,16,32,64} peek/poke bit field size (e.g.--bit-size 64 --peek 0x8). (e.g.--bit-size 32 --poke 0x8 0xabc) --peek offset Peek CSR offset (e.g.--peek 0x8). --poke POKE POKE Poke CSR offset value (e.g.--poke 0x8 0xabcd). --mailbox-read offset Read Mailbox CSR address (e.g.--mailbox-read 0x8). --mailbox-dump MAILBOX_DUMP MAILBOX_DUMP Reads Mailbox CSR start address size (e.g.--mailbox-dump 0x0 0x20). --mailbox-write MAILBOX_WRITE MAILBOX_WRITE Write Mailbox CSR address Value (e.g.--mailbox-write 0x8 0x1234). Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * rename ofs.uio.py to ofs_uio.py and fix sig fault (#2786) - install opae packages, ofs.uo runtime python search in wrong dist-packages folders python interprets uio.ofs.uio:main as uio/ofs/uio.py :main in setup.py rename ofs.uio.py to ofs_uio.py python interprets uio.ofs_uio:main as uio/ofs_uio.py :main in setup.py - user calls pyopae_uio close() without open() cause sigfault. memset struct opae_uio to zero in pyopaeui.h Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * libopaeuio: fix issue id'd by static analysis (#2788) Also, fix an exposed test issue: If treating the return value from opae_uio_open() as an fpga_result, the tests should not check for specific values, eg FPGA_NOT_FOUND. They should only check for inequality against FPGA_OK. EXPECT_EQ(..., FPGA_NOT_FOUND) -> EXPECT_NE(..., FPGA_OK) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix fedora spec file, remove ofs.uio from rhel spec file (#2789) - fix fedora spec file - remove ofs.uio from rhel spec file because of rhel doesn't support pyopeauio Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Fix ofs.uio error message for Multiple FPGAs and duplicate feature ids (#2790) * Fix ofs.uio error message for Multiple FPGAs and duplicate feature ids - fix uiox regular expression - update error strings - ofs.uio error shows message if finds Multiple FPGAs and feature ids Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * Updating fedora35 build to create new RPMs (#2791) * Updating fedora35 build to create new RPMs * Add fedora36 RPM build Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: remove old fedora31, fedora32, fedora33 jobs (#2792) * Disable centos7.6 job Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: add .deb build job (#2793) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to actions/checkout@v3 (#2794) github will be deprecating node12-based actions by summer of 2023. checkout@v3 is developed for node16. https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to action/upload-artifact@v3 (#2795) Updating to the node16 version of this, per the following deprecation notice: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: don't use mstksg/get-package; it is deprecated (#2796) * Run clang-format on pyopaeuio.cpp Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: upgrade to actions/setup-python@v4 (#2797) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ci: update to lycheeverse/lychee-action@v1 (#2798) Use lychee instead of peter-evans/link-checker, which is deprecated. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * ofs.uio: add markdown document (#2787) * ofs.uio: add markdown document Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> * fix rhel package create errors (#2800) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * externals: use native cmake support (#2801) * Updates minimum required cmake version to 3.11. * Uses cmake-native FetchContent to load external content, replacing the opae_external_project_add() home brew. * Removes OPAE_PRESERVE_REPOS flag, in favor of cmake flag FETCHCONTENT_FULLY_DISCONNECTED. * Removes OPAEExternal.cmake Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix static code analysis issue (#2802) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * fpgainfo events description to be user friendly and display format (#2806) * fpgainfo events description to be user friendly and display format fpgainfo events -s --bits For example: Power On Code FPGA : 0x2 Power On Code CVL : 0x2 Improved display. Power On Code FPGA : Success (0x2) Power On Code CVL : Success (0x2) Rename Boot0 to Current Boot Boot Index : Power-ON Timestamp : Power-OFF Timestamp ------------------------------------------------------------------ Current Boot - Wed Jan 4 01:25:35 2023 - N/A Boot 1 - Mon Jan 2 20:19:55 2023 - Wed Jan 4 01:25:24 2023 Boot 2 - Mon Jan 2 20:19:04 2023 - Mon Jan 2 20:19:43 2023 Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * cmake: build C/C++ deps from source when not found (#2807) * Use cmake native ExternalProject_Add and FetchContent_MakeAvailable to build 3rd party dependencies from source when they are not found by find_package. * Update cmake_minimum_required(VERSION 3.14), as FetchContent_MakeAvailable was added in 3.14. * Revise cmake finders so that the finder file name matches the search target, eg FindTbb.cmake -> Findtbb.cmake. * Refactor all cmake finders to use the same logic. * Remove external/ directory. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * cmake: gtest .so and include paths fix (#2808) * Force the gtest build to produce shared objects. * Add include paths for static test libs and for dummy_plugin.so. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix rpmlint non-executable-script errors (#2810) * fix rpmlint non-executable-script errors Error: opae-devel.x86_64: E: non-executable-script /usr/lib/opae-2.2.0/modules/OPAEGit.cmake 644 /usr/bin/cmake -P Add execute permissions to .cmake Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * cfg search: log error when "configs" not detected (#2809) * OPAE_ERR() when parsing the config JSON fails to find the "configs" array in order to help detect the case when an old configuration is encountered. * OPAE_DBG() when the ASE configuration file is found. This was already being done for the non-ASE case. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * libofs: correct unit test failures (#2811) From time to time, CI has been failing with one of these two error signatures: libofs.wait_for_eq /home/runner/work/opae-sdk/opae-sdk/tests/libofs/test_libofs.cpp:105: Failure Expected equality of these values: status Which is: 1 0 /home/runner/work/opae-sdk/opae-sdk/tests/libofs/test_libofs.cpp:136: Failure Expected: (delta_usec) < (timeout_usec), actual: 1508 vs 1500 [ RUN ] libofs.wait_for_eq /home/tswhison/persist/opae-sdk/tests/libofs/test_libofs.cpp:105: Failure Expected equality of these values: status Which is: 1 0 /home/tswhison/persist/opae-sdk/tests/libofs/test_libofs.cpp:132: Failure Expected: (delta_usec) < (timeout_usec), actual: 2104 vs 1500 These failures were reproduced using --gtest_shuffle and --gtest_repeat. The failures occurred on the order of 1 in 1000 test runs. After experimenting with the changes in this commit, the failure rate was observed to decrease to 0 in 50,000 iterations. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * build: re-enable parallel builds (#2814) Add the necessary dependencies so that parallel builds work again. Here are some observed data points. There seems to be a point of diminishing returns around -j 8: cmake .. -DCMAKE_BUILD_TYPE=Debug -DOPAE_BUILD_TESTS=ON -DOPAE_ENABLE_MOCK=ON -DOPAE_BUILD_LEGACY=ON make -j 4 5m5.137s make -j 8 4m21.589s make -j 12 5m35.980s make -j 16 6m11.187s Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * install guide: add instrs for modern cmake (#2815) Add instructions for building the latest version of cmake from source. This is required for older distros, eg RHEL8, where the version of cmake in the package manager is < 3.14. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fpgasupdate: break from transferring on error (#2816) Add a check for status.value != 'idle' to the transferring loop. This allows the script to break from the transferring loop when the cancel sysfs node is written externally. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae.admin: don't use pretty_version() for version (#2817) When creating .deb and .rpm packages in CI, pretty_version() was observed to return the version string '1.4.3-'. This was causing setuptools to error out. Just use the hard-coded version to ensure that it's valid. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * build: add deps on gtest imported libraries (#2819) Add the necessary dependencies between libtest_system.so and the gtest libraries in order to support parallel builds. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-v: fix issue found by static analysis (#2822) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * opae-v: fix issue found by static analysis (#2824) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix static code analysis - Uninitialized Variable in Constructor (#2823) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * opae.io: fix static code analysis issue - Null pointer will be dereferenced (#2825) Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * opae vfio : fix static code analysis issue - Memory Leak (#2826) * opae vfio : fix static code analysis issue - Memory Leak Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * fix static code analysis - NULL will be dereferenced (#2820) * fix static code analysis - NULL will be dereferenced -Result of function that may return NULL will be dereferenced Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * remove opae-c-archive static library (#2818) * remove opae-c-archive static library - OPAE-ASE module statically link opae-c-archive static library, - Removed static library from OPAE-SDK , OPAE-ASE module dynamically likes opae-c library Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * remove libopae-c-archive from deb and rhel spec file Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * opae-v: fix lock issue found by static analysis. (#2827) Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * merge master branch into release branch 2.2.0 Signed-off-by: anandaravuri <ananda.ravuri@intel.com> * opae.io: fix static code analysis issue (#2821) * opae.io: fix static code analysis issue Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> * fix merge conflicts Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: Peter Colberg <peter.colberg@intel.com> Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Signed-off-by: Roger Christensen <rc@silicom.dk> Signed-off-by: richard.li <richard.li@linux.alibaba.com> Signed-off-by: lab <ananda.ravuri@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com> Co-authored-by: Tim Whisonant <tim.whisonant@intel.com> Co-authored-by: Michael Adler <Michael.Adler@intel.com> Co-authored-by: Roger Christensen <rc@silicom.dk> Co-authored-by: richardli001 <116872219+richardli001@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: anandaravuri ananda.ravuri@intel.com