Skip to content
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

qat: init: detect all system QAT devices #2000

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mythi
Copy link
Contributor

@mythi mythi commented Feb 27, 2025

Fixes: #1999

@mythi mythi marked this pull request as ready for review March 11, 2025 14:34
@mythi mythi requested review from tkatila, bart0sh and kad as code owners March 11, 2025 14:34
demo/qat-init.sh Outdated
@@ -30,7 +30,7 @@ check_config() {
sysfs_config() {
if [ "$SERVICES_ENABLED_FOUND" = "TRUE" ]; then
for dev in $DEVS; do
DEVPATH="/sys/bus/pci/devices/0000:$dev"
DEVPATH=$(realpath /sys/bus/pci/devices/????:"$dev")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit far fetching, but in theory there could be two (or more) devices that resolve with this path.

Copy link

@dcoyle-intel dcoyle-intel Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tuomas & Mikko, apologies for delay on reviewing this PR - we were trying to get a vCMTS release completed.

I won't be able to test this for a while as the server which showed the initial problem is out-of-action for a while.
However your comment is accurate here, in that it would actually resolve to 2 devices on our server, so not far-fetched at all.

Our devices had the following addresses

  • 0000:01:00.0
  • 0000:0b:00.0
  • 0001:01:00.0
  • 0001:0b:00.0

So with $dev == 01:00.0, the realpath /sys/bus/pci/devices/????:"$dev" command would give

/sys/bus/pci/devices/0000:01:00.0
/sys/bus/pci/devices/0001:01:00.0

So there would need to be a loop on those 2 paths.

But the global $DEVS would probably include 01:00.0 twice in this case, so you'd also need to ensure that the devices are not configured twice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dcoyle-intel, then this patch needs more tuning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for checking this, will fix!

Copy link
Contributor

@tkatila tkatila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might have broken something:

              initContainerStatuses:
              - containerID: containerd://30a2e82553980cc90b017e3a169c3cfbdb1f0b97b5db6b80fdc82daba0be7be6
                image: 192.168.33.10:5000/intel/intel-qat-initcontainer:0.32.1-e2e-spr
                imageID: 192.168.33.10:5000/intel/intel-qat-initcontainer@sha256:86a0310df800b62bd7d4e7026a1766b4ee597279d584f3270fe4fb5463aacedb
                lastState:
                  terminated:
                    containerID: containerd://9e526dd45848b3fd8d6fbe9cf8bce1f43d02cbaa2d209712b16e822779423b42
                    exitCode: 1
                    finishedAt: "2025-03-19T11:08:10Z"
                    reason: Error
                    startedAt: "2025-03-19T11:08:09Z"
                name: intel-qat-initcontainer
                ready: false
                restartCount: 4
                started: false
                state:
                  terminated:
                    containerID: containerd://30a2e82553980cc90b017e3a169c3cfbdb1f0b97b5db6b80fdc82daba0be7be6
                    exitCode: 1
                    finishedAt: "2025-03-19T11:08:52Z"
                    reason: Error
                    startedAt: "2025-03-19T11:08:51Z"

It has restarted 4 times so it doesn't look like a normal error with gnr-d.

@mythi
Copy link
Contributor Author

mythi commented Mar 19, 2025

I think this might have broken something:

Yeah, I need to take a closer look. I only tested the added lines manually (they worked)...

@mythi
Copy link
Contributor Author

mythi commented Mar 21, 2025

I think this might have broken something:

Yeah, I need to take a closer look. I only tested the added lines manually (they worked)...

QAT tests are passing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only QAT devices in bus 0000 are handled by QAT device plugin's init container
4 participants