Commit Graph

58 Commits

Author SHA1 Message Date
Mikko Ylinen
fe3eaeeb0b qat: drop AppArmor annotations
"unconfined" annotation was needed to get writes to new_id / bind
to succeed on AppArmor enabled OSes.

However, many things have changed:

* new_id should not be used anymore and it was dropped in the plugin.
* QAT initcontainer has assumed the role of HW initialization.
* vfio-pci is the preferred "dpdkDriver" and starting with QAT Gen4, it
is the only available VF driver so unbind isn't necessary.
* k8s AppArmor is "GA" since 1.30 and the annotation is deprecated.

As of now, the initcontainer will take care of binding QAT VFs to vfio-pci
so the plugin does not neeed to set AppArmor at all.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-01-16 13:54:37 +02:00
Hyeongju Johannes Lee
51b7745260 qat, initcontainer: add enablement of auto_reset
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-09-30 16:49:44 -07:00
Mikko Ylinen
5a59385a09 qat: drop c6xxvf from defaults
The devices searched by default are QAT Gen4+ only.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-06-11 07:31:49 +03:00
Hyeongju Johannes Lee
2af37fd4cb qat_dpdk_app: drop generic
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-05-07 20:46:12 +03:00
Tuomas Katila
05bb8ef156 qat: add support for 420xx driver and its devices (4946)
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-05-02 11:36:13 +03:00
hugo-syn
039865aec8
chore: Fix multiple typos (#1653)
* chore: Fix multiple typos

Signed-off-by: hugo-syn <hugo.vincent@synacktiv.com>
2024-01-25 08:18:48 +02:00
Oleg Zhurakivskyy
ab0e8bc146 qat: Add annotation configurability in the operator
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2024-01-09 10:20:16 +02:00
Tuomas Katila
5016f54e47 qat: add support for new capabilities
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-10-13 15:09:57 +03:00
Mikko Ylinen
06f1db9fb8 qat: update README
The documentation needs clarifications to how QAT Gen4 SW differs from
older platfoms:

- only upstream driver is available and due to this, the -mode parameter
  is now deprecated
- the QAT VF services are configurable and thus the resource names
  differ

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-09-15 18:49:52 +03:00
Tuomas Katila
446ab6642f Fix QAT kernel driver links
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-02 12:07:09 +03:00
Hyeongju Johannes Lee
ffc2ce9b3c doc, qat: update document
default qat.conf file does not exist any more. Update it to make
user create own conf file or use --from-literal instead.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-05-17 06:37:20 -07:00
Hyeongju Johannes Lee
cdfc3bb54e increase default maxNumDevices to 64
In case there are more than 32 devices and there is no config set,
all scanned devices have the same service. So, we increase the
default value of maxNumDevices to 64 from 32.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-04-27 13:14:39 -07:00
Hyeongju Johannes Lee
1a41402903 qat init: make conf optional 2023-04-27 12:48:27 -07:00
Mikko Ylinen
934c00f5fc qat: add support for QAT 402xx
Based on
https://lore.kernel.org/linux-crypto/20230303165650.81405-1-damian.muszynski@intel.com/

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-03-09 15:06:30 +02:00
Tuomas Katila
26b8b9bd3d Update README kubectl applies for zsh support
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2022-12-29 12:25:29 +02:00
Mikko Ylinen
10a26b8fd8
Merge pull request #1234 from hj-johannes-lee/qat-cfgServices
qat: add configuration of cfgServices to qat initcontainer
2022-12-13 08:26:13 +02:00
Hyeongju Johannes Lee
a6037eae3c
qat: add configuration of cfgServices to qat initcontainer
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-12-12 21:48:21 +02:00
Mikko Ylinen
06701ab03c qat: minor doc updates
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-12-08 12:17:23 +02:00
Mikko Ylinen
fd1b25b9d4 docs: move away from 01.org doc links
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-10-03 18:22:07 +03:00
Mikko Ylinen
307e960871 docs: fix remaining review comments
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-06 14:28:25 +03:00
Mikko Ylinen
1b3accacc2 docs: rework development guide
Currently, each individual plugin README documents roughly the same
daily development steps to git clone, build, and deploy. Re-purpose
the plugin READMEs more towards cluster admin type of documentation
and start moving all development related documentation to DEVEL.md.

The same is true for e2e testing documentation which is scattered
in places where they don't belong to. Having all day-to-day
development Howtos is good to have in a centralized place.

Finally, the cleanup includes some harmonization to plugins'
table of contents which now follows the pattern:

* [Introduction](#introduction)
(* [Modes and Configuration Options](#modes-and-configuration-options))
* [Installation](#installation)
    (* [Prerequisites](#prerequisites))
    * [Pre-built Images](#pre-built-images)
    * [Verify Plugin Registration](#verify-plugin-registration)
* [Testing and Demos](#testing-and-demos)
    * ...

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-31 20:00:15 +03:00
Mikko Ylinen
8987f1ba53 qat: add support for 401xx devices
QAT_401xx is a derivative of 4xxx. Add support for that device
by including the device IDs (both PF and VF).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-06-02 08:11:39 +03:00
Hyeongju Johannes Lee
d3c8063ff3 qat: implement preferredAllocation policies
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-04-07 14:14:00 +03:00
Tonny Tzeng
bf94f566fd doc: unify test images build with make
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
2022-04-01 15:49:43 +08:00
Mikko Ylinen
1185f2329b crypto-perf: drop SYS_ADMIN capabilities
SYS_ADMIN capabilities are not necessary when using
vfio-pci.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-02-16 11:26:20 +02:00
Mikko Ylinen
b921a4a458 qat: update default flags and deploy without ConfigMap
To make QAT plugin deployment consistent with the other plugins
we update the default flags and deploy without the flag settings
provided by the ConfigMap.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-11-18 14:02:36 +02:00
Mikko Ylinen
9d0d6cbe11 qat: set c6xxvf and 4xxxvf to default devices
The devices enabled by default are different between the
kustomize and operator based deployments.

This change harmonizes the defaults to c6xxvf and 4xxxvf
in both deployment options.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-09-23 10:50:38 +03:00
Li Ning
dcc12d9089 documentation: remove deprecated toc section in README
The 'Verify node kubelet config' content was removed in 6b208f8.

Signed-off-by: Li Ning <ning.a.li@transwarp.io>
2021-09-07 19:38:41 +08:00
Mikko Ylinen
06dbc1331b images: move intel-qat-plugin-kerneldrv to Debian
Also, update the documentation to reflect what is needed to
enable and use '-mode kernel'.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-06-02 13:39:39 +03:00
Mikko Ylinen
c3cf958c85 images: move most plugin images to distroless/static
All but one (VPU) of the published container images can be built with
static binaries which allows us to use distroless/static as the
base image. Moreover, when combined with stripping the plugin binaries,
we can get both build time and image size savings.

This is the part 1 (out of 2) of the rework. Part 2 will finish the
change by making some adjustments to VPU plugin image and moving the
FPGA/SGX/GPU initcontainers to distroless/static too.

Partial: #516

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-05-19 09:44:47 +03:00
DougTW
7153923cfc Edited qat_plugin README
Replaced multiple instances of master with main.
Reworded line 15 "Verify QAT device plugin is registered" removed 'on master'
and corresponding section heading. Related to pr499.

Signed-off-by: DougTW <doug.martin@intel.com>
2021-02-18 13:59:40 +02:00
Ed Bartosh
6b208f8acf documentation: remove kubelet configuration check
Removed device plugin socket check from the documentation as
device plugin support is enabled by default in Kubelet.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-01-12 13:00:20 +02:00
Mikko Ylinen
da4a9fca96 qat: add note about vfio-pci module parameters
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-11 18:48:43 +02:00
Mikko Ylinen
2155a24e73 qat: add new devices and change defaults
The plugin now detects/accepts 4xxx and c4xxx devices too
and defaults to those drivers that are part of Linux mainline.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-17 15:23:00 +02:00
Kevin Putnam
1d149ffee6 Documentation: Fixes broken links and standardizes headers.
Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2020-09-22 08:32:21 -07:00
Dmitry Rozhkov
1b82ab9df6 sync README.md files with the current state of the code
Closes #356
2020-09-16 10:54:39 +03:00
Mikko Ylinen
1cfb849eef qat: update QAT software stack
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-08-12 23:08:59 +03:00
Graham Whaley
f8dbc896a1 devicemanager: qat: use klog for logging and debug
Move the framework, and the qat driver, to use `klog`
for logging and debug.

This has a some noticeable effects:

1) Our default log output gains a bunch of annotation:
From:
    QAT device plugin started in 'dpdk' mode
To:
    I0312 11:51:02.057728    6053 qat_plugin.go:64] QAT device plugin started in 'dpdk' mode

(there is now a command line option to drop those annotations if
necessary).

2) We gain a bunch of command line parameters from klog for controlling log
levels and output. We go from 5 arguments to 17:

---
Usage of ./cmd/qat_plugin/qat_plugin:
  -add_dir_header
        If true, adds the file directory to the header
  -alsologtostderr
        log to standard error as well as files
  -debug
        enable debug output
  -dpdk-driver string
        DPDK Device driver for configuring the QAT device (default "vfio-pci")
  -kernel-vf-drivers string
        Comma separated VF Device Driver of the QuickAssist Devices in the system. Devices supported: DH895xCC,C62x,C3xxx and D15xx (default "dh895xccvf,c6xxvf,c3xxxvf,d15xxvf")
  -log_backtrace_at value
        when logging hits line file:N, emit a stack trace
  -log_dir string
        If non-empty, write log files in this directory
  -log_file string
        If non-empty, use this log file
  -log_file_max_size uint
        Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
  -logtostderr
        log to standard error instead of files (default true)
  -max-num-devices int
        maximum number of QAT devices to be provided to the QuickAssist device plugin (default 32)
  -mode string
        plugin mode which can be either dpdk (default) or kernel (default "dpdk")
  -skip_headers
        If true, avoid header prefixes in the log messages
  -skip_log_headers
        If true, avoid headers when opening log files
  -stderrthreshold value
        logs at or above this threshold go to stderr (default 2)
  -v value
        number for the log level verbosity
  -vmodule value
        comma-separated list of pattern=N settings for file-filtered logging
---

3) Our `-debug` flag is now replaced by the `klog` `-v n` flag.

*NOTE:* This is potentially a minor breaking change. Applying
this debug overlay to any previous (pre-klog edit) images will
cause the container to fail to launch, as it will not recognise
the new `-v` arguments.

We also update the kustomize deployment to move from using
DEBUG env vars to adding a VERBOSITY var that controls both
the log verbosity and now the debug mode enabling.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-19 11:20:48 +00:00
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
Mikko Ylinen
f036b72cff
Merge pull request #286 from askervin/kustomize
qat_plugin: add kustomizations
2020-02-06 13:53:08 +02:00
Antti Kervinen
ec8eef6daa qat_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/qat_plugin`
- Debug variant: `kubectl apply -k deployments/qat_plugin/overlays/debug`
- Single-resource `yaml` naming convention:
  applying x-y-z.yaml configures k8s resource named x-y-z.
- QAT plugin README updated.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-02-05 15:48:57 +02:00
Mikko Ylinen
28a89a2820 qat: README: clarify crypto-perf usage
crypto-perf instructions were outdated and hand implicit
assumptions about the environment. More specifically:

Clear Linux builds DPDK libraries as shared so for the
compress and crypto test applications to run, the memory and
QAT PMD libraries must be explicitly preloaded using '-d' parameter.

Also, the test-crypto1 and test-compress1 deployments expect the
cluster is configured with CPU Manager's static policy.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-02-04 13:32:10 +02:00
Graham Whaley
1ca19696e0 qat: docs: Update the README
Update the QAT README. Add some descriptions. Add information about
the command line and config options.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-01-27 16:51:00 +00:00
Mikko Ylinen
fd631fc31c deployments/gpu_plugin: limit host mounts
The default deployment gives rather wide host mounts. We can limit
the mounts only to the subdirectories the plugin needs and mount
them read-only.

Also, add notes that both QAT and GPU plugins can be run as non-root
user.

Fixes: #228

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-12-11 12:54:36 +02:00
Mikko Ylinen
832e4aaf3c crypto-perf: add kustomization and move to deployments
We plan to use crypto-perf for simple QAT testing. This commit adds
kustomization to make the deployment easier. The original .yaml is
also moved to deployments/ with some changes.

For instance, it turns out also vfio-pci mode with DPDK needs CAP_SYS_ADMIN
(See PR: #187 which states that only igb_uio would need it).

kustomize is available part of kubectl since kubernetes v1.14.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-20 22:01:44 +03:00
Mikko Ylinen
d92b528ab6 qat: document kerneldrv mode and build instructions
-mode kerneldrv comes with no documentation. This patch adds few
notes about it and instructions how to get it build if a user chooses
to have it enabled.

Closes: #197

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-19 09:56:57 +03:00
Mikko Ylinen
08a079ead2 crypto-perf: use IPC_LOCK to ensure mmap() works
Change SYS_ADMIN to IPC_LOCK capability to ensure DPDK gets to mmap() hugepages.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-06-12 07:31:01 +03:00
ssehgal
eb6d48a512 QAT README update and crypto perf image tag correction 2018-12-03 14:03:55 +00:00
Mikko Ylinen
794b3077bd qat_plugin: readme: list all known VF devices
Not all QAT chips (e.g, 37c9) are available in pci.ids which makes
"grep QAT" to not show them.

Scan all known VF PCI ids in a loop to ensure all configured devices
are shown.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-28 10:32:31 +02:00
Mikko Ylinen
187f8040f0 qat_plugin: use vfio-pci as the default driver
vfio-pci uses IOMMU memory protection and is a safer default.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-28 10:32:31 +02:00