-
Notifications
You must be signed in to change notification settings - Fork 12
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
tests_l2: Added qat workload #117
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright (c) 2023 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
name: intel-qat-workload | ||
namespace: intel-qat | ||
spec: {} | ||
--- | ||
apiVersion: build.openshift.io/v1 | ||
kind: BuildConfig | ||
metadata: | ||
name: intel-qat-workload | ||
namespace: intel-qat | ||
spec: | ||
triggers: | ||
- type: "ConfigChange" | ||
- type: "ImageChange" | ||
runPolicy: "Serial" | ||
source: | ||
type: Dockerfile | ||
dockerfile: | | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi | ||
ARG QATLIB_VERSION | ||
|
||
RUN dnf -y update && \ | ||
dnf install -y gcc \ | ||
make \ | ||
automake \ | ||
autoconf \ | ||
libtool \ | ||
http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/Packages/nasm-2.15.03-3.el8.x86_64.rpm \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for the purpose of this build, I'd think we should go without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it, thanks. will update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Looks like the option is for the situation nasm compiler is not present in the build environment. If we have the nasm compiler, we should install the nasm and build the lib with fast-crc-in-assembler, otherwise, there might be some performance penalty. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this "test application", it's acceptable but pulling rpms from random urls is not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can look for official links of nasm. nasm & qatlib is on codeready-builder-for-rhel-8-x86_64-rpms repo for ubi images. With a dockerfile this repo can be accessed and built on RHEL systems enabled with subscription manager. Via buildconfigs, subscription manager and its supported repos can be enabled only via RH account personal keys. Plan to enable for future releases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@mythi I agree with your point. For the qatlib, the user should use RH distributed qatblib rpm package and shoul not build the lib by themselves. However, currently, it is not very easily for user to do that.The enhancement is filed for Milestone 1.1.0. to address the gap. All in all, for the testing of the first QAT release(1.0.1), this test case is good enough. @mythi Thank you very much for your comments and help. |
||
openssl-devel \ | ||
zlib-devel \ | ||
git && \ | ||
git clone -b $QATLIB_VERSION https://github.com/intel/qatlib | ||
|
||
RUN cd /qatlib && \ | ||
./autogen.sh && \ | ||
./configure \ | ||
--prefix=/usr \ | ||
--enable-systemd=no && \ | ||
make -j && \ | ||
make install samples-install | ||
|
||
WORKDIR /usr/bin | ||
ENTRYPOINT ["/usr/bin/cpa_sample_code"] | ||
strategy: | ||
type: Docker | ||
noCache: true | ||
dockerStrategy: | ||
buildArgs: | ||
- name: "QATLIB_VERSION" | ||
value: "23.08.0" | ||
|
||
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: intel-qat-workload:latest |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2023 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: intel-qat-workload | ||
namespace: intel-qat | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: intel-qat-job | ||
image: image-registry.openshift-image-registry.svc:5000/intel-qat/intel-qat-workload:latest | ||
imagePullPolicy: IfNotPresent | ||
command: ["./cpa_sample_code"] | ||
securityContext: | ||
capabilities: | ||
add: | ||
[IPC_LOCK] | ||
resources: | ||
requests: | ||
qat.intel.com/dc: '1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have we tried the case when we have more than one qat resource? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. /dev/vfio will have 4 dev files instead of 2. since 2 of dc and 2 of cy resources are requested There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean have we ever tried to use multiple resources/VFs to do the dc or/and cy simultaneously in a single pod/container? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes difference is what /dev/vfio would have. changed this job example, 2 cy and 2 dc. anything else to be checked here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provisioning of multiple resources works. |
||
qat.intel.com/cy: '1' | ||
limits: | ||
qat.intel.com/dc: '1' | ||
qat.intel.com/cy: '1' | ||
serviceAccount: intel-qat |
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.
Could we change the commit log to:
tests_l2: Add qatlib based Intel QAT sample workload
qatlib is built from source in https://github.com/intel/qatlib
The qatlib version is specified by QATLIB_VERSION: 23.08.0
cpa_sample_code shipped with qatlib is used to verify the QAT provisioning on OCP
Resource:
qat.intel.com/dc is used for QAT compression/decompression
qat.intel.com/cy is used for QAT asymmetric/asymmetric cryptography
serviceAccount: intel-qat uses the user defined SCC intel-qat-scc which enables the IPC_LOCK capability for Qat-lib based workload see #122
Signed-off-by: veenadhari.bedida@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.
updated
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.
I think we should also add the detailed commit log in the git. The PR description can only be accessed from the online GitHub service. Correct me @mythi @vbedida79
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.
can update commit message. do we plan to do this for every PR?
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.
Yes, please. :-)