-
Notifications
You must be signed in to change notification settings - Fork 86
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
host_exerciser:support no FPGA mgmt PF instances #3108
Conversation
Issue: The host exerciser fails to execute on Devkits if it does not support FPGA management PF. The host exerciser enumerates FME and quits the program if the bitstream does not support it. The I series-DK and F series-DK have multiple host exerciser AFUs on separate PCIe bus, device functions. fix: If the bitstream does not support FME, perform the host exerciser tests and print message. host_exerciser --pci-address 0000:03:00.2 lpbk host_exerciser --pci-address 0000:04:00.2 lpbk opae.io ls [0000:03:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) Signed-off-by: anandaravuri <ananda.ravuri@intel.com>
Pull Request Test Coverage Report for Build 8007037196Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @anandaravuri! A couple of minor comments below:
libraries/afu-test/afu_test.h
Outdated
} | ||
return exit_codes::not_found; | ||
} | ||
logger_->info("Not found FPGA DEVICE"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger_->info("Not found FPGA DEVICE"); | |
logger_->info("no FPGA DEVICE found"); |
to be consistent with the message below.
libraries/afu-test/afu_test.h
Outdated
|
||
if (tokens.size() > 1) { | ||
std::cerr << "more than one DEVICE found matching filter\n"; | ||
std::cout << "more than one FPGA DEVICE found \n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this not use logger_
?
libraries/afu-test/afu_test.h
Outdated
int open_handle(const char *afu_id) { | ||
|
||
if (!enum_fpga_device()) { | ||
std::cout << "Not Found FME device\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will output another error message, which enum_fpga_device()
already does. Why is that needed?
// strange and perhaps unnecessary limitation. Therefore, future work is to | ||
// fix that and clean up the code below. | ||
|
||
if (token_device_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (token_device_) { | |
if (!token_device_) | |
return; |
to avoid one level of indentation below. As a rule of thumb, the happy path of a function should visually flow vertically, early exits horizontally; which makes it easier to reason what the main purpose of a function is (beyond the documentation).
Signed-off-by: anandaravuri <ananda.ravuri@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @anandaravuri!
* host_exerciser:support no FPGA mgmt PF instances Issue: The host exerciser fails to execute on Devkits if it does not support FPGA management PF. The host exerciser enumerates FME and quits the program if the bitstream does not support it. The I series-DK and F series-DK have multiple host exerciser AFUs on separate PCIe bus, device functions. fix: If the bitstream does not support FME, perform the host exerciser tests and print message. host_exerciser --pci-address 0000:03:00.2 lpbk host_exerciser --pci-address 0000:04:00.2 lpbk opae.io ls [0000:03:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) -------- Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com>
* host_exerciser:support no FPGA mgmt PF instances Issue: The host exerciser fails to execute on Devkits if it does not support FPGA management PF. The host exerciser enumerates FME and quits the program if the bitstream does not support it. The I series-DK and F series-DK have multiple host exerciser AFUs on separate PCIe bus, device functions. fix: If the bitstream does not support FME, perform the host exerciser tests and print message. host_exerciser --pci-address 0000:03:00.2 lpbk host_exerciser --pci-address 0000:04:00.2 lpbk opae.io ls [0000:03:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.7] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.5] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.3] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.1] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: None) [0000:04:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.6] (0x8086:0xbccf 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:04:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) [0000:03:00.4] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:04:00.0] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: dfl-pci) [0000:03:00.2] (0x8086:0xbcce 0x8086:0x1771) Intel Acceleration Development Platform N6001 (Driver: vfio-pci) -------- Signed-off-by: anandaravuri <ananda.ravuri@intel.com> Co-authored-by: Peter Colberg <peter.colberg@intel.com>
Issue: The host exerciser fails to execute on Devkits if it does not support FPGA management PF. The host exerciser enumerates FME and quits the program if the bitstream does not support it.
The I series-DK and F series-DK have multiple host exerciser AFUs on separate PCIe bus, device functions.
fix: If the bitstream does not support FME, perform the host exerciser tests and print message.
host_exerciser --pci-address 0000:03:00.2 lpbk
host_exerciser --pci-address 0000:04:00.2 lpbk