Commit Graph

33 Commits

Author SHA1 Message Date
Mikko Ylinen
f145541caf READMEs: use git clone to get the code
go get'ing does not work due to our k8s.io/kubernetes dependency
so guide users to use git clone to get the code.

Fixes: #290

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-02-20 08:04:07 +02:00
Ed Bartosh
20ea365e62
Merge pull request #268 from grahamwhaley/20200117_fpga_readme
fpga: docs: update all the READMEs
2020-02-03 12:52:09 +02:00
Graham Whaley
07e902334f fpga: crio: docs: update README
Update the CRI-O webhook README, adding notes about what it is and
does, and that it is normally installed as part of the device
plugin daemonset.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-01-30 16:19:19 +00:00
Dmitry Rozhkov
456c8f3ff1 fpga: fix stutter reported by golint 2020-01-30 15:17:27 +02:00
Dmitry Rozhkov
7695e450de fpga_crihook: remove unused struct field 2020-01-29 17:17:06 +02:00
Dmitry Rozhkov
3a845cfe15 fpga: rename files to make them linux-only 2020-01-29 17:17:06 +02:00
Ed Bartosh
57b4927eda crihook: simplified NewHookEnv signature 2019-09-16 12:56:35 +03:00
Ed Bartosh
8d21aff5ac crihook: removed unused field 2019-09-16 12:51:50 +03:00
Ed Bartosh
73ac87cd8d crihook; fix forgotten error check 2019-09-16 12:50:29 +03:00
Ed Bartosh
a6b3a217e8 crihook: fix ineffective Errorf call
Returned error instead of calling errors.Errorf with no effect.
2019-09-16 12:49:26 +03:00
Ubuntu
4f28657b6b fpga: fixed documentation and demo 2019-09-10 19:30:20 -05:00
Alexander Kanevskiy
cd263ba287 Update README file for fpga_crihook
Initcontainer is now built in main build process, no need to download
anythin special.

Added note about checking OCI hooks configuration parameter in CRI-O

Fixes: #192
2019-08-25 02:37:07 +03:00
Alexander Kanevskiy
71bb38f496 Implemented native FPGA flashing
Removed dependency to OPAE libraries
2019-08-25 02:37:01 +03:00
Ed Bartosh
de9df8373e fpga_plugin: support in-tree kernel driver
Extended fpga plugin to support both in-tree(DFL) and
out-of-tree (OPAE) kernel drivers.

- fpga_crihook: move JSON parsing to separate functions
- decreased cyclomatic complexity of the CRI hook main() function
- increased readability
- increased test coverage

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2019-08-24 18:27:15 +03:00
Alexander Kanevskiy
186ec6613c FPGA: migrate to ClearLinux environment
- Migrate to OPAE 1.3.2
- Build all the tools from the source
- ignore files in workspace
- minimal fpga_tool utility to check gbs/aocx file parsing and flashing
- implemented kernel IOCTL based flashing of bitstreams
- add PCI and sysfs functions
2019-08-24 02:55:19 +03:00
Alexander Kanevskiy
4dc19851ee Pass correct PCI bus/device/function to fpgaconf
Partially helps with #148
2019-05-29 16:08:52 +03:00
Dmitry Rozhkov
06487dcded crihook: do program multiple devices at once 2018-10-04 10:19:23 +03:00
Dmitry Rozhkov
6ce053a0a6 crihook: drop unused test data 2018-10-04 10:19:23 +03:00
Dmitry Rozhkov
dc21749a83 crihook: optimize regexp application 2018-10-04 10:19:23 +03:00
Ed Bartosh
44fd8aef54 fpga_crihook: use -s fpgaconf option
Different versions of OPAE tool fpgaconf use different command line
options to specify socket number. Latest version uses -S, which CRI-O
hook used so far.

However, fpgaconf in initcontainer comes from older OPAE version, which
uses -s option for the same purpose. This caused fpgaconf and CRI-O hook
to fail with "Invalid cmdline options".

Used 'fpgaconf-wrapper -s' in the CRI-O hook to fix this.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2018-09-05 15:33:42 +03:00
Ed Bartosh
79a0928646 fpga_crihook: use tools installed by initcontainer
intel-fpga-initcontainer installs OPAE and OpenCL tools
into /opt/intel/fpga-sw directory.

Used fpgaconf-wrapper, aocl-wrapper and packager tools by
CRI hook to program OPAE and OpenCL bitstreams.

Added support for OpenCL bitstreams: the hook tries to find
either OPAE or OpenCL bitstream suitable for requested region
and AFU and programs it using OPAE or OpenCL tools.

Fixes #71
2018-09-04 17:18:36 +03:00
Dmitry Rozhkov
eccd70c600 replace glog with simpler home-grown debug logging 2018-08-16 17:40:16 +03:00
Dmitry Rozhkov
2ff6c5929a Use annotated errors for tracing 2018-08-16 17:31:19 +03:00
Ed Bartosh
cf8d6bbc3f fix broken links in the FPGA plugin documentation 2018-08-14 15:00:48 +03:00
Alexander D. Kanevskiy
2a6eda891a
Merge pull request #68 from bart0sh/PR0030-fix-annotation-value
fpga_crihook: fix annotation value
2018-08-08 01:18:18 +03:00
Ed Bartosh
9de82c819f fpga_crihook: fix annotation value
Annotation value has been changed in FPGA plugin code recently.
Updated fpga_crihook to use the same value.
2018-08-07 17:40:16 +03:00
Ed Bartosh
71e8ea471a fpga_crihook: specify socket number when programming device
Added -S <device number> parameter to fpgaconf command line to
ensure usage of allocated device.
2018-08-07 17:32:59 +03:00
MCamp859
a29e04f614 Edits to FPGA readme files for format and text flow.
Signed-off-by: MCamp859 <mary.camp@ptiglobal.net>
2018-07-30 16:13:47 -04:00
Ed Bartosh
b1b2edf1b8 fpga_crihook: check if requested AF is programmed
Check if programmed AF id is equal to the requested AF id
after re-programming a device.
2018-07-18 12:27:45 +03:00
Ed Bartosh
9df1afdf43 fpga_crihook: check if intel annotation is set
Check if container annotation com.intel.fpga.mode is set to
"intel.com/fpga-region". This annotation is set by device plugin.
So, the check should help to filter out unwanted workflow that
device plugin is not aware of.
2018-07-16 16:12:59 +03:00
Ed Bartosh
2f9debe35b fpga_crihook: check if bitstream is already programmed
FPGA device can be already programmed with requested bitstream.
In this case hook should not programm the device again.
2018-07-13 14:16:27 +03:00
Ed Bartosh
69a32df387 fpga_crihook: covered by tests 2018-07-05 13:49:09 +03:00
Ed Bartosh
b4476110f8 implement CRI prestart hook
The hook gets FPGA_REGION and FPGA_BITSTREAM environment variables
defined in a pod spec, finds bitstream file, verifies it and programs
FPGA device with it using fpga-configure tool from OPAE.
2018-07-05 13:49:09 +03:00