OFS / opae-sdk

Open Programmable Acceleration Engine
https://ofs.github.io
BSD 3-Clause "New" or "Revised" License
258 stars 82 forks source link

Fix: use -1 for invalid pasid #3019

Closed tswhison closed 1 year ago

tswhison commented 1 year ago

Description

Don't use 0 to describe an invalid pasid. Valid pasid values are unsigned 20-bit integers. Use (uint32_t)-1 for invalid pasid.

Collateral (docs, reports, design examples, case IDs):

Tests added:

Tests run:

$ python3 >>> import opae.fpga >>> props = opae.fpga.properties(type=opae.fpga.ACCELERATOR) >>> tokens = opae.fpga.enumerate([props]) >>> h = opae.fpga.open(tokens[0]) >>> print(h.bind_sva())

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 6341797212


Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/libopaecxx/src/handle.cpp 5 6 83.33%
<!-- Total: 5 6 83.33% -->
Files with Coverage Reduction New Missed Lines %
binaries/fpgad/monitor_thread.c 1 85.57%
libraries/plugins/xfpga/mmio.c 2 84.72%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 6329920793: 0.06%
Covered Lines: 15768
Relevant Lines: 22972

💛 - Coveralls